Nexus 3.16.2-01 - "a docker connector port already in use"


#1

We attempted an upgrade of our Nexus repository last night from version 3.7.1-02 to 3.16.2-01.

Using the existing Blob store and existing data area (with the Nexus Orient DB directories, ./etc, etc.), we shutdown the old Nexus version, configured nexus.vmoptions and nexus.rc for the new software version, and booted the 3.16.2 version of Nexus.

The log files show that the Orient DB upgraded successfully, but Nexus did not boot properly afterwords.

The log file showed an error like the following:

2019-03-27 15:14:33,975-0300 WARN [FelixStartLevel] *SYSTEM org.sonatype.nexus.repository.docker.internal.DockerConnectorFacetImpl - Validation failed; 1 constraints violated:

  1. Port is already in use, type: class org.sonatype.nexus.validation.ConstraintViolationFactory$HelperBean, property: attributes.docker.httpPort, value: org.sonatype.nexus.validation.ConstraintViolationFactory$HelperBean@2044df35

Note that the above error message is mostly identical to what I received in my logs, however that cut above came from the following ticket:

We’re unsure where to go next. I’m getting a clone of the system to attempt the upgrade again to see if we can work around it, but the error message doesn’t include what port is conflicting or any additional information as to what/where that configuration would be.

I did a netstat -vatn on the system and checked the returned ports: None of them conflicted with any nexus defined port on any nexus docker repository we have.

We ended up rolling back to the 3.7 version of the software (replacing the directories in “nexus_data” with a copy taken before the upgrade) allowing us to restart 3.7 without a problem.

Since there were no data or configuration changes between the 3.7 version of the database/config files/blob stores and the 3.16.2 version (since we simply stopped Nexus on 3.7 and started Nexus 3.16) other than whatever process 3.16.2 goes through to “upgrade” the internal components, we are ass-u-me-ing one of two things:

  1. There’s a misconfiguration somewhere in the binaries directory somewhere (missing config file, missing option in one of the configs that goes into the “bin” directory)

  2. There’s a problem with 3.16.2 in some way upgrading from 3.7.

Since 3.16.2 is stable, I can’t assume everyone is running into this, so it has to be a configuration on our end. Any advice? What would I even do to check what the conflict is? Is there some kind of internal port baked into the newer versions of Nexus that might be conflicting with something defined in our Nexus installation?

Any advice would be greatly appreciated.


#2

Look at the ports configured in the nexus.properties files, and all the ports configured as connector ports in your docker repositories. Is there any duplication?


#3

Our Nexus properties file is pretty bare:

 # Jetty section
 # application-port=8080
 # application-host=127.0.0.1
 # nexus-args=${jetty.etc}/jetty.xml,${jetty.etc}/jetty-http.xml,${jetty.etc}/jetty-requestlog.xml
 # nexus-context-path=/
 
 # Nexus section
 # nexus-edition=nexus-oss-edition
 # nexus-features=\
 #  nexus-oss-feature

8080 is the base nexus port, along with this we have several repos configured at various port addresses (reverse proxied by Nginx), but those were all verified as not conflicting with what was showing out of a Netstat.

And again, the configuration hasn’t changed between 3.7 and 3.16. The same repos on the same ports are running on the 3.7 software but broken on the 3.16 software. So unless 3.16 is opening additional ports somewhere to what 3.7 is running, I can’t figure out how 1 version of the software would not be getting port conflicts but the other version would be.

Any ideas where I could go to try to figure out which port is conflicting?


#4

I don’t think this forum is the right place to debug this. I suggest opening an issue in the “dev - nexus” project at https://issues.sonatype.org