Teamcity doesn't work after restart - Could not initialize class sun.nio.ch.SocketChannelImpl$DefaultOptionsHolder

Completed

I just installed `teamcity` and I was able to create Admin account etc., But as soon as I restart the teamcity service, I can no longer connect to teamcity. Here is the error I see..

Can someone shed some info on what this error means? Any info you can provide on this error is helpful to me.

Note: I wondered if its new setup issue, so I reinstalled teamcity from scratch and It works fine until I restart the service, then the same issue.

This is the first error when I try to login:

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

If I refresh the page and attempt to retry then I see the following error..

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 comment
Comment actions Permalink

Found a work around. If I start the `teamcity` service with `sudo` then it works fine.

sudo /opt/teamcity/TeamCity/bin/teamcity-server.sh start

The answer from below question indicates its a mysql issue but I'm not sure how to fix that mysql issue, not much information available from the answer.

https://stackoverflow.com/a/59146995/13109839

0

Please sign in to leave a comment.