I have deployed Nexus repo manager 3 in an EKS cluster.
An AWS network loadbalancer, listening on port 443 forwards traffic to my nexus service. My ingress controller in nginx. My ingress config is
k describe ing ingress-nxrm
Name: ingress-nxrm
Labels: <none>
Namespace: nexusrepo
Address: 172.20.228.55
Ingress Class: nginx
Default backend: <default>
Rules:
Host Path Backends
---- ---- --------
nexus.pe-dev.securekey.com
/ nxrm-service:80 (10.107.1.109:8081)
My nexus service targets port 8081
k describe svc nxrm-service
Name: nxrm-service
Namespace: nexusrepo
Labels: app=nxrm
Annotations: <none>
Selector: app=nxrm
Type: ClusterIP
IP Family Policy: SingleStack
IP Families: IPv4
IP: 172.20.212.25
IPs: 172.20.212.25
Port: <unset> 80/TCP
TargetPort: 8081/TCP
Endpoints: 10.107.1.109:8081
In the UI, firstly I have enabled Docker Bearer Token in Realms
Secondly I created a Hosted Docker Repo and configured it as such
When I try to do a docker login, this is what I get
docker login nexus.pe-dev.securekey.com
Username: admin
Password:
INFO[0002] Error logging in to endpoint, trying next endpoint error="login attempt to https://nexus.pe-dev.securekey.com/v2/ failed with status: 404 Not Found"
login attempt to https://nexus.pe-dev.securekey.com/v2/ failed with status: 404 Not Found
Although I can reach the endpoint
telnet nexus.pe-dev.securekey.com 443
Trying 10.107.37.7...
Connected to ingress-lb-4d43a5e4d210901c.elb.ca-central-1.amazonaws.com.
Escape character is '^]'.
Something I might have missed here ?
I noticed that if I specify the HTTP connector on port 80, I get the error in logs
2023-02-02 15:32:29,146+0000 ERROR [qtp1841338724-78] admin org.sonatype.nexus.bootstrap.jetty.ConnectorManager - Could not start connector: DockerConnectorConfiguration{repositoryName=main-docker, scheme=http, port=80}
java.io.IOException: Failed to bind to /0.0.0.0:80
at org.eclipse.jetty.server.ServerConnector.openAcceptChannel(ServerConnector.java:349)
at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:310)
Caused by: java.net.SocketException: Permission denied
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Net.java:461)