Jenkins failed to obtain - java

I am new to Jenkins and was trying to figure out Nodes. After I made a new node and run from agent command line I got this. Could it be related to this supposed issue I got in the node status "Java Web Start is not available for the JVM version running Jenkins"?
INFO: Using C:\Data\Slave\remoting as a remoting work directory
эю с. 14, 2021 11:06:48 PM org.jenkinsci.remoting.engine.WorkDirManager setupLogging
INFO: Both error and output logs will be printed to C:\Data\Slave\remoting
Failed to obtain http://8080/computer/DESKTOP/jenkins-agent.jnlp?encrypt=true
java.net.SocketException: Network is unreachable: connect
at java.base/java.net.PlainSocketImpl.connect0(Native Method)
at java.base/java.net.PlainSocketImpl.socketConnect(PlainSocketImpl.java:101)
at java.base/java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:412)
at java.base/java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:255)
at java.base/java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:237)
at java.base/java.net.Socket.connect(Socket.java:608)
at java.base/java.net.Socket.connect(Socket.java:557)
at java.base/sun.net.NetworkClient.doConnect(NetworkClient.java:182)
at java.base/sun.net.www.http.HttpClient.openServer(HttpClient.java:474)
at java.base/sun.net.www.http.HttpClient.openServer(HttpClient.java:569)
at java.base/sun.net.www.http.HttpClient.<init>(HttpClient.java:242)
at java.base/sun.net.www.http.HttpClient.New(HttpClient.java:341)
at java.base/sun.net.www.http.HttpClient.New(HttpClient.java:362)
at java.base/sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1253)
at java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1187)
at java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1081)
at java.base/sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:1015)
at hudson.remoting.Launcher.parseJnlpArguments(Launcher.java:509)
at hudson.remoting.Launcher.run(Launcher.java:347)
at hudson.remoting.Launcher.main(Launcher.java:298)
Waiting 10 seconds before retry'

Related

Getting Command aborted because of exception: Command timed-out after 150 seconds error while starting roles on one of cloudera hosts

We are trying to add host to existing cluster and while starting roles on this host it gives "Command aborted because of exception: Command timed-out after 150 seconds" error.(Also couldnt find log of this process).
Before adding this host we had started Zookeeper in command line not in cloudera manager interface and in cloudera Manager Zookeper seems "stopped" but i tested it in command line it is working.
After that i restarted Zookeper service on Cloudera Manager interface and get this error:
NFO org.apache.zookeeper.server.ZooKeeperServer
minSessionTimeout set to 4000
Jul 12, 10:21:40.637 AM INFO org.apache.zookeeper.server.ZooKeeperServer
maxSessionTimeout set to 60000
Jul 12, 10:21:40.642 AM INFO org.apache.zookeeper.server.NIOServerCnxnFactory
binding to port /0.0.8.133:2181
Jul 12, 10:21:40.643 AM ERROR org.apache.zookeeper.server.ZooKeeperServerMain
Unexpected exception, exiting abnormally
java.net.BindException: Address already in use
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Net.java:444)
at sun.nio.ch.Net.bind(Net.java:436)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:214)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:67)
at org.apache.zookeeper.server.NIOServerCnxnFactory.configure(NIOServerCnxnFactory.java:95)
at org.apache.zookeeper.server.ZooKeeperServerMain.runFromConfig(ZooKeeperServerMain.java:116)
at org.apache.zookeeper.server.ZooKeeperServerMain.initializeAndRun(ZooKeeperServerMain.java:91)
at org.apache.zookeeper.server.ZooKeeperServerMain.main(ZooKeeperServerMain.java:53)
at org.apache.zookeeper.server.quorum.QuorumPeerMain.initializeAndRun(QuorumPeerMain.java:121)
at org.apache.zookeeper.server.quorum.QuorumPeerMain.main(QuorumPeerMain.java:79)

Jenkins Fails to Start

We have a server running FreeBSD 9.1-p17 and Jenkins. I interact with it via PuTTY. We upgraded from Jenkins 1.458 to 1.570, via FreeBSD's ports collection. Due to this problem with starting, we decided to reinstall.
First we uninstalled Jenkins, then we moved the main Jenkins folder (/usr/local/eweru-dev/jenkins) to a backup location, and reinstalled (again, from the ports collection). When we reinstalled, we kept the user 'jenkins' from the last install.
Now, when we try to start Jenkins, we get an error. The error below is from when we try to start it by navigating to /usr/local/share/jenkins and typing java -jar jenkins.war. When we try to run it as a service (with service jenkins onestart), we get a very similar message.
The exception looks similar to the one from this blog, but I have tried connecting Jenkins to openjdk 7 and 8 to no avail.
Is information from our old Jenkins install finding its way into this one, breaking stuff? Or maybe there's some compatibility issue with FreeBSD 9.1.
Running from: /usr/local/share/jenkins/jenkins.war
webroot: $user.home/.jenkins
Jul 18, 2014 10:53:51 AM winstone.Logger logInternal
INFO: Beginning extraction from war file
Jul 18, 2014 10:53:51 AM org.eclipse.jetty.util.log.JavaUtilLog info
INFO: jetty-8.y.z-SNAPSHOT
Jul 18, 2014 10:53:55 AM org.eclipse.jetty.util.log.JavaUtilLog info
INFO: NO JSP Support for , did not find org.apache.jasper.servlet.JspServlet
Jenkins home directory: /homes/maxerdwien/.jenkins found at: $user.home/.jenkins
Jul 18, 2014 10:53:55 AM hudson.util.BootFailure publish
SEVERE: Failed to initialize Jenkins
hudson.util.AWTProblem: java.lang.NullPointerException
at hudson.WebAppMain.contextInitialized(WebAppMain.java:182)
at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:782)
at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:424)
at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:774)
at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:249)
at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1242)
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:717)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:494)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95)
at org.eclipse.jetty.server.Server.doStart(Server.java:282)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at winstone.Launcher.<init>(Launcher.java:154)
at winstone.Launcher.main(Launcher.java:354)
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 Main._main(Main.java:293)
at Main.main(Main.java:98)
Caused by: java.lang.NullPointerException
at sun.awt.X11FontManager.getDefaultPlatformFont(X11FontManager.java:779)
at sun.font.SunFontManager$2.run(SunFontManager.java:433)
at java.security.AccessController.doPrivileged(Native Method)
at sun.font.SunFontManager.<init>(SunFontManager.java:376)
at sun.awt.X11FontManager.<init>(X11FontManager.java:32)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at java.lang.Class.newInstance(Class.java:374)
at sun.font.FontManagerFactory$1.run(FontManagerFactory.java:83)
at java.security.AccessController.doPrivileged(Native Method)
at sun.font.FontManagerFactory.getInstance(FontManagerFactory.java:74)
at java.awt.Font.getFont2D(Font.java:490)
at java.awt.Font.getFamily(Font.java:1219)
at java.awt.Font.getFamily_NoClientCode(Font.java:1193)
at java.awt.Font.getFamily(Font.java:1185)
at java.awt.Font.toString(Font.java:1682)
at hudson.util.ChartUtil.<clinit>(ChartUtil.java:229)
at hudson.WebAppMain.contextInitialized(WebAppMain.java:181)
... 19 more
Jul 18, 2014 10:53:56 AM org.eclipse.jetty.util.log.JavaUtilLog warn
WARNING: Failed startup of context w.{,file:/home/maxerdwien/.jenkins/war/},/homes/maxerdwien/.jenkins/war
java.lang.NullPointerException
at jenkins.util.groovy.GroovyHookScript.run(GroovyHookScript.java:63)
at hudson.util.BootFailure.publish(BootFailure.java:43)
at hudson.WebAppMain.contextInitialized(WebAppMain.java:244)
at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:782)
at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:424)
at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:774)
at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:249)
at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1242)
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:717)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:494)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95)
at org.eclipse.jetty.server.Server.doStart(Server.java:282)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at winstone.Launcher.<init>(Launcher.java:154)
at winstone.Launcher.main(Launcher.java:354)
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 Main._main(Main.java:293)
at Main.main(Main.java:98)
Jul 18, 2014 10:53:56 AM org.eclipse.jetty.util.log.JavaUtilLog info
INFO: Started SelectChannelConnector#0.0.0.0:8080
Jul 18, 2014 10:53:56 AM winstone.Logger logInternal
INFO: Winstone Servlet Engine v2.0 running: controlPort=disabled
Any help would be very appreciated. I've been googling for days.
The FreeBSD server is a headless server. So it doesn't have any graphics installed, including fonts.
For some reason, Jenkins tries to access fonts when it loads. This behavior can be suppressed by adding the option -Djava.awt.headless=true to the container JVM. This is the solution that worked for me.
It looks like some operating systems recognize this type of error, but FreeBSD does not. https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+got+java.awt.headless+problem
Check the permission of the jenkins folder. make sure the user run the jenkins server have the permission to access the folder.
For me -Djava.awt.headless=true didn't help at all. In fact, it's already specified in the Fedora default config, so chances are it's also in the default FreeBSD config. For me it missed the fontconfig package.
Details: http://vault-tec.info/post/98877792626/jenkins-service-unavailable
Am facing the same issue here, and adding -Djava.awt.headless=true doesn't help. I downloaded jenkins.war and tried running it using java -jar jenkins.war on windows 7 & 10 and it doesn't work. Am running java version,
java version "1.8.0_144"
Java(TM) SE Runtime Environment (build 1.8.0_144-b01)
Java HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode)
The solution that worked for me,
1. Uninstall all versions of java and updates from your system
2. Cleanup temporary files and registry (I used CCLeaner)
3. Download latest version from Oracle
4. Install and like this comment if this solution worked for you !
Additionally, try removing the .jenkins directory, if possible

GWT Development Mode error

When i try to execute the project, even the default "Web Application Project", I receive this error:
INFO: Module instance default is running at localhost:8888
apr 07, 2014 9:02:46 AM com.google.appengine.tools.development.AbstractModule startup
INFO: The admin console is running at localhost:8888/_ah/admin
apr 07, 2014 11:02:46 AM com.google.appengine.tools.development.DevAppServerImpl doStart
INFO: Dev App Server is now running
Exception in thread "Code server listener" java.lang.IllegalArgumentException: invalid host wildcard specification
at java.net.SocketPermission.init(Unknown Source)
at java.net.SocketPermission.(Unknown Source)
at java.lang.SecurityManager.checkConnect(Unknown Source)
at java.net.InetAddress.getHostFromNameService(Unknown Source)
at java.net.InetAddress.getCanonicalHostName(Unknown Source)
at com.google.gwt.dev.shell.BrowserListener$1.run(BrowserListener.java:78)
How can i resolve this error?
Thanks.
Do you get this error after first successful run? if yes then stop already running server instance and then restart the server.

After Java OutOfMemoryError, Tomcat Won't Start

After running my App in Tomcat many times, I've maxed out the PermGen memory (a problem with my quartz servlet, I suspect) and Java threw a OutOfMemoryError. Normally, I just restart tomcat from time to time, but since this happened I'm unable to start/restart. Tomcat is running in our qa environment and is normally started/stoped/restarted via the sbin folder. I've tried to start tomcat using the alternative, catalina.sh run, but it says the port is being used! That led me to suspect that tomcat was already running, but when I try to stop it, I get this error:
SEVERE: Could not contact localhost:8005. Tomcat may not be running.
Jan 19, 2014 3:10:58 PM org.apache.catalina.startup.Catalina
stopServer SEVERE: Catalina.stop: java.net.ConnectException:
Connection refused at java.net.PlainSocketImpl.socketConnect(Native
Method) at
java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
at
java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
at
java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at
java.net.Socket.connect(Socket.java:579) ...
So, if it's not started or stopped, then what state is tomcat in?! How can I bring it back to a startable state?
Update
As per Boris's comment, I've used ps auxfww to list processes and the only one with tomcat as the user is the following:
tomcat 5111 8.0 29.0 2052336 556512 ? Sl Jan17 221:48
/usr/java/latest/bin/java
-Djava.util.logging.config.file=/var/lib/tomcat/conf/logging.properties
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -javaagent:/usr/share/tomcat/newrelic/newrelic.jar -Xmx512m -Djava.awt.headless=true -Djava.endorsed.dirs=/usr/share/tomcat/endorsed -classpath /usr/share/tomcat/bin/bootstrap.jar:/usr/share/tomcat/bin/tomcat-juli.jar
-Dcatalina.base=/var/lib/tomcat -Dcatalina.home=/usr/share/tomcat -Djava.io.tmpdir=/var/lib/tomcat/temp org.apache.catalina.startup.Bootstrap start
For some reason, even as root, I can't delete the process. I use
sudo kill 5111
but the process is still listed after and tomcat still won't restart...
Read about kill here
sudo kill -9 5111 will do the work. Tomcat is binded to 8005 port: until you kill the process with a SIGKILL signal it won't release the port (and you are not allowed to start another tomcat on this port).

Jenkins headless linux slave connection error

I get java.net.SocketException: Connection reset when trying to connect a headless debian slave to my main Jenkins master. It's been running good for a couple of weeks without error and suddenly I can't get it to connect.
I can telnet into the master on port 6256.
Slave output:
#> java -jar ~/slave.jar -jnlpUrl https://test.tv/jenkins/computer/debian_slave_node_1/slave-agent.jnlp
Aug 12, 2013 10:10:46 AM hudson.remoting.jnlp.Main$CuiListener <init>
INFO: Hudson agent is running in headless mode.
Aug 12, 2013 10:10:46 AM hudson.remoting.jnlp.Main$CuiListener status
INFO: Locating server among [https://test.tv/jenkins/, http://test.tv/jenkins/]
Aug 12, 2013 10:10:46 AM hudson.remoting.jnlp.Main$CuiListener status
INFO: Connecting to test.tv:6256
Aug 12, 2013 10:10:46 AM hudson.remoting.jnlp.Main$CuiListener status
INFO: Handshaking
Aug 12, 2013 10:10:46 AM hudson.remoting.jnlp.Main$CuiListener error
SEVERE: Connection reset
java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:189)
at java.net.SocketInputStream.read(SocketInputStream.java:121)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:235)
at java.io.BufferedInputStream.read(BufferedInputStream.java:254)
at hudson.remoting.ClassicCommandTransport.create(ClassicCommandTransport.java:98)
at hudson.remoting.Channel.<init>(Channel.java:391)
at hudson.remoting.Channel.<init>(Channel.java:387)
at hudson.remoting.Channel.<init>(Channel.java:348)
at hudson.remoting.Channel.<init>(Channel.java:344)
at hudson.remoting.Channel.<init>(Channel.java:332)
at hudson.remoting.Engine.run(Engine.java:238)
Jenkins Master output:
java.io.IOException: Unexpected termination of the channel
at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:50)
Caused by: java.io.EOFException
at java.io.ObjectInputStream$BlockDataInputStream.peekByte(ObjectInputStream.java:2596)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1316)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
at hudson.remoting.Command.readFrom(Command.java:92)
at hudson.remoting.ClassicCommandTransport.read(ClassicCommandTransport.java:72)
at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:48)
Hard to say what happens before knowing more. In particular:
does it fail at every connection request ? If so please check your auth.log on your server as it seems the failure happens after "status INFO: Handshaking" and before "Connected"
are your clock properly synchronized ?
what OSes are you using ? Which java version on your slaves ? check your PATH and JAVA_HOME
have you updated jenkins lately ? If so, have you updated the slave(s) ? Also have you tried reverting the update ? Which version are you using ? 1.520 took out support for JDK 1.5.
how do you run your java command ? From a terminal in an SSH session ? Is this scripted from the master ?
See also Jenkins slave jobs failing on "Unexpected termination of channel"
I've run into the same issue, which seemed to be worked-around by running jenkins-slave as root. Now, the thing periodically disconnects with that very same error, which I'm wondering is due to a LB keepalive. I'll update this answer as soon as I get more info.
In my case everything was working under root account. But under user account, node client failed to connect to server with message "failed Unexpected termination of the channel".
The problem was with access-or-write to working folder. As soon as I've reassigned owner throug "chown -R", node starts successfully.

Categories