我的TeamCity突然停止工作。它无法执行runAll.sh启动/停止。重新启动计算机并用PID杀死也无济于事。
CentOS7,TeamCity 2018.2
从命令行输出:
<object data="img/test.svg" type="image/svg+xml" />
Catalina日志的输出:
[root@host bin]# ./runAll.sh stop
Java executable is found: '/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-1.el7_6.x86_64/jre/bin/java'
Using CATALINA_BASE: /opt/TeamCity
Using CATALINA_HOME: /opt/TeamCity
Using CATALINA_TMPDIR: /opt/TeamCity/temp
Using JRE_HOME: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-1.el7_6.x86_64/jre
Using CLASSPATH: /opt/TeamCity/bin/bootstrap.jar:/opt/TeamCity/bin/tomcat-juli.jar
Using CATALINA_PID: /opt/TeamCity/bin/../logs/teamcity.pid
PID file found but either no matching process was found or the current user does not have permission to stop the process. Stop aborted.
Stopping TeamCity build agent...
Java executable is found: '/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-1.el7_6.x86_64/jre/bin/java'
Starting TeamCity Build Agent Launcher...
Agent home directory is /opt/TeamCity/buildAgent
Received stop command from console.
Sending agent shutdown command to: http://localhost:9090
Failed to shutdown agent gracefully: Connection timed out (Connection timed out)
Cannot stop agent gracefully, you can try to kill agent by './agent.sh stop kill' command
<..>
25-Dec-2018 20:35:48.289 SEVERE [main] org.apache.catalina.core.StandardServer.await StandardServer.await: create[localhost:8105]:
java.net.BindException: Cannot assign requested address (Bind failed)
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:387)
at java.net.ServerSocket.bind(ServerSocket.java:375)
at java.net.ServerSocket.<init>(ServerSocket.java:237)
at org.apache.catalina.core.StandardServer.await(StandardServer.java:440)
at org.apache.catalina.startup.Catalina.await(Catalina.java:769)
at org.apache.catalina.startup.Catalina.start(Catalina.java:715)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:353)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:493)
什么是原因或解决方案?
答案 0 :(得分:1)
表示尝试将套接字绑定到本地地址和端口时发生错误。 通常,端口正在使用中,或者无法分配请求的本地地址。
所以,或者端口正在使用中,或者您没有打开端口的权限...
我想您是因为centos上的防火墙而遇到麻烦
答案 1 :(得分:0)
以下步骤已帮助我解决了此问题:
调整服务设置:
server:
Type=forking
PIDFile=/opt/TeamCity/logs/teamcity.pid
&
agent:
Type=oneshot
RemainAfterExit=yes