Jenkins: Remote call on JNLP4-connect connection failed

Автор: | 15/01/2019

Имеется Jenkins, для которого подключили новый слейв.

Слейв запущен на Mac Mini, и используется для iOS билдов.

Но во время запуска – возникает ошибка:

[EnvInject] – Injecting environment variables from a build step.
[EnvInject] – Injecting as environment variables the properties file path ‘propsfile’
[EnvInject] – Variables injected successfully.
FATAL: Remote call on JNLP4-connect connection from 194.***.***.28/194.***.***.28:59272 failed
Also: hudson.remoting.Channel$CallSiteStackTrace: Remote call to JNLP4-connect connection to jenkins.example.com/35.***.***.162:50000

Обсуждение ошибки можно найти например тут>>>.

Проверяем текущую версию Java:

[simterm]

Jenkins-Mac-mini-X:~ jenkinsci$ java -version
openjdk version "11.0.1" 2018-10-16

[/simterm]

Удаляем её:

[simterm]

Jenkins-Mac-mini-X:~ jenkinsci$ brew cask uninstall java
==> Uninstalling Cask java
==> Running uninstall process for java; your password may be necessary
==> Removing files:
/Library/Java/JavaVirtualMachines/openjdk-11.0.1.jdk
==> Purging files for version 11.0.1,13 of Cask java

[/simterm]

Подключаем расширенный репозиторий:

[simterm]

Jenkins-Mac-mini-X:~ jenkinsci$ brew tap caskroom/versions
==> Tapping homebrew/cask-versions
Cloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask-versions'...
The authenticity of host 'github.com (140.82.118.4)' can't be established.
RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'github.com,140.82.118.4' (RSA) to the list of known hosts.
remote: Enumerating objects: 232, done.
remote: Counting objects: 100% (232/232), done.
remote: Compressing objects: 100% (225/225), done.
remote: Total 232 (delta 15), reused 46 (delta 5), pack-reused 0
Receiving objects: 100% (232/232), 93.39 KiB | 1.18 MiB/s, done.
Resolving deltas: 100% (15/15), done.
Tapped 209 casks (252 files, 356.6KB)

[/simterm]

Проверяем наличие версии 8:

[simterm]

Jenkins-Mac-mini-X:~ jenkinsci$ brew cask info java8
java8: 1.8.0_192-b12,750e1c8617c5452694857ad95c3ee230
https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
Not installed
From: https://github.com/Homebrew/homebrew-cask-versions/blob/master/Casks/java8.rb
==> Name
Java Standard Edition Development Kit
==> Artifacts
JDK 8 Update 192.pkg (Pkg)
==> Caveats
This Cask makes minor modifications to the JRE to prevent issues with
packaged applications, as discussed here:

  https://bugs.eclipse.org/bugs/show_bug.cgi?id=411361

If your Java application still asks for JRE installation, you might need
to reboot or logout/login.

Installing java8 means you have AGREED to the license at
  https://www.oracle.com/technetwork/java/javase/terms/license/index.html

[/simterm]

Устанавливаем её:

[simterm]

Jenkins-Mac-mini-X:~ jenkinsci$ brew cask install java8

[/simterm]

Проверяем версию:

[simterm]

Jenkins-Mac-mini-X:~ jenkinsci$ java -version
java version "1.8.0_192"
Java(TM) SE Runtime Environment (build 1.8.0_192-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.192-b12, mixed mode)

[/simterm]

Перезапускаем агент (см. пост macOS: launchctl – запуск/остановка сервисов на примере Jenkins slave агента):

[simterm]

# launchctl unload /Library/LaunchDaemons/com.jenkins.slave.plist
# launchctl load /Library/LaunchDaemons/com.jenkins.slave.plist

[/simterm]

Повторяем билд:


Using context: Unit Test
[WS-CLEANUP] Deleting project workspace…[WS-CLEANUP] done
Finished: SUCCESS

Готово.