sls-packaging icon indicating copy to clipboard operation
sls-packaging copied to clipboard

init.sh check hangs

Open qinfchen opened this issue 7 years ago • 2 comments

here is the stacktrace log when running init.sh check:

Exception in thread "main" java.lang.RuntimeException: Unable to start Jetty server
    at <service>.start(Service.java:411)
    at<service>.startServer(Service.java:37)
    at <service>.main(Service.java:30)
Caused by: java.net.BindException: Address already in use
    at sun.nio.ch.Net.bind0(Native Method)
    at sun.nio.ch.Net.bind(Net.java:433)
    at sun.nio.ch.Net.bind(Net.java:425)
    at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
    at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
    at org.eclipse.jetty.server.ServerConnector.openAcceptChannel(ServerConnector.java:334)
    at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:302)
    at org.eclipse.jetty.server.AbstractNetworkConnector.doStart(AbstractNetworkConnector.java:80)
    at org.eclipse.jetty.server.ServerConnector.doStart(ServerConnector.java:238)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
    at org.eclipse.jetty.server.Server.doStart(Server.java:428)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
    at service.start(Service.java:409)

qinfchen avatar Dec 14 '17 22:12 qinfchen

init.sh check was intended to work with a dropwizard healthcheck command. Now that dropwizard is not the recommended server internally anymore, I think it might be worth deprecating this command.

Your Unable to start Jetty server is probably because your WC server doesn't understand the check argument and is just trying to start another server instance.

iamdanfox avatar Dec 15 '17 13:12 iamdanfox

Didn't know that init.sh check is meant for dropwizard healthcheck command and neither the documentation nor check.sh indicates that. Agreed, I think we should deprecate it since it is still a command in all sls-artifacts and it won't work for almost of them

qinfchen avatar Dec 15 '17 15:12 qinfchen