Search code examples
amazon-web-servicesjenkinsamazon-ec2ubuntu-18.04

Jenkins not connecting on 8080 port on AWS EC2 Ubuntu


I've installed GitLab and Jenkins on AWS EC2 Ubuntu 18.04, where GitLab uses 80, while Jenkins uses 8080. Gitlab work OK, has external access, while Jenkins doesn't.

sudo systemctl status jenkins

shows that Jenkins is up and running, also curl get's login page, but I can't access it from my browser from external machine.

http://ec2-xx-xx-xx-xx.eu-central-1.compute.amazonaws.com:8080/

I am using same URL but with port 80 for GitLab.

Firewall on both AWS and server are open. Any advice what else could be wrong?


Solution

  • Problem was that host name was wrong. I set it with:

    sudo hostnamectl set-hostname ip-XX-XX-XX-XX
    

    Then rebooted server, and now it works.