It's all about the answers!

Ask a question

Why do I get JVM_Bind errors when executing a Jetty Debug launch as part of the RTC 4.0 Extensions Workshop?


Sudheer Rugbeer (11521832) | asked Mar 26 '13, 9:07 a.m.
edited Mar 26 '13, 9:21 a.m.
Hi,

I have been working through the RTC 4.0 Extensions Workshop https://jazz.net/library/article/1000
After invoking for the Jetty Debug launch, the console displays the following error:

2013-03-26 13:56:55.702:INFO::Logging to STDERR via org.mortbay.log.StdErrLog
2013-03-26 13:56:56.482:INFO::jetty-6.1.x
2013-03-26 13:56:58.994:WARN::failed SocketConnector@0.0.0.0:7080: java.net.BindException: Address already in use: JVM_Bind
2013-03-26 13:56:59.540:INFO::Started SslSocketConnector@0.0.0.0:7443
2013-03-26 13:56:59.540:WARN::failed Server@636e636e: java.net.BindException: Address already in use: JVM_Bind
java.net.BindException: Address already in use: JVM_Bind
    at java.net.PlainSocketImpl.socketBind(Native Method)
    at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:413)
    at java.net.ServerSocket.bind(ServerSocket.java:339)
    at java.net.ServerSocket.<init>(ServerSocket.java:205)
    at java.net.ServerSocket.<init>(ServerSocket.java:161)
    at org.mortbay.jetty.bio.SocketConnector.newServerSocket(SocketConnector.java:80)
    at org.mortbay.jetty.bio.SocketConnector.open(SocketConnector.java:73)
    at org.mortbay.jetty.AbstractConnector.doStart(AbstractConnector.java:283)
    at org.mortbay.jetty.bio.SocketConnector.doStart(SocketConnector.java:147)
    at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
    at org.mortbay.jetty.Server.doStart(Server.java:235)
    at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
    at com.ibm.team.server.embedded.jetty.Activator.start(Activator.java:185)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:783)
    at java.security.AccessController.doPrivileged(AccessController.java:277)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:774)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:755)
    at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:370)
    at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:374)
    at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1067)
    at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:561)
    at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:546)
    at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:459)
    at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:243)
    at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:440)
    at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:227)
    at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:337)
13:56:59,602 [Component Resolve Thread (Bundle 265)]  INFO nternal.OverridablePropertyFileServerConfiguration  - CRJAZ1363I Loading the configuration from "file:/C:/RTC40Dev/workspace/Dev1/WS/.metadata/.plugins/org.eclipse.pde.core/[RTCExt] Jetty RTC Server/org.eclipse.osgi/bundles/249/data/teamserver.properties".

If I try to connect to the JTS at https://localhost:7443/jazz then the browser just waits for a response indefinitely.
I also looked at netstat before launching Jetty, and there are no processes using ports 7080 and 7443. After launching the Jetty Debug launch, these ports do show up as being used.

What's interesting is that if I change the port numbers in the Jetty launch configuration to e.g. 17080 and 17443, then there is no error message (i.e. the bind is successful) and I can connect to the Jetty JTS. However, I cannot create any project areas etc. because the Public URL is set at https://localhost:7443/jazz

I have also set up for RTC 4.0.1 and have run into exactly the same problems.
I had previously set up for the RTC 3.0.1 extensions workshop, and this worked perfectly.

What could be the cause for the JVM_Bind errors? Alternatively, is there a way to rename the Public URL for the Jetty server to use a different port?

One answer



permanent link
Sandy Grewal (1.6k1223) | answered Apr 10 '13, 5:09 p.m.
JAZZ DEVELOPER
The error basically means that Jetty is unable to use that port. You checked using netstat that the port is not in use but Jetty still cannot use it.
I have seen similar errors on Windows a few times, and restarting the PC fixes the issue. Its a pain.

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.