JVM bind error in dropwizard service even the port which is in exception; is not mentioned in the yml file

1,395 views
Skip to first unread message

Paras Goel

unread,
Mar 13, 2013, 3:38:08 PM3/13/13
to dropwiz...@googlegroups.com
Hi I am getting below error for JVM bind.. I have restarted the system also but same issue. i mentioned port as below:

port: 8079
adminPort: 8179

how can i resolved this issue.
for your information i am using jersey client also in my application .
---------------------------------------------------------------------------
INFO  [2013-03-13 19:29:35,692] org.eclipse.jetty.server.AbstractConnector: Started InstrumentedBlocki...@0.0.0.0:8080
WARN  [2013-03-13 19:29:35,707] org.eclipse.jetty.util.component.AbstractLifeCycle: FAILED SocketC...@0.0.0.0:8081: 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(Unknown Source)
! at java.net.ServerSocket.bind(Unknown Source)
! at java.net.ServerSocket.<init>(Unknown Source)
! at java.net.ServerSocket.<init>(Unknown Source)
! at org.eclipse.jetty.server.bio.SocketConnector.newServerSocket(SocketConnector.java:96)
! at org.eclipse.jetty.server.bio.SocketConnector.open(SocketConnector.java:85)
! at org.eclipse.jetty.server.AbstractConnector.doStart(AbstractConnector.java:316)
! at org.eclipse.jetty.server.bio.SocketConnector.doStart(SocketConnector.java:156)
! at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
! at org.eclipse.jetty.server.Server.doStart(Server.java:288)
! at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
! at com.yammer.dropwizard.cli.ServerCommand.run(ServerCommand.java:48)
! at com.yammer.dropwizard.cli.EnvironmentCommand.run(EnvironmentCommand.java:39)
! at com.yammer.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:58)
! at com.yammer.dropwizard.cli.Cli.run(Cli.java:53)
! at com.yammer.dropwizard.Service.run(Service.java:61)
! at com.ge.workflow.MailPollerService.main(MailPollerService.java:18)
WARN  [2013-03-13 19:29:35,707] org.eclipse.jetty.util.component.AbstractLifeCycle: FAILED org.eclipse.jetty.server.Server@50739aa3: 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(Unknown Source)
! at java.net.ServerSocket.bind(Unknown Source)

Jochen Schalanda

unread,
Mar 13, 2013, 4:08:13 PM3/13/13
to dropwiz...@googlegroups.com
Hi,

On 13.03.2013 20:38, Paras Goel wrote:
> port: 8079
> adminPort: 8179
>
> [...]
> INFO [2013-03-13 19:29:35,692]
> org.eclipse.jetty.server.AbstractConnector: Started
> InstrumentedBlocki...@0.0.0.0:8080
> WARN [2013-03-13 19:29:35,707]
> org.eclipse.jetty.util.component.AbstractLifeCycle: FAILED
> SocketC...@0.0.0.0:8081: java.net.BindException: Address already in
> use: JVM_Bind

It seems that your configuration settings are being ignored. The service
binds (or tries to bind) to the ports 8080 and 8081 respectively instead
of 8079 and 8179 which you wrote at the beginning.

Did you start your service with the correct configuration file and did
you change the correct settings (http.port and http.adminPort) inside
the config file?


Regards,
Jochen

Paras Goel

unread,
Mar 13, 2013, 4:16:52 PM3/13/13
to dropwiz...@googlegroups.com, joc...@schalanda.name
Below is my YML file:
--------------------------------------------------------------------
# HTTP-specific options.
http:

  # The port on which the HTTP server listens for service requests.
  port: 8079

  # The port on which the HTTP server listens for administrative requests.
  adminPort: 8179

  # Maximum number of threads.
  maxThreads: 100

  # Minimum number of thread to keep alive.
  minThreads: 10
-------------------------------------------------------------------------------------------------------------------------
and the command i am using to run my service:

java -jar target\emailPoller-servic-0.0.1-SNAPSHOT.jar server emailPoller.yml

I have checked so many times but still I am not sure where I m worng


On Wednesday, 13 March 2013 16:08:13 UTC-4, Jochen Schalanda wrote:
Hi,

On 13.03.2013 20:38, Paras Goel wrote:
> port: 8079
> adminPort: 8179
>
> [...]
> INFO  [2013-03-13 19:29:35,692]
> org.eclipse.jetty.server.AbstractConnector: Started

Paras Goel

unread,
Mar 13, 2013, 5:38:23 PM3/13/13
to dropwiz...@googlegroups.com, joc...@schalanda.name
Thanks Again,

My issue has been resolved but still I am not sure what was the issue but it is working now:-)
Reply all
Reply to author
Forward
0 new messages