sudo java -jar agent.jar -jnlpUrl http://18.218.111.188:8080/computer/slave/slave-agent.jnlp -secret 5f919a663ea1bae3240635681a222f3f3113580a1c63dff7900553d7a21868fd -workDir "jenkins/workspace"
Jun 03, 2018 6:56:50 PM org.jenkinsci.remoting.engine.WorkDirManager initializeWorkDir
INFO: Using jenkins/workspace/remoting as a remoting work directory
Both error and output logs will be printed to jenkins/workspace/remoting
Jun 03, 2018 6:56:50 PM hudson.remoting.jnlp.Main createEngine
INFO: Setting up agent: slave
Jun 03, 2018 6:56:50 PM hudson.remoting.jnlp.Main$CuiListener <init>
INFO: Jenkins agent is running in headless mode.
Jun 03, 2018 6:56:50 PM org.jenkinsci.remoting.engine.WorkDirManager initializeWorkDir
INFO: Using /home/ubuntu/jenkins/workspace/remoting as a remoting work directory
Jun 03, 2018 6:56:50 PM hudson.remoting.jnlp.Main$CuiListener status
INFO: Locating server among http://18.218.111.188:8080/
Jun 03, 2018 6:56:50 PM org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver resolve
INFO: Remoting server accepts the following protocols: [JNLP4-connect, Ping]
Jun 03, 2018 6:56:50 PM hudson.remoting.jnlp.Main$CuiListener status
INFO: Agent discovery successful
Agent address: 18.218.111.188
Agent port: 33083
Identity: 2d:7c:59:2f:61:7d:d0:15:a2:89:6f:e1:e5:6f:e3:d9
Jun 03, 2018 6:56:50 PM hudson.remoting.jnlp.Main$CuiListener status
INFO: Handshaking
Jun 03, 2018 6:56:50 PM hudson.remoting.jnlp.Main$CuiListener status
INFO: Connecting to 18.218.111.188:33083
Jun 03, 2018 6:59:07 PM hudson.remoting.jnlp.Main$CuiListener status
INFO: Connecting to 18.218.111.188:33083 (retrying:2)
java.io.IOException: Failed to connect to 18.218.111.188:33083
at org.jenkinsci.remoting.engine.JnlpAgentEndpoint.open(JnlpAgentEndpoint.java:242)
at hudson.remoting.Engine.connect(Engine.java:686)
at hudson.remoting.Engine.innerRun(Engine.java:547)
at hudson.remoting.Engine.run(Engine.java:469)
Caused by: java.net.ConnectException: Connection timed out
at sun.nio.ch.Net.connect0(Native Method)
at sun.nio.ch.Net.connect(Net.java:454)
at sun.nio.ch.Net.connect(Net.java:446)
at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:648)
at java.nio.channels.SocketChannel.open(SocketChannel.java:189)
at org.jenkinsci.remoting.engine.JnlpAgentEndpoint.open(JnlpAgentEndpoint.java:203)
... 3 more