Hi All,
We are having issue with router not starting whenever a change is done to VHOST configs. I checked the logs for router and could find below errors/warning whenever router was restarted/started.
2017-06-14 11:26:31,401 WebServer INFO c.a.g.f.v.EntityCRUDInterceptor - EntityCRUDInterceptor.<clinit>() : Failed to retrieve security properties with the exception {}
java.lang.NullPointerException: null
at java.util.Properties$LineReader.readLine(Properties.java:434) ~[na:1.8.0_121]
at java.util.Properties.load0(Properties.java:353) ~[na:1.8.0_121]
at java.util.Properties.load(Properties.java:341) ~[na:1.8.0_121]
at com.apigee.gateway.flow.validation.EntityCRUDInterceptor.<clinit>(EntityCRUDInterceptor.java:74) ~[validation-1.0.0.jar:na]
at java.lang.Class.forName0(Native Method) [na:1.8.0_121]
at java.lang.Class.forName(Class.java:264) [na:1.8.0_121]
at com.apigee.rest.framework.CustomJAXRSInvoker.<init>(CustomJAXRSInvoker.java:78) [rest-1.0.0.jar:na]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [na:1.8.0_121]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) [na:1.8.0_121]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) [na:1.8.0_121]
at java.lang.reflect.Constructor.newInstance(Constructor.java:423) [na:1.8.0_121]
at java.lang.Class.newInstance(Class.java:442) [na:1.8.0_121]
at com.apigee.rest.framework.container.RestServlet.init(RestServlet.java:51) [rest-1.0.0.jar:na]
at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:456) [jetty-webapp-8.0.4.v20111024.jar:8.0.4.v20111024]
at org.eclipse.jetty.servlet.ServletHolder.doStart(ServletHolder.java:276) [jetty-webapp-8.0.4.v20111024.jar:8.0.4.v20111024]
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59) [jetty-webapp-8.0.4.v20111024.jar:8.0.4.v20111024]
and
2017-06-14 11:26:31,441 main WARN REGISTRATION - CommunicationInfoBuilder.loadIPAddresses() : CommunicationInfoBuilder.loadIPAddresses : File /opt/apigee/ec2.properties is missing. Will use localhost as default for all the hosts
2017-06-14 11:26:31,845 main INFO REGISTRATION - ServerRegistrationServiceImpl.storeServerRegistrationPath() : Registering the server uuid aa834eaf-8a34-4098-8f80-e66b406260f4 with region dc-1 and pod gateway information
2017-06-14 11:26:31,888 WebServer WARN o.e.j.u.c.AbstractLifeCycle - AbstractLifeCycle.setFailed() : FAILED SelectChannelConnector@0.0.0.0:8081 FAILED: java.net.BindException: Address already in use
java.net.BindException: Address already in use
at sun.nio.ch.Net.bind0(Native Method) ~[na:1.8.0_121]
at sun.nio.ch.Net.bind(Net.java:433) ~[na:1.8.0_121]
at sun.nio.ch.Net.bind(Net.java:425) ~[na:1.8.0_121]
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) ~[na:1.8.0_121]
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) ~[na:1.8.0_121]
at org.eclipse.jetty.server.nio.SelectChannelConnector.open(SelectChannelConnector.java:172) ~[jetty-webapp-8.0.4.v20111024.jar:8.0.4.v20111024]
at org.eclipse.jetty.server.AbstractConnector.doStart(AbstractConnector.java:300) ~[jetty-webapp-8.0.4.v20111024.jar:8.0.4.v20111024]
at org.eclipse.jetty.server.nio.SelectChannelConnector.doStart(SelectChannelConnector.java:249) ~[jetty-webapp-8.0.4.v20111024.jar:8.0.4.v20111024]
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59) [jetty-webapp-8.0.4.v20111024.jar:8.0.4.v20111024]
at org.eclipse.jetty.server.Server.doStart(Server.java:273) [jetty-webapp-8.0.4.v20111024.jar:8.0.4.v20111024]
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59) [jetty-webapp-8.0.4.v20111024.jar:8.0.4.v20111024]
at com.apigee.rest.framework.container.Container.start(Container.java:78) [rest-1.0.0.jar:na]
at com.apigee.web.WebServiceImpl$1.run(WebServiceImpl.java:39) [webserver-1.0.0.jar:na]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121]
For “Address already in use” issue I can guess that it is to do with some ports already listening on the ports which router is trying to listen. I checked netstat for all listening ports and could find the old port for VHOST listening. Shouldn’t the restart take care of unbinding old and binding new ports?
Could anyone please help me understand these two exception and the cause of it?
Thanks…