Reputation: 2016
I have jenkins installed on one of the ec2 instances. I am able to run the below commands on the same ec2 and confirm that the connection is successful.
curl -vk 'http://<private ip>:9009/jenkins'
curl -vk 'http://localhost:9009/jenkins'
However, I cannot execute these commands from any other ec2 instance even though security group attached to the jenkins ec2 instance allows all kinds of inbound connections.
I get below error when I try connecting from other ec2 instances.
[root@ip-<private ip> ~]# curl -vk 'http://<private ip>:9009/jenkins'
* About to connect() to <private ip> port 9009 (#0)
* Trying <private ip>...
* No route to host
* Failed connect to <private ip>:9009; No route to host
* Closing connection 0
curl: (7) Failed connect to <private ip>:9009; No route to host
Can someone please tell me what is going wrong here ?
OS- Red Hat 7
Upvotes: 1
Views: 238
Reputation: 11752
On Red Hat 7, firewalld
is enabled by default. so, please disable firewalld
on Red Hat 7
OR open port 9009 only as needed:
firewall-cmd --permanent --add-port=9009/tcp
firewall-cmd --reload
Upvotes: 1