Jemar Jones
Jemar Jones

Reputation: 1645

How to run sonatype nexus on aws ec2?

I need to put sonatype nexus3 up on AWS. Following an old tutorial for nexus 2, I was led to try this on EC2. What I'm currently trying is an instance with a security group that allows inbound requests from anywhere on ports 80,8080,22,4000,443, and 8081. I'm using a Amazon Linux AMI 2016.09.0 (HVM), SSD Volume Type instance. I install docker using the instructions from here http://docs.aws.amazon.com/AmazonECS/latest/developerguide/docker-basics.html#install_docker. I then simply use the official docker image from here https://hub.docker.com/r/sonatype/nexus3/ with the following command.

docker run -d -p 8081:8081 --name nexus sonatype/nexus3

Using docker ps I can confirm that this seems to be running. When I try to connect to the provided public DNS url ending with amazonaws.com on port 8081, I simply get connection refused. Same thing on port 80 or any of the other ports and the same thing when I add /nexus to the end of the URL.

Attempting the quick test that documentation for this image suggests:

>curl -u admin:admin123 http://localhost:8081/service/metrics/ping
curl: (56) Recv failure: Connection reset by peer 

Using the exact same docker command on my local machine (OS X) I am able to access nexus on localhost. Why can't I get this working?

Upvotes: 4

Views: 5459

Answers (1)

Jemar Jones
Jemar Jones

Reputation: 1645

The issue appears to have been with Sonatype's official image. This image which works the exact same way, works perfectly with the exact same process.

Upvotes: 2

Related Questions