• Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • core
    • None

      Hi All,

      I have a Jenkins 2.28 server running on CentOS 7 with a CentOS 7 headless slave that has been  running fine for over a year. I have just created an Ubuntu 16.04.2 VM as a headless slave. I created a new node for it. However, the slave agent would not start. Java core dumps every time it runs. I have tried with the latest Java as well as the version the CentOS 7 slave uses.

      On the master, the error states that the connection was terminated. Further down the chain, it mentions Failed to install restarter and then further down, it mentions Failed to update jenkins-slave.exe: remote file operation failed: /media/data/Jenkins/Jenkins-slave.exe at Hudson.remoting.Channel@28828357: Chanel to /##.###.##.##.

      Why is it trying to update a Windows executable on a Linux slave. At the beginning of the log, it states that it is dealing with a Unix agent.

      I don't get any error messages from Java on the slave itself. It just throws a SIGSEGV.

      I tried googling the above errors without any luck. I am at wits end at the moment so all help is greatly appreciated.

       

          [JENKINS-47011] Ubuntu headless slave connection issue

          vlad guan added a comment -

          I have just updated to the latest Jenkins 2.79 and have the same issues.

          vlad guan added a comment - I have just updated to the latest Jenkins 2.79 and have the same issues.

          Oleg Nenashev added a comment -

          vladguan please provide a full stacktrace of the error

          Oleg Nenashev added a comment - vladguan please provide a full stacktrace of the error

          vlad guan added a comment -

          JNLP agent connected from ****.com/.*..*
          Remoting version: 3.12
          This is a Unix agent
          ERROR: Connection terminated
          java.nio.channels.ClosedChannelException
           at org.jenkinsci.remoting.protocol.NetworkLayer.onRecvClosed(NetworkLayer.java:154)
           at org.jenkinsci.remoting.protocol.impl.NIONetworkLayer.ready(NIONetworkLayer.java:142)
           at org.jenkinsci.remoting.protocol.IOHub$OnReady.run(IOHub.java:721)
           at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
           at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
           at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
           at java.lang.Thread.run(Thread.java:745)
          ERROR: Failed to install restarter
          java.nio.channels.ClosedChannelException
           at org.jenkinsci.remoting.protocol.NetworkLayer.onRecvClosed(NetworkLayer.java:154)
           at org.jenkinsci.remoting.protocol.impl.NIONetworkLayer.ready(NIONetworkLayer.java:142)
           at org.jenkinsci.remoting.protocol.IOHub$OnReady.run(IOHub.java:721)
           at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
          Caused: hudson.remoting.ChannelClosedException: Remote call on JNLP4-connect connection from ****.com/.*..*:44882 failed. The channel is closing down or has closed down
           at hudson.remoting.Channel.call(Channel.java:897)
           at jenkins.slaves.restarter.JnlpSlaveRestarterInstaller.install(JnlpSlaveRestarterInstaller.java:53)
           at jenkins.slaves.restarter.JnlpSlaveRestarterInstaller.access$000(JnlpSlaveRestarterInstaller.java:34)
           at jenkins.slaves.restarter.JnlpSlaveRestarterInstaller$1.call(JnlpSlaveRestarterInstaller.java:40)
           at jenkins.slaves.restarter.JnlpSlaveRestarterInstaller$1.call(JnlpSlaveRestarterInstaller.java:37)
           at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46)
           at java.util.concurrent.FutureTask.run(FutureTask.java:266)
           at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
           at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
           at java.lang.Thread.run(Thread.java:745)
          Agent successfully connected and online
          ERROR: Failed to update jenkins-slave.exe
          java.io.IOException: remote file operation failed: /media/data/jenkins/jenkins-slave.exe at hudson.remoting.Channel@7607078e:JNLP4-connect connection from ****.com/.*..:44882: hudson.remoting.ChannelClosedException: Remote call on JNLP4-connect connection from *****.com/.*..*:44882 failed. The channel is closing down or has closed down
           at hudson.FilePath.act(FilePath.java:994)
           at hudson.FilePath.act(FilePath.java:976)
           at hudson.FilePath.exists(FilePath.java:1441)
           at org.jenkinsci.modules.windows_slave_installer.SlaveExeUpdater$1.call(SlaveExeUpdater.java:62)
           at org.jenkinsci.modules.windows_slave_installer.SlaveExeUpdater$1.call(SlaveExeUpdater.java:53)
           at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46)
           at java.util.concurrent.FutureTask.run(FutureTask.java:266)
           at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
           at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
           at java.lang.Thread.run(Thread.java:745)
          Caused by: hudson.remoting.ChannelClosedException: Remote call on JNLP4-connect connection from ****.com/.*..*:44882 failed. The channel is closing down or has closed down
           at hudson.remoting.Channel.call(Channel.java:897)
           at hudson.FilePath.act(FilePath.java:987)
           ... 9 more
          Caused by: java.nio.channels.ClosedChannelException
           at org.jenkinsci.remoting.protocol.NetworkLayer.onRecvClosed(NetworkLayer.java:154)
           at org.jenkinsci.remoting.protocol.impl.NIONetworkLayer.ready(NIONetworkLayer.java:142)
           at org.jenkinsci.remoting.protocol.IOHub$OnReady.run(IOHub.java:721)
           at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
           ... 3 more

          vlad guan added a comment - JNLP agent connected from **** .com/ . * . . * Remoting version: 3.12 This is a Unix agent ERROR: Connection terminated java.nio.channels.ClosedChannelException  at org.jenkinsci.remoting.protocol.NetworkLayer.onRecvClosed(NetworkLayer.java:154)  at org.jenkinsci.remoting.protocol.impl.NIONetworkLayer.ready(NIONetworkLayer.java:142)  at org.jenkinsci.remoting.protocol.IOHub$OnReady.run(IOHub.java:721)  at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)  at java.lang.Thread.run(Thread.java:745) ERROR: Failed to install restarter java.nio.channels.ClosedChannelException  at org.jenkinsci.remoting.protocol.NetworkLayer.onRecvClosed(NetworkLayer.java:154)  at org.jenkinsci.remoting.protocol.impl.NIONetworkLayer.ready(NIONetworkLayer.java:142)  at org.jenkinsci.remoting.protocol.IOHub$OnReady.run(IOHub.java:721)  at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28) Caused: hudson.remoting.ChannelClosedException: Remote call on JNLP4-connect connection from **** .com/ . * . . *:44882 failed. The channel is closing down or has closed down  at hudson.remoting.Channel.call(Channel.java:897)  at jenkins.slaves.restarter.JnlpSlaveRestarterInstaller.install(JnlpSlaveRestarterInstaller.java:53)  at jenkins.slaves.restarter.JnlpSlaveRestarterInstaller.access$000(JnlpSlaveRestarterInstaller.java:34)  at jenkins.slaves.restarter.JnlpSlaveRestarterInstaller$1.call(JnlpSlaveRestarterInstaller.java:40)  at jenkins.slaves.restarter.JnlpSlaveRestarterInstaller$1.call(JnlpSlaveRestarterInstaller.java:37)  at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46)  at java.util.concurrent.FutureTask.run(FutureTask.java:266)  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)  at java.lang.Thread.run(Thread.java:745) Agent successfully connected and online ERROR: Failed to update jenkins-slave.exe java.io.IOException: remote file operation failed: /media/data/jenkins/jenkins-slave.exe at hudson.remoting.Channel@7607078e:JNLP4-connect connection from **** .com/ . * . . :44882: hudson.remoting.ChannelClosedException: Remote call on JNLP4-connect connection from *****.com/ . * . . *:44882 failed. The channel is closing down or has closed down  at hudson.FilePath.act(FilePath.java:994)  at hudson.FilePath.act(FilePath.java:976)  at hudson.FilePath.exists(FilePath.java:1441)  at org.jenkinsci.modules.windows_slave_installer.SlaveExeUpdater$1.call(SlaveExeUpdater.java:62)  at org.jenkinsci.modules.windows_slave_installer.SlaveExeUpdater$1.call(SlaveExeUpdater.java:53)  at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46)  at java.util.concurrent.FutureTask.run(FutureTask.java:266)  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)  at java.lang.Thread.run(Thread.java:745) Caused by: hudson.remoting.ChannelClosedException: Remote call on JNLP4-connect connection from **** .com/ . * . . *:44882 failed. The channel is closing down or has closed down  at hudson.remoting.Channel.call(Channel.java:897)  at hudson.FilePath.act(FilePath.java:987)  ... 9 more Caused by: java.nio.channels.ClosedChannelException  at org.jenkinsci.remoting.protocol.NetworkLayer.onRecvClosed(NetworkLayer.java:154)  at org.jenkinsci.remoting.protocol.impl.NIONetworkLayer.ready(NIONetworkLayer.java:142)  at org.jenkinsci.remoting.protocol.IOHub$OnReady.run(IOHub.java:721)  at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)  ... 3 more

          Oleg Nenashev added a comment -

          1) It is not trying to install jenkins-slave.exe. It just tries to check whether it exists before updating. The message is definitely confusing, maybe it deserves a follow-up ticket. Windows Slave Installer should also consult with the isUnix flag(). Created JENKINS-47015 for it

          2) Operations report issues, because the channel gets terminated. onRecvClosed() usually means a TCP session disconnect by something within the network (e.g. router shuts down, proxy rejects connection, etc.)

          Oleg Nenashev added a comment - 1) It is not trying to install jenkins-slave.exe. It just tries to check whether it exists before updating. The message is definitely confusing, maybe it deserves a follow-up ticket. Windows Slave Installer should also consult with the isUnix flag(). Created JENKINS-47015 for it 2) Operations report issues, because the channel gets terminated. onRecvClosed() usually means a TCP session disconnect by something within the network (e.g. router shuts down, proxy rejects connection, etc.)

          vlad guan added a comment -

          I am still having issues with the Ubuntu VM. I even changed it to use SSH with password and SSH with private key and it still fails. SSH succeeds but then Java just crashes.

          I then realised I have a Fedrora 21 VM so just copied over the shell script to start the slave, created a headless slave and it connected without issues.

          Is there an inherent issue with Ubuntu?

          Cheers,
          Vlad

          vlad guan added a comment - I am still having issues with the Ubuntu VM. I even changed it to use SSH with password and SSH with private key and it still fails. SSH succeeds but then Java just crashes. I then realised I have a Fedrora 21 VM so just copied over the shell script to start the slave, created a headless slave and it connected without issues. Is there an inherent issue with Ubuntu? Cheers, Vlad

            Unassigned Unassigned
            vladguan vlad guan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: