com.jcraft.jsch.JSchException: java.net.UnknownHostException: ${builder_ip}

Jenkins JIRA | Peter Kline | 4 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    We have a need to pass in a variable from a slave node to connect to a certain IP address to execute the script. For example, our master runs a job on slave1. Slave1 has an environment variable configured of: builder_ip=10.1.1.181 As seen below the echo command is the ${builder_ip}. I need the ssh site name to interpolate that variable as well. {panel} Started by user anonymous [EnvInject] - Loading node environment variables. Building remotely on vmdkDriver1 in workspace /tmp/workspace/concurrency_test [concurrency_test] $ /bin/sh -xe /tmp/hudson4711012832981264076.sh + echo 10.1.1.181 10.1.1.181 executing script: hostname ifconfig eth0 [SSH] Exception:java.net.UnknownHostException: ${builder_ip} com.jcraft.jsch.JSchException: java.net.UnknownHostException: ${builder_ip} at com.jcraft.jsch.Util.createSocket(Util.java:341) at com.jcraft.jsch.Session.connect(Session.java:182) at com.jcraft.jsch.Session.connect(Session.java:150) at org.jvnet.hudson.plugins.SSHSite.createSession(SSHSite.java:118) at org.jvnet.hudson.plugins.SSHSite.executeCommand(SSHSite.java:128) at org.jvnet.hudson.plugins.SSHBuilder.perform(SSHBuilder.java:60) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:804) at hudson.model.Build$BuildExecution.build(Build.java:199) at hudson.model.Build$BuildExecution.doRun(Build.java:160) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:586) at hudson.model.Run.execute(Run.java:1576) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:241) Caused by: java.net.UnknownHostException: ${builder_ip} at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:175) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:384) at java.net.Socket.connect(Socket.java:546) at java.net.Socket.connect(Socket.java:495) at java.net.Socket.<init>(Socket.java:392) at java.net.Socket.<init>(Socket.java:206) at com.jcraft.jsch.Util.createSocket(Util.java:335) ... 14 more Build step 'Execute shell script on remote host using ssh' marked build as failure Finished: FAILURE {panel}

    Jenkins JIRA | 4 years ago | Peter Kline
    com.jcraft.jsch.JSchException: java.net.UnknownHostException: ${builder_ip}
  2. 0

    We have a need to pass in a variable from a slave node to connect to a certain IP address to execute the script. For example, our master runs a job on slave1. Slave1 has an environment variable configured of: builder_ip=10.1.1.181 As seen below the echo command is the ${builder_ip}. I need the ssh site name to interpolate that variable as well. {panel} Started by user anonymous [EnvInject] - Loading node environment variables. Building remotely on vmdkDriver1 in workspace /tmp/workspace/concurrency_test [concurrency_test] $ /bin/sh -xe /tmp/hudson4711012832981264076.sh + echo 10.1.1.181 10.1.1.181 executing script: hostname ifconfig eth0 [SSH] Exception:java.net.UnknownHostException: ${builder_ip} com.jcraft.jsch.JSchException: java.net.UnknownHostException: ${builder_ip} at com.jcraft.jsch.Util.createSocket(Util.java:341) at com.jcraft.jsch.Session.connect(Session.java:182) at com.jcraft.jsch.Session.connect(Session.java:150) at org.jvnet.hudson.plugins.SSHSite.createSession(SSHSite.java:118) at org.jvnet.hudson.plugins.SSHSite.executeCommand(SSHSite.java:128) at org.jvnet.hudson.plugins.SSHBuilder.perform(SSHBuilder.java:60) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:804) at hudson.model.Build$BuildExecution.build(Build.java:199) at hudson.model.Build$BuildExecution.doRun(Build.java:160) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:586) at hudson.model.Run.execute(Run.java:1576) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:241) Caused by: java.net.UnknownHostException: ${builder_ip} at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:175) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:384) at java.net.Socket.connect(Socket.java:546) at java.net.Socket.connect(Socket.java:495) at java.net.Socket.<init>(Socket.java:392) at java.net.Socket.<init>(Socket.java:206) at com.jcraft.jsch.Util.createSocket(Util.java:335) ... 14 more Build step 'Execute shell script on remote host using ssh' marked build as failure Finished: FAILURE {panel}

    Jenkins JIRA | 4 years ago | Peter Kline
    com.jcraft.jsch.JSchException: java.net.UnknownHostException: ${builder_ip}
  3. 0

    Need help in setting up OdiSftpPut - Data Integrator

    developer-works.com | 11 months ago
    org.apache.commons.vfs.FileSystemException: Could not connect to SFTP server at "sftp://targetserverhyperion/".
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Need help in setting up OdiSftpPut

    Oracle Community | 7 years ago | 666728
    org.apache.commons.vfs.FileSystemException: Could not connect to SFTP server at "sftp://targetserverhyperion/".
  6. 0

    Connection to Db

    Google Groups | 9 years ago | Vedran
    org.postgresql.util.PSQLException: The connection attempt failed.

  1. jstrayer 1 times, last 3 months ago
  2. Gatgeagent 3 times, last 5 months ago
8 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.net.UnknownHostException

    ${builder_ip}

    at java.net.AbstractPlainSocketImpl.connect()
  2. Java RT
    Socket.<init>
    1. java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:175)
    2. java.net.SocksSocketImpl.connect(SocksSocketImpl.java:384)
    3. java.net.Socket.connect(Socket.java:546)
    4. java.net.Socket.connect(Socket.java:495)
    5. java.net.Socket.<init>(Socket.java:392)
    6. java.net.Socket.<init>(Socket.java:206)
    6 frames
  3. JSch
    Session.connect
    1. com.jcraft.jsch.Util.createSocket(Util.java:335)
    2. com.jcraft.jsch.Session.connect(Session.java:182)
    3. com.jcraft.jsch.Session.connect(Session.java:150)
    3 frames
  4. org.jvnet.hudson
    SSHBuilder.perform
    1. org.jvnet.hudson.plugins.SSHSite.createSession(SSHSite.java:118)
    2. org.jvnet.hudson.plugins.SSHSite.executeCommand(SSHSite.java:128)
    3. org.jvnet.hudson.plugins.SSHBuilder.perform(SSHBuilder.java:60)
    3 frames
  5. Hudson
    Executor.run
    1. hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
    2. hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:804)
    3. hudson.model.Build$BuildExecution.build(Build.java:199)
    4. hudson.model.Build$BuildExecution.doRun(Build.java:160)
    5. hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:586)
    6. hudson.model.Run.execute(Run.java:1576)
    7. hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
    8. hudson.model.ResourceController.execute(ResourceController.java:88)
    9. hudson.model.Executor.run(Executor.java:241)
    9 frames