Connection error from jenkins server and agent - jenkins

I'm connecting agent node to server.
When I try connecting with jenkins server, error occurs. Below are the log.
Failed to obtain
http://12.36.123.160:8080/computer/rsp18/jenkins-agent.jnlp?encrypt=true
java.io.IOException: Invalid Http response
at sun.reflect.GeneratedConstructorAccessor3.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1950)
at sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1945)
at java.security.AccessController.doPrivileged(Native Method)
at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1944)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1514)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1498)
at hudson.remoting.Launcher.parseJnlpArguments(Launcher.java:523)
at hudson.remoting.Launcher.run(Launcher.java:347)
at hudson.remoting.Launcher.main(Launcher.java:298) Caused by: java.io.IOException: Invalid Http response
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1612)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1498)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480)
at hudson.remoting.Launcher.parseJnlpArguments(Launcher.java:513)
... 2 more Waiting 10 seconds before retry
I thought I lost connection to internet in agent machine, but ping operation seems okay.
> root#ubuntu:~# ping -c 5 12.36.123.160 PING 12.36.123.160
> (12.36.123.160) 56(84) bytes of data. 64 bytes from 12.36.123.160:
> icmp_seq=1 ttl=59 time=0.262 ms 64 bytes from 12.36.123.160:
> icmp_seq=2 ttl=59 time=0.245 ms 64 bytes from 12.36.123.160:
> icmp_seq=3 ttl=59 time=0.259 ms 64 bytes from 12.36.123.160:
> icmp_seq=4 ttl=59 time=0.249 ms 64 bytes from 12.36.123.160:
> icmp_seq=5 ttl=59 time=0.233 ms
> --- 12.36.123.160 ping statistics --- 5 packets transmitted, 5 received, 0% packet loss, time 4102ms rtt min/avg/max/mdev =
> 0.233/0.249/0.262/0.010 ms
connection to jenkins server is good, and my server is okay.
What's wrong with this problem?

Related

Continue despite failed packet when using tcpreplay

I am trying to use tcpreplay to send the contents of a pcap file. It is refusing to send some packets because they are too long. However, instead of continuing with the next packet, it stops:
$ tcpreplay -i p4p1 multi.pcap
Warning: May need to run as root to get access to all network interfaces.
Warning: Unable to send packet: Error with PF_PACKET send() [444]: Message too long (errno = 90)
Actual: 443 packets (63852 bytes) sent in 0.203486 seconds
Rated: 313790.6 Bps, 2.51 Mbps, 2177.05 pps
Flows: 115 flows, 565.14 fps, 405 flow packets, 39 non-flow
Statistics for network device: p4p1
Successful packets: 443
Failed packets: 1
Truncated packets: 0
Retried packets (ENOBUFS): 0
Retried packets (EAGAIN): 0
I would like to skip failed packets and send the rest.
I was having the same problem with several files, especially with streaming. Example:
~# tcpreplay -i eth1 -t -K facebook_audio2b.pcapng
File Cache is enabled
Warning: Unable to send packet: Error with PF_PACKET send() [1611]: Message
too long (errno = 90)
Actual: 1610 packets (382007 bytes) sent in 0.021233 seconds
Rated: 17991192.9 Bps, 143.92 Mbps, 75825.36 pps
Flows: 71 flows, 3343.85 fps, 94008 flow packets, 84 non-flow
Statistics for network device: eth1
Successful packets: 1610
Failed packets: 1
Truncated packets: 0
Retried packets (ENOBUFS): 0
Retried packets (EAGAIN): 0
I
So I followed the FAQ on the Tcpreplay website at the [link].(https://tcpreplay.appneta.com/wiki/faq.html#packet-length-8892-is-greater-then-mtu-skipping-packet) that says:
In case the packet is larger than the MTU, a alternatively, you can specify the tcpreplay-edit --mtu-trunc option - packets will be truncated to the MTU size, the checksums will be fixed and then sent. Note that this may impact performance.
It works for me in the next run:
~# tcpreplay-edit --mtu-trunc -i eth1 -t -K facebook_audio2b.pcapng
File Cache is enabled
Actual: 94092 packets (14586277 bytes) sent in 0.847842 seconds
Rated: 17204003.8 Bps, 137.63 Mbps, 110978.22 pps
Flows: 71 flows, 83.74 fps, 94008 flow packets, 84 non-flow
Statistics for network device: eth1
Successful packets: 94092
Failed packets: 0
Truncated packets: 0
Retried packets (ENOBUFS): 0
Retried packets (EAGAIN): 0
The reason you receive "Message too long" is because the MTU on your network interface is smaller than your packet size.
You can increase the MTU size of your system and than all packets on the pcap will be sent.
In Linux from user root you can use the command: ifconfig {interface} mtu {New Size}

Connection refused for application hosted over docker swarm

I have a docker swarm running on 2 nodes created via Oracle VirtualBox installed on CentOS 7. I am able to deploy a stack running 6 containers equally distributed over the two machines.
However, I am unable to connect to the deployed application with ports exposed.
Here's the content of my Docker Compose File
version: "3"
services:
web:
image: <myusername>/friendlyhello:latest
deploy:
replicas: 6
resources:
limits:
cpus: "0.1"
memory: 50M
restart_policy:
condition: on-failure
ports:
- "80:80"
networks:
- webnet
networks:
webnet:
Here is the output of docker-machine ls:
NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS
myvm1 * virtualbox Running tcp://192.168.99.100:2376 v18.09.0
myvm2 - virtualbox Running tcp://192.168.99.101:2376 v18.09.0
Here is the error from my curl command
curl http://192.168.99.100/
curl: (7) Failed connect to 192.168.99.100:80; Connection refused
Even though my application seems to be running fine.
docker service ls
ID NAME MODE REPLICAS IMAGE PORTS
i5nw2wcir9j3 getstartedlab_web replicated 6/6 harmanspall/friendlyhello:latest *:80->80/tcp
docker service ps getstartedlab_web
ID NAME IMAGE NODE DESIRED STATE CURRENT STATE ERROR PORTS
dn7mrfo1yvg4 getstartedlab_web.1 harmanspall/friendlyhello:latest myvm1 Running Running 28 minutes ago
jxkr1psbvmpc getstartedlab_web.2 harmanspall/friendlyhello:latest myvm2 Running Running 28 minutes ago
jttd4t6b9gz5 getstartedlab_web.3 harmanspall/friendlyhello:latest myvm1 Running Running 28 minutes ago
zhs0c7ygj8cs getstartedlab_web.4 harmanspall/friendlyhello:latest myvm2 Running Running 28 minutes ago
mx6gykk3qocd getstartedlab_web.5 harmanspall/friendlyhello:latest myvm1 Running Running 28 minutes ago
pku7f60ij0bq getstartedlab_web.6 harmanspall/friendlyhello:latest myvm2 Running Running 28 minutes ago
My Docker network list, as seen from Swarm Manager:
NETWORK ID NAME DRIVER SCOPE
5c502a957a70 bridge bridge local
a3b1f749c09f docker_gwbridge bridge local
80nens8mmp6i getstartedlab_webnet overlay swarm
c9647a0f6c30 host host local
mj60zgzhiwjf ingress overlay swarm
5adba823ce78 none null local
Any pointers would be appreciated.
~~ EDIT ~~
This does not seem to be an issue with connectivity to VMs since I am able to ping my Virtualbox
ping 192.168.99.100 -c 5
PING 192.168.99.100 (192.168.99.100) 56(84) bytes of data.
64 bytes from 192.168.99.100: icmp_seq=1 ttl=64 time=0.246 ms
64 bytes from 192.168.99.100: icmp_seq=2 ttl=64 time=0.215 ms
64 bytes from 192.168.99.100: icmp_seq=3 ttl=64 time=0.226 ms
64 bytes from 192.168.99.100: icmp_seq=4 ttl=64 time=0.251 ms
64 bytes from 192.168.99.100: icmp_seq=5 ttl=64 time=0.262 ms
--- 192.168.99.100 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 3999ms
rtt min/avg/max/mdev = 0.215/0.240/0.262/0.017 ms
It also fails when I try curl from inside the VM
docker-machine ssh myvm1 "curl http://192.168.99.100/"
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0curl: (7) Failed to connect to 192.168.99.100 port 80: Connection refused
exit status 7
docker-machine ssh myvm1 "curl http://localhost/"
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0curl: (7) Failed to connect to localhost port 80: Connection refused
exit status 7

Mule project is not showing on http://0.0.0.0:8080 after deployment in docketed container

Mule container is running as per following log :details are in code block.
INFO 2017-08-20 14:53:50,580 [WrapperListener_start_runner] org.mule.runtime.module.launcher.MuleContainer:
**********************************************************************
* Mule Runtime and Integration Platform *
* Version: 4.0.0-BETA.4 Build: c03a2009 *
* MuleSoft, Inc. *
* For more information go to https://developer.mulesoft.com/ *
* *
* Server started: 8/20/17 2:53 PM *
* JDK: 1.8.0_131 (mixed mode) *
* OS: Linux (4.4.0-1022-aws, amd64) *
* Host: b2c75bd67158 (172.17.0.2) *
* Mule services: *
* - mule-service-oauth-1.0.0-BETA.4.zip *
* - mule-service-scheduler-1.0.0-BETA.4.zip *
* - mule-service-soap-1.0.0-BETA.4.zip *
* - mule-service-http-1.0.0-BETA.4.zip *
* - mule-service-weave-2.0.0-BETA.4.zip *
* Mule system properties: *
* - mule.base = /opt/mule *
* - mule.home = /opt/mule *
**********************************************************************
INFO 2017-08-20 14:53:50,584 [WrapperListener_start_runner] org.mule.runtime.module.launcher.coreextension.DefaultMuleCoreExtensionManagerServer: Initializing core extensions
INFO 2017-08-20 14:53:50,584 [WrapperListener_start_runner] org.mule.runtime.module.launcher.coreextension.DefaultMuleCoreExtensionManagerServer: Starting core extensions
INFO 2017-08-20 14:53:51,113 [WrapperListener_start_runner] org.mule.service.scheduler.internal.DefaultSchedulerService: Starting org.mule.service.scheduler.internal.DefaultSchedulerService#3cb32d0e...
INFO 2017-08-20 14:53:51,127 [WrapperListener_start_runner] org.mule.service.scheduler.internal.DefaultSchedulerService: Started org.mule.service.scheduler.internal.DefaultSchedulerService#3cb32d0e
INFO 2017-08-20 14:53:51,134 [WrapperListener_start_runner] org.mule.service.scheduler.internal.config.ContainerThreadPoolsConfig: Loading thread pools configuration from /opt/mule/conf/scheduler-pools.conf
INFO 2017-08-20 14:53:51,838 [WrapperListener_start_runner] org.mule.runtime.module.deployment.internal.DefaultArchiveDeployer: ================== New Exploded Artifact: default
INFO 2017-08-20 14:53:51,911 [WrapperListener_start_runner] org.mule.runtime.module.deployment.impl.internal.domain.DefaultMuleDomain:
**********************************************************************
* Started domain 'default' *
**********************************************************************
INFO 2017-08-20 14:53:51,913 [WrapperListener_start_runner] org.mule.runtime.module.deployment.internal.DeploymentDirectoryWatcher:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Mule is up and kicking (every 5000ms) +
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
INFO 2017-08-20 14:53:51,916 [WrapperListener_start_runner] org.mule.runtime.module.deployment.internal.StartupSummaryDeploymentListener:
**********************************************************************
* - - + DOMAIN + - - * - - + STATUS + - - *
**********************************************************************
* default * DEPLOYED *
**********************************************************************
Did some investigation
ubuntu#ip-172-31-27-212:/opt$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
b2c75bd67158 testing "/opt/mule/bin/sta..." 2 minutes ago Up 2 minutes 443/tcp, 1098-1099/tcp, 5000/tcp, 5701/tcp, 7777/tcp, 8899/tcp, 54327/tcp, 0.0.0.0:8080->8080/tcp dazzling_kalam
ubuntu#ip-172-31-27-212:/opt$ docker inspect --format '{{ .NetworkSettings.IPAddress }}' b2c75bd67158
172.17.0.2
ubuntu#ip-172-31-27-212:/opt$ netstat -r
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
default ip-172-31-16-1. 0.0.0.0 UG 0 0 0 eth0
172.17.0.0 * 255.255.0.0 U 0 0 0 docker0
172.31.16.0 * 255.255.240.0 U 0 0 0 eth0
ubuntu#ip-172-31-27-212:/opt$ ping 0.0.0.0
PING 0.0.0.0 (127.0.0.1) 56(84) bytes of data.
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.035 ms
64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.033 ms
64 bytes from 127.0.0.1: icmp_seq=3 ttl=64 time=0.034 ms
64 bytes from 127.0.0.1: icmp_seq=4 ttl=64 time=0.038 ms
64 bytes from 127.0.0.1: icmp_seq=5 ttl=64 time=0.034 ms
64 bytes from 127.0.0.1: icmp_seq=6 ttl=64 time=0.038 ms
64 bytes from 127.0.0.1: icmp_seq=7 ttl=64 time=0.036 ms
^C
--- 0.0.0.0 ping statistics ---
7 packets transmitted, 7 received, 0% packet loss, time 5998ms
rtt min/avg/max/mdev = 0.033/0.035/0.038/0.005 ms
ubuntu#ip-172-31-27-212:/opt$ ping 172.17.0.2
PING 172.17.0.2 (172.17.0.2) 56(84) bytes of data.
64 bytes from 172.17.0.2: icmp_seq=1 ttl=64 time=0.068 ms
64 bytes from 172.17.0.2: icmp_seq=2 ttl=64 time=0.045 ms
64 bytes from 172.17.0.2: icmp_seq=3 ttl=64 time=0.044 ms
64 bytes from 172.17.0.2: icmp_seq=4 ttl=64 time=0.046 ms
^C
--- 172.17.0.2 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 2999ms
rtt min/avg/max/mdev = 0.044/0.050/0.068/0.013 ms
To run docker container
docker run -ti --rm -p 8080:8080 -v /home/ubuntu/dockerfiles:/opt/mule/apps $CONTAINER_TEST_IMAGE
Placed mule project artifact inside from dockerfile
WORKDIR /opt/mule
COPY mule-template-project-api-1.0.0-SNAPSHOT.zip /opt/mule/apps/hello-world.zip
After all or running mule container if I am trying my application on is showing
ubuntu#ip-172-31-27-212:~$ curl http://0.0.0.0:8080
curl: (56) Recv failure: Connection reset by peer
ubuntu#ip-172-31-27-212:~$ docker exec -it f71e9bfa8f9d curl localhost:8080
rpc error: code = 2 desc = oci runtime error: exec failed: container_linux.go:262: starting container process caused "exec: \"curl\": executable file not found in $PATH"
ubuntu#ip-172-31-27-212:~$ docker exec -it f71e9bfa8f9d curl 0.0.0.0:8080
rpc error: code = 2 desc = oci runtime error: exec failed: container_linux.go:262: starting container process caused "exec: \"curl\": executable file not found in $PATH"

docker-compose replica hostname

I am trying to add a cluster with replicas using docker-compose scale graylog-es-slave=2 but for a version 3 Dockerfile unlike Docker compose and hostname
What I am trying to do ix figure out how to get the specific node in the replica set
Here is what I have tried
D:\p\liberty-docker>docker exec 706814bf33b2 ping graylog-es-slave -c 2
PING graylog-es-slave (172.19.0.4): 56 data bytes
64 bytes from 172.19.0.4: icmp_seq=0 ttl=64 time=0.067 ms
64 bytes from 172.19.0.4: icmp_seq=1 ttl=64 time=0.104 ms
--- graylog-es-slave ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.067/0.085/0.104/0.000 ms
D:\p\liberty-docker>docker exec 706814bf33b2 ping graylog-es-slave.1 -c 2
ping: unknown host
D:\p\liberty-docker>docker exec 706814bf33b2 ping graylog-es-slave_1 -c 2
ping: unknown host
The docker-compose.yml
version: 3
service:
graylog-es-slave:
image: elasticsearch:2
command: "elasticsearch -Des.cluster.name='graylog'"
environment:
ES_HEAP_SIZE: 2g
deploy:
replicas: 2 <-- this is ignored on docker-compose just putting it here for completeness
Instead of ., use _ (underscore), and add the prefix of the project name (the directory that holds your docker-compose.yml, I assume that it is liberty-docker_graylog):
ping liberty-docker_graylog-es-slave_1
You can see that doing network ls, search for the right network, then docker network inspect network_id.

Is there a configuration setting to automatically display jenkins console output

When I manually execute a jenkins job, it would save an annoying step if, upon submitting the build button, the next screen was the console output and not the project page.
Is there a configuration setting that allows this to happen?
No native option of that kind I guess. Recent jenkins builds allow a shorter way to access console output - just click on the gray/blue point left to the currently running build:
If you still think one click is annoying extra step, then next option I'd suggest is using jenkins CLI. It needs some more one-time effort though.
Have java installed on your workstation
Download jenkins-cli.jar from http://your jenkins host/jnlpJars/jenkins-cli.jar
Then you can start builds like that:
java -jar jenkins-cli.jar -s http://jenkins-url build buildname -w -s -v -p parameterN=valueN
java -jar jenkins-cli.jar -noKeyAuth -s http://jet:8080 build tst-so -w -s -v -p host2ping=google.com
Started tst-so #17
Started from command line by anonymous
Building in workspace /var/lib/jenkins/jobs/tst-so/workspace
[workspace] $ /bin/sh -xe /tmp/hudson5079113569382475588.sh
+ echo Hello from tst-so job
Hello from tst-so job
+ ping -c 6 google.com
PING google.com (216.58.209.206) 56(84) bytes of data.
64 bytes from bud02s22-in-f14.1e100.net (216.58.209.206): icmp_seq=1 ttl=54 time=51.6 ms
64 bytes from bud02s22-in-f14.1e100.net (216.58.209.206): icmp_seq=2 ttl=54 time=51.9 ms
64 bytes from bud02s22-in-f14.1e100.net (216.58.209.206): icmp_seq=3 ttl=54 time=51.8 ms
64 bytes from bud02s22-in-f14.1e100.net (216.58.209.206): icmp_seq=4 ttl=54 time=51.8 ms
64 bytes from bud02s22-in-f14.1e100.net (216.58.209.206): icmp_seq=5 ttl=54 time=51.8 ms
64 bytes from bud02s22-in-f14.1e100.net (216.58.209.206): icmp_seq=6 ttl=54 time=51.7 ms
--- google.com ping statistics ---
6 packets transmitted, 6 received, 0% packet loss, time 5009ms
rtt min/avg/max/mdev = 51.684/51.815/51.900/0.306 ms
Finished: SUCCESS
Completed tst-so #17 : SUCCESS
In my example jenkins is setup with no authentication for simplicity reason.

Resources