Nexus could not write ressource

Viewed 4614

I've got a weird problem regarding the NEXUS OSS. We cannot push onto it with maven anymore. Always getting the error on the push "

Failed to deploy artifact could not transfer artifact

At first I was getting the following error in the nexus oss log.:

2017-07-18 09:22:16,226+0200 WARN [Timer-0] *SYSTEM java.util.prefs - Could not lock User prefs. Unix error code 2. 2017-07-18 09:22:16,226+0200 WARN [Timer-0] *SYSTEM java.util.prefs - Couldn't flush user prefs: java.util.prefs.BackingStoreException: Couldn't get file lock.

I googled and found a solution here.: https://support.sonatype.com/hc/en-us/articles/213464868-Nexus-startup-fails-with-Could-not-lock-User-prefs-Couldn-t-flush-user-prefs-Couldn-t-get-file-lock- I modified it to work with Version 3.4. so I had to add the Java line in

/opt/nexus/bin/nexus.vmoptions

this line is added

-Djava.util.prefs.userRoot=/home/nexus/.java

I also created the directory

/home/nexus/.java/.userPrefs

I assigned the service user nexus and the group nexus as owner and also edited for testing purposes the rights to 777.

After another restart, the error is still present at the client for pushing, but I do not see any error in the logs anymore. The lock User Error is now gone.

Does anybody have an idea what to do?

Nexus OSS Version.: 3.4.0-02 Debian.: 8 Java.:

java version "1.8.0_102" Java(TM) SE Runtime Environment (build 1.8.0_102-b14) Java HotSpot(TM) 64-Bit Server VM (build 25.102-b14, mixed mode)

2 Answers

I managed to get rid of this message by editing my

/usr/local/nexus/bin/nexus.vmoptions

and appended

-Djava.util.prefs.userRoot=/home/nexus/.java

The directory must exist and the user must also be nexus.

it worked for me....

Related