Mush
Mush

Reputation: 153

How to get jenkins working on Amazon AMI

I have an Amazon AMI instance from Amazon EC2 and I'm trying to get jenkins up and running.

I followed many tutorials to install it, here is how I did it :

sudo yum update
sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.repo
sudo rpm --import http://pkg.jenkins-ci.org/redhat/jenkins-ci.org.key
sudo yum install jenkins
sudo service jenkins start
sudo chkconfig jenkins on

All seems to go well, but when I go to http://my_ec2_ip:8080 I get a timeout

I also tried this : netstat -anp | grep 8080 tcp 0 0 :::8080 :::* LISTEN 19104/java

I guess the result confirm that java is listening my 8080 port

I also tried to create a proxy from apache port 80 to the 8080 with this virtual host :

<VirtualHost *:80>
    ServerName jenkins.mydomain.com
    ProxyRequests Off
    <Proxy *>
        Order deny, allow
        Allow from all
    </Proxy>
    ProxyPreserveHost on
    ProxyPass / http://localhost:8080/
</VirtualHost>

Anyway I really don't know what I can do more and to debug this, since I have nothing in the jenkins logs (exept INFO: Jenkins is fully up and running)

Thank you,

Upvotes: 0

Views: 488

Answers (2)

Mush
Mush

Reputation: 153

Found it, I had to configure the EC2 security group to open the port 8080.

Upvotes: 0

Bruce P
Bruce P

Reputation: 20739

I set up Jenkins on an EC2 instance a few months ago. I forget where I found the instructions but here's how my apache config is set up for it:

ProxyRequests     Off
ProxyPreserveHost On
ProxyPass /jenkins http://127.0.0.1:8080/jenkins nocanon
ProxyPassReverse /jenkins http://127.0.0.1:8080/jenkins
AllowEncodedSlashes NoDecode
<Location /jenkins/>
  ProxyPassReverse /
  Order deny,allow
  Allow from all
</Location>
Header edit Location ^http://example.com/jenkins/ https://example.com/jenkins/

We're forcing SSL, hence the last line that forces URLs to be HTTPS instead of HTTP.

Also, don't forget that you'll need to edit the security groups for your instance to allow HTTP and/or HTTPS traffic through to it (or port 8080 if you really intend to bypass Apache).

Edit: I believe that this is where I got the information from, in the Jenkins wiki.

Upvotes: 0

Related Questions