今日はやたらyak shavingした日なのでブログに残しておこう。( TДT)

いつの間にかLinux Slaveが起動しなくなってた


[06/29/17 19:31:05] [SSH] スレーブのプロセスを開始: cd "/home/jenkins" && java  -jar slave.jar

<===[JENKINS REMOTING CAPACITY]===>channel started

Slave JVM has not reported exit code. Is it still running?
[06/29/17 19:31:09] Launch failed - cleaning up connection
[06/29/17 19:31:09] [SSH] コネクション終了
ERROR: Connection terminated
    at hudson.remoting.ObjectInputStreamEx.<init>(
    at hudson.remoting.SynchronousCommandTransport$
Caused: Unexpected termination of the channel
    at hudson.remoting.SynchronousCommandTransport$

あらら? Slave JVM has not reported exit code. Is it still running? をぐぐってみるとどうやらJavaのバージョンに依存するエラーらしい。今まではJava7で動いていたのがだめになったんだろうか・・・


ubuntu 14.04なのでPPAで入れることにしました。

$ sudo apt-get install python-software-properties
$ sudo add-apt-repository ppa:webupd8team/ppa
 Oracle Java (JDK) Installer (automatically downloads and installs Oracle JDK7 / JDK8 / JDK9). There are no actual Java files in this PPA.

Important -> Why Oracle Java 7 And 6 Installers No Longer Work:

More info (and Ubuntu installation instructions):
- for Oracle Java 7:
- for Oracle Java 8:

Debian installation instructions:
- Oracle Java 7:
- Oracle Java 8:

Oracle Java 9 (for both Ubuntu and Debian):

For JDK9, the PPA uses standard builds from: (and not the Jigsaw builds!).

Important!!! For now, you should continue to use Java 8 because Oracle Java 9 is available as an early access release! You should only use Oracle Java 9 if you explicitly need it, because it may contain bugs and it might not include the latest security patches! Also, some Java options were removed in JDK9, so you may encounter issues with various Java apps. More information and installation instructions (Ubuntu / Linux Mint / Debian):
 More info:
Press [ENTER] to continue or ctrl-c to cancel adding it

gpg: keyring `/tmp/tmp7j4t0u3c/secring.gpg' created
gpg: keyring `/tmp/tmp7j4t0u3c/pubring.gpg' created
gpg: requesting key EEA14886 from hkp server
gpgkeys: key 7B2C3B0889BF5709A105D03AC2518248EEA14886 can't be retrieved
gpg: no valid OpenPGP data found.
gpg: Total number processed: 0



$ sudo apt-key adv --keyserve

r hkp:// --keyserver-options http-proxy= --recv-keys EEA14886

Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --homedir /tmp/tmp.JJ3XwYe2dV --no-auto-check-trustdb --trust-model always --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyserver hkp:// --keyserver-options http-proxy= --recv-keys EEA14886
gpg: requesting key EEA14886 from hkp server
gpg: key EEA14886: public key "Launchpad VLC" imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)


$ sudo aptitude update
$ sudo aptitude install oracle-java8-installer

$ sudo java -version
java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)
root@ci-slave-linux1:/etc/apt/sources.list.d# ls


[06/29/17 19:49:45] [SSH] スレーブのプロセスを開始: cd "/home/jenkins" && java  -jar slave.jar
<===[JENKINS REMOTING CAPACITY]===>channel started
Slave.jar version: 3.7
This is a Unix agent
Evacuated stdout

Agent successfully connected and online