我刚刚安装teamcity
并能够创建管理员帐户等,但是一旦我重新启动 teamcity 服务,我就无法再连接到 teamcity。这是我看到的错误。
有人能解释一下这个错误意味着什么吗?您提供的任何有关此错误的信息对我都很有帮助。
注意:我想知道这是否是新的设置问题,因此我从头开始重新安装了 teamcity,并且它运行良好,直到我重新启动服务,然后出现同样的问题。
这是我尝试登录时出现的第一个错误:
TeamCity is running in professional mode
Super user authentication token: "123465979879879". To login as Super user use an empty username and this token as a password on the login page.
Mar 23, 2020 9:08:21 AM org.apache.tomcat.util.net.NioEndpoint setSocketOptions
SEVERE:
java.lang.ExceptionInInitializerError
at sun.nio.ch.SocketChannelImpl$DefaultOptionsHolder.defaultOptions(SocketChannelImpl.java:239)
at sun.nio.ch.SocketChannelImpl$DefaultOptionsHolder.<clinit>(SocketChannelImpl.java:226)
at sun.nio.ch.SocketChannelImpl.supportedOptions(SocketChannelImpl.java:248)
at sun.nio.ch.SocketChannelImpl.setOption(SocketChannelImpl.java:166)
at sun.nio.ch.SocketAdaptor.setIntOption(SocketAdaptor.java:294)
at sun.nio.ch.SocketAdaptor.setReceiveBufferSize(SocketAdaptor.java:375)
at org.apache.tomcat.util.net.SocketProperties.setProperties(SocketProperties.java:178)
at org.apache.tomcat.util.net.NioEndpoint.setSocketOptions(NioEndpoint.java:662)
at org.apache.tomcat.util.net.NioEndpoint$Acceptor.run(NioEndpoint.java:840)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NullPointerException
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1847)
at java.lang.Runtime.loadLibrary0(Runtime.java:871)
at java.lang.System.loadLibrary(System.java:1124)
at sun.net.ExtendedOptionsImpl.lambda$static$0(ExtendedOptionsImpl.java:48)
at java.security.AccessController.doPrivileged(Native Method)
at sun.net.ExtendedOptionsImpl.<clinit>(ExtendedOptionsImpl.java:47)
... 10 more
如果我刷新页面并尝试重试,则会看到以下错误。
Mar 23, 2020 9:08:31 AM org.apache.tomcat.util.net.NioEndpoint setSocketOptions
SEVERE:
java.lang.NoClassDefFoundError: Could not initialize class sun.nio.ch.SocketChannelImpl$DefaultOptionsHolder
at sun.nio.ch.SocketChannelImpl.supportedOptions(SocketChannelImpl.java:248)
at sun.nio.ch.SocketChannelImpl.setOption(SocketChannelImpl.java:166)
at sun.nio.ch.SocketAdaptor.setIntOption(SocketAdaptor.java:294)
at sun.nio.ch.SocketAdaptor.setReceiveBufferSize(SocketAdaptor.java:375)
at org.apache.tomcat.util.net.SocketProperties.setProperties(SocketProperties.java:178)
at org.apache.tomcat.util.net.NioEndpoint.setSocketOptions(NioEndpoint.java:662)
at org.apache.tomcat.util.net.NioEndpoint$Acceptor.run(NioEndpoint.java:840)
at java.lang.Thread.run(Thread.java:748)
Mar 23, 2020 9:13:12 AM org.apache.tomcat.util.net.NioEndpoint setSocketOptions
SEVERE:
java.lang.NoClassDefFoundError: Could not initialize class sun.nio.ch.SocketChannelImpl$DefaultOptionsHolder
at sun.nio.ch.SocketChannelImpl.supportedOptions(SocketChannelImpl.java:248)
at sun.nio.ch.SocketChannelImpl.setOption(SocketChannelImpl.java:166)
at sun.nio.ch.SocketAdaptor.setIntOption(SocketAdaptor.java:294)
at sun.nio.ch.SocketAdaptor.setReceiveBufferSize(SocketAdaptor.java:375)
at org.apache.tomcat.util.net.SocketProperties.setProperties(SocketProperties.java:178)
at org.apache.tomcat.util.net.NioEndpoint.setSocketOptions(NioEndpoint.java:662)
at org.apache.tomcat.util.net.NioEndpoint$Acceptor.run(NioEndpoint.java:840)
at java.lang.Thread.run(Thread.java:748)
答案1
找到了解决方法。如果我teamcity
使用 启动服务,sudo
它就可以正常工作。
sudo /opt/teamcity/TeamCity/bin/teamcity-server.sh start
下面问题的答案表明这是一个 mysql 问题,但我不确定如何修复该 mysql 问题,答案中没有提供太多信息。