我的 sqoop2 突然死机并且无法启动,从两天前开始,我没有更改 sqoop2 上的任何设置,我检查了 /var/log/sqoop2 catalina 日志,它说:
Mar 14, 2016 2:06:17 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib<br>
Mar 14, 2016 2:06:18 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-12000<br>
Mar 14, 2016 2:06:18 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 2661 ms<br>
Mar 14, 2016 2:06:18 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina<br>
Mar 14, 2016 2:06:18 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.44<br>
Mar 14, 2016 2:06:18 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive sqoop.war<br>
Mar 14, 2016 2:06:32 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory ROOT<br>
Mar 14, 2016 2:06:33 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-12000<br>
Mar 14, 2016 2:06:33 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 15277 ms<br>
Mar 14, 2016 2:06:33 PM org.apache.catalina.core.StandardServer await
SEVERE: StandardServer.await: create[8005]:
java.net.BindException: Address already in use
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:376)
at java.net.ServerSocket.bind(ServerSocket.java:376)
at java.net.ServerSocket.<init>(ServerSocket.java:237)
at org.apache.catalina.core.StandardServer.await(StandardServer.java:404)
at org.apache.catalina.startup.Catalina.await(Catalina.java:676)
at org.apache.catalina.startup.Catalina.start(Catalina.java:628)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)<br>
Mar 14, 2016 2:06:33 PM org.apache.coyote.http11.Http11Protocol pause
INFO: Pausing Coyote HTTP/1.1 on http-12000<br>
Mar 14, 2016 2:06:34 PM org.apache.catalina.core.StandardService stop
INFO: Stopping service Catalina<br>
Mar 14, 2016 2:06:34 PM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc<br>
SEVERE: The web application [/sqoop] registered the JDBC driver [org.apache.derby.jdbc.AutoloadedDriver40] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.<br>
Mar 14, 2016 2:06:35 PM org.apache.coyote.http11.Http11Protocol destroy
INFO: Stopping Coyote HTTP/1.1 on http-12000
有人有什么主意吗?谢谢!
答案1
这似乎是日志的相关部分:
java.net.BindException: Address already in use
最可能的原因是:
- sqoop2 已经在运行(但处于几乎死亡状态,没有响应或做任何有用的事情但仍在运行。即挂起而不是崩溃)。
检查与ps aux | grep sqoop
.如果它正在运行,则将其杀死,然后重新启动。
或者:
- 其他正在运行的程序正在使用相同的端口。尝试运行
netstat -tupan | grep :port
(其中“port”是sqoop2想要绑定的端口号)。杀死它并启动 sqoop2。