Handle Server cannot bind to port 8000 (on AWS)

27 views
Skip to first unread message

M P

unread,
Oct 4, 2022, 11:13:55 AM10/4/22
to DSpace Technical Support
If you are on AWS and you followed the documentation to setup your handle server, you may find that your config.dct will have settings that will not work.  The startup script will try to bind to the external IP address, but the server will not succeed, giving an error similar to the following:

"2022-10-04 17:03:03.135+0200" 100 class net.handle.server.HdlUdpInterface: Error setting up server socket: java.net.BindException: Cannot assign requested address (Bind failed)

"2022-10-04 17:03:03.143+0200" 100 class net.handle.server.HdlTcpInterface: Error setting up server socket: java.net.BindException: Cannot assign requested address (Bind failed)

java.io.IOException: Failed to bind to /AWS_PUBLIC_IP:8000

   at org.eclipse.jetty.server.ServerConnector.openAcceptChannel(ServerConnector.java:349)

   at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:310)

   at org.eclipse.jetty.server.AbstractNetworkConnector.doStart(AbstractNetworkConnector.java:80)

   at org.eclipse.jetty.server.ServerConnector.doStart(ServerConnector.java:234)

   at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73)

   at org.eclipse.jetty.server.Server.doStart(Server.java:401)

   at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73)

   at net.cnri.servletcontainer.EmbeddedJetty.startHttpServer(EmbeddedJetty.java:188)

   at net.handle.server.Main.start(Main.java:300)

   at net.handle.server.Main.main(Main.java:123)

Caused by: java.net.BindException: Cannot assign requested address

   at java.base/sun.nio.ch.Net.bind0(Native Method)

   at java.base/sun.nio.ch.Net.bind(Net.java:459)

   at java.base/sun.nio.ch.Net.bind(Net.java:448)

   at java.base/sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:227)

   at java.base/sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:80)

   at org.eclipse.jetty.server.ServerConnector.openAcceptChannel(ServerConnector.java:344)

   ... 9 more

Shutting down...

Simply replace your external IP address for the internal address and try again.  To be clear, the setup script correctly reports your external address so your sitebndl.zip contains the correct data for the Handle Registry, but your config.dct will need to use the INTERNAL IP address in order to startup.

I hope this helps someone.
Reply all
Reply to author
Forward
0 new messages