简体   繁体   中英

Can't reach Sonatype Nexus OSS Repository inside LAN

I've a machine running Nexus OSS Repository (version 3.15.1-01) on port 8081 in my intranet . I can ping this machine through it's IP, I've even Jenkins running on port 8080 and can reach it just fine through any internet browser. However, when I try to reach Nexus remotely on 8081, I get only timeouts.

I've configured the http/https proxy on Nexus (we've a corporate proxy) and it can download artifacts from online repos with no issue, and I can access the running server physically on the machine through localhost or 127.0.0.1 on port 8081.

It is like some configuration is blocking the remote access to Nexus, but I've failed to find this sort of configuration in the app or documentation (aside from the checkbox to "accept incoming requests" inside repo config, which is enabled). Any clues on what could be causing this?

Well, after hours of searching: Apparently the default access URL right after you install Nexus in your server depends on god knows what; quoting the documentation:

While the documentation uses localhost throughout, you may need to use the IP Loopback Address of 127.0.0.1, the IP address or the DNS hostname assigned to the machine running the repository manager.

It never says what determines the URL you have to use or where you can change it. What it does say though, is how to change the port:

The default value for the HTTP port used to access the repository manager user interface and resources is 8081. Therefore the user interface would be available at http://localhost:8081/ . To change or update the port, locate the line application-port=8081 in $data-dir/etc/nexus.properties, then edit the number.

Checking this file, it also has an application-host field in which you can set the IP of the server, and if you do so you can access through this IP both physically and remotelly, while the default (in my case localhost) didn't allow for remote access.

Gonna ask them to make this part of the documentation a bit more clear, hope it can help someone meanwhile.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM