Error: EADDRINUSE connect EADDRINUSE 127.0.0.1:50596 when running e2e test suit on VS code - protractor

When I run e2e test suites on VS code getting an unusual error - Error: EADDRINUSE connect EADDRINUSE 127.0.0.1:50596 don't know how to solve this, its happening to all instance and failing all test cases with same error. when I debug this in dev tools getting this error in console log (node:16612) [DEP0005] Deprecation Warning: Buffer() is deprecated due to security and usability issues. Please use the buffer. From() methods instead.
(Use Code --trace-deprecation … to show where the warning was created)
Node version >v11.15.0**
NPM. version >6.7.0
Chrome browser

This error Error: EADDRINUSE connect EADDRINUSE 127.0.0.1:50596 means the address 127.0.0.1:50596 is already used.
You can find out what's using the port 50596, and then kill the process (see https://www.printsupportcenter.com/hc/en-us/articles/115003386949-Determine-which-program-uses-or-blocks-a-port):
Windows:
netstat -ano -p tcp | find "50596"
Linux/Mac:
sudo netstat -ano -p tcp | grep ":50596"
These previous commands will give you the Process IDentifier (PID), which you can then use to kill your process:
Windows:
taskkill /PID <pid_number>
Linux/Mac:
kill <pid_number>

Related

VS Code randomly starts listening on high port on 0.0.0.0

VS code often starts listening on a random high port on all interfaces.
$ lsb_release -d
Description: Ubuntu 22.04 LTS
$ code --version
1.67.2
c3511e6c69bb39013c4a4b7b9566ec1ca73fc4d5
x64
$ sudo ss -ltpn | grep code
LISTEN 0 511 *:33333 *:* users:(("code",pid=75602,fd=52))
In VS code developer tools console:
CRITI Extension 'ms-vsliveshare.vsliveshare' wants API proposal 'notebookDocumentEvents' but that proposal DOES NOT EXIST. Likely, the proposal has been finalized (check 'vscode.d.ts') or was abandoned.
log.ts:313
ERR UnboundLocalError: local variable 'start_index' referenced before assignment: Error: UnboundLocalError: local variable 'start_index' referenced before assignment
at /home/user/.vscode/extensions/ms-python.python-2022.8.0/out/client/extension.js:2:2107873
at /home/user/.vscode/extensions/ms-python.python-2022.8.0/out/client/extension.js:2:2108167
at Immediate.<anonymous> (/home/user/.vscode/extensions/ms-python.python-2022.8.0/out/client/extension.js:2:2108529)
at processImmediate (node:internal/timers:464:21)
log.ts:313
ERR Error: File not found
at g.handleSetInputError (vscode-file://vscode….main.js:2701:95592)
at async g.setInput (vscode-file://vscode….main.js:2701:94832)
at async doSetInput (vscode-file://vscode…p.main.js:2699:6429)
at async doOpenEditor (vscode-file://vscode…p.main.js:2699:4791)
at async d.openEditor (vscode-file://vscode…p.main.js:2699:3783)
at async vscode-file://vscode….main.js:2906:16950
at async bi.openAnything (vscode-file://vscode….main.js:2712:17542)
I have not been able to reproduce whenever the Microsoft Python extension (Python
v2022.8.0) was disabled, so it might be related to that. There is an error in the console related to ms-python, but I do not immediately see how it would lead to a port being opened, especially not on 0.0.0.0.
The following shows nothing:
$ sudo tcpdump -i any port 33333
The question is what causes this port to be opened (and how to avoid this).
In the process explorer of VS code it shows that the process that opened the port is 'extensionHost'.

IBM mobile first development server unable to start in eclipse?

Ibm mobilefirst development server failed to start showing error
objc[77281]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/jre/bin/java and /Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/jre/lib/libinstrument.dylib. One of the two will be used. Which one is undefined.
ERROR: transport error 202: bind failed: Address already in use
ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510)
JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [../../../src/share/back/debugInit.c:750]
FATAL ERROR in native method: JDWP No transports initialized, jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197)
/Users/test/Documents/sathyarajworkspace/eclipse/plugins/com.worklight.worklight-artifacts_7.1.0.00-20151012-1525/liberty/wlp/bin/server: line 764: 77281 Abort trap: 6 "${JAVA_CMD}" "$#"
Since i lost eclipse version of 6.3 i copied eclipse from another mac.
when i tried to run the development server this error shown.
i have also updated to current version of IBM MF still issue exist.
How to fix this issue in mac.
UPDATE:
killall -9 java
Killing java process worked.Thanks
The port is taken.
Try killing the Java process and then start the server again.
in command prompt, run lsof -i :10080
then kill the ports running with kill -9 <port_number>
in the "server" tab in eclipse, delete the "mobilefirst development server"
close eclipse, reopen eclipse, the server should recreate
start the server again

Orion Context Broker: reset by peer when calling updateContext

Just after the install of the Context Broker I've tried to test it creating a new entity as described in the session Entity Creation of https://forge.fi-ware.org/plugins/mediawiki/wiki/fiware/index.php/Publish/Subscribe_Broker_-_Orion_Context_Broker_-_User_and_Programmers_Guide, but I'm getting a "connection reset by peer" error.
The log doesn't seem say anything, even I raised the level of traces with -t 0-255 option.
Aditional info:
$ contextBroker --version
0.14.0
$ ps aux | grep context
/usr/bin/contextBroker -port 1026 -logDir /var/log/contextBroker -pidpath /var/log/contextBroker/contextBroker.pid -dbhost localhost -db orion -t 0-255
The issue was fixed updating the Context Broker to a newer version, in my case to version 0.14.1, which can be found here: http://repositories.testbed.fi-ware.org/repo/rpm/x86_64/.
I can't say exactly what was wrong, since after updating everything was working fine.

python-memcache memcached -- I installed on centos virtualbox but it get/set never seem to work

I'm using python. I did a yum install memcached followed by a easy_install python-memcached
I used the simple test program from the Help(memcache). When I wasn't getting the proper answers I threw in some print statements:
[~/test]$ cat m2.py
import memcache
mc = memcache.Client(['127.0.0.1:11211'], debug=0)
x = mc.set("some_key", "Some value")
print 'Just set a key and value into the cache (suposedly)'
value = mc.get("some_key")
print 'Just retrieved that value from the cache using the key'
print 'X %s' % x
print 'Value %s' % value
[~/test]$ python m2.py
Just set a key and value into the cache (suposedly)
Just retrieved that value from the cache using the key
X 0
Value None
[~/test]$
The question now is, what have I failed to do in my installation? It appears to be working from an API perspective but it fails to put anything into the memcache share area.
I'm using a virtualbox vm running centos
[~]# cat /proc/version
Linux version 2.6.32-358.6.2.el6.i686 (mockbuild#c6b8.bsys.dev.centos.org) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-3) (GCC) ) #1 SMP Thu May 16 18:12:13 UTC 2013
Is there a daemon that is supposed to be running? I don't see an obvious named one when I do a ps.
I tried to get pylibmc installed on my vm but was unable to find a working installation so for now will see if I can get the above stuff working first.
I discovered if i ran straight from the python console GUI i get a bit more output if I set debug=1
>>> mc = memcache.Client(['127.0.0.1:11211'], debug=1)
>>> mc.stats
{}
>>> mc.set('test','value')
MemCached: MemCache: inet:127.0.0.1:11211: connect: Connection refused. Marking dead.
0
>>> mc.get('test')
MemCached: MemCache: inet:127.0.0.1:11211: connect: Connection refused. Marking dead.
When I try to use per the example telnet to connect to the port i get a connection refused:
[root#~]# telnet 127.0.0.1 11211
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused
[root#~]#
I tried the instructions I found on the net for configuring telnet so localhost wouldn't be disabled:
vi /etc/xinetd.d/telnet
service telnet
{
flags = REUSE
socket_type = stream
wait = no
user = root
server = /usr/sbin/in.telnetd
log_on_failure += USERID
disable = no
}
And then ran the commands to restart the service(s):
service iptables stop
service xinetd stop
service iptables start
service xinetd start
service iptables stop
I ran with both cases (iptables started and stopped) but it has no effect. So I am out of ideas. What do I need to do to make it so the PORT will be allowed? if that is the problem?
Or is there a memcached service that needs to be running that needs to open up the port ?
well this is what it took to get it working: ( a series of manual steps )
1) su -
cd /var/run
mkdir memcached # this was missing
In the memcached file I added "-l 127.0.0.1" to the OPTIONS statement. It's apparently a listen option. Do this for steps 2 & 3. I'm not certain which file is actually used at runtime.
2) cd /etc/sysconfig
cp memcached memcached.old
vi memcached
3) cd /etc/init.d
cp memcached memcached.old
vi memcached
4) Try some commands to see if the server starts now
/etc/init.d/memcached start
/etc/init.d/memcached status
/etc/init.d/memcached stop
/etc/init.d/memcached restart
I tried opening a browser, but it never seemed to actually display anything so I don't really know how valid this approach is. I'm not running apache or anything like this so perhaps its not relevant to my cause. Perhaps I would have to supply a ?key=blah or something.
5) http://127.0.0.1:11211
6) Now it should be ready to go. If one runs the test shown with the following it should work. At least it did for me. doing the help(memcache) will display a simple program. just paste that in and it should work just fine.
[~]$ python
>>> import memcache
>>> help(memcache)

JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [../../../src/share/back/debugInit.c:690]

I have been trying to run with JRebel this configuration:
Here is my output:
c:\JBOSS\jboss-portal-2.7.2\bin\run.bat -c default
c:\JBOSS\jboss-portal-2.7.2\bin>set JAVA_OPTS=-Dhttp.proxyHost=188.173.32.78 -Dhttp.proxyPort=3128 -DproxySet=true
===============================================================================
JBoss Bootstrap Environment
JBOSS_HOME: c:\JBOSS\jboss-portal-2.7.2
JAVA: C:\Program Files\Java\jdk1.6.0_25\bin\java
JAVA_OPTS: -Xdebug -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n -Dhttp.proxyHost=188.173.32.78 -Dhttp.proxyPort=3128 -DproxySet=true -Dprogram.name=run.bat -server -Xms256m -Xmx512m -XX:MaxPermSize=256m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000
CLASSPATH: C:\Program Files\Java\jdk1.6.0_25\lib\tools.jar;c:\JBOSS\jboss-portal-2.7.2\bin\run.jar
===============================================================================
[2012-07-16 12:32:53,968] Artifact app-ear:ear: Artifact is being deployed, please wait...
[2012-07-16 12:32:53,972] Artifact my-portlet:war: Artifact is being deployed, please wait...
Connected to server
[2012-07-16 12:32:54,007] Artifact app-ear:ear: Artifact is deployed successfully
FATAL ERROR in native method: JDWP No transports initialized, jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197)
ERROR: transport error 202: bind failed: Address already in use
ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510)
JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [../../../src/share/back/debugInit.c:690]
Disconnected from server
Notice the following start up parameter in your post.
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n
There must be some other process occupied the 8787 port.
The 8787 port is already in use.
If the 8787 port in use by another application, you need to select a different port number in file run.bat
For example, 18787
Usually this error occurs when the port is already in use. Based on my experience, this usually happen when the server didn't started successfully making the server still running in the process. If you're using windows, you can check out your Task Manager (Ctrl+Shift+Esc) and then look for "java.exe" process. Terminate it and try to start your server again.
ERROR: transport error 202: bind failed: Address already in use
ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510)
from "JAVA_OPTS: address=8787"
You set Address 8787
Find the PID
netstat -ap | grep 8787
If you still see the PID with the above command, then
there are child PIDs. To find the child PIDs
pstree -p
and
pstree -p | grep previousPID
Find the groupPID of the PID
ps x -o "%r %p %y %x %c"
Kill the found PID
kill -TERM -groupPID
This problem occurs whenever the port required to run your server is already in use by some other application. Since the port number 8080 which i used for my jetty server was already in use,it gave me this error so I just changed the port from 8080 to 7070 and it worked for me..
Check the debug port in your
standalone.sh
It must have been
DEBUG_MODE=true
DEBUG_PORT="8787"
Change the debug mode to false or pass a new debug port from the new sh file which calls this standalone --debug 8788
In my case, this argument was wrong: address=server4.example.com:8787 I was trying to run from another server, e.g., server3.example.com.