Nexus Repo - could not lock user prefs - locking

I'm running Sonatype Nexus 3 inside a docker container, with the following startup command:
docker run -d -p 80:8081 --ulimit nofile=65536:65536 --name nexus -v nexus-data:/nexus-data -e INSTALL4J_ADD_VM_PARAMS="-Xms4g -Xmx4g -XX:MaxDirectMemorySize=6717m -Djava.util.prefs.userRoot=${NEXUS_DATA}/javaprefs" sonatype/nexus3
After updating the docker image version from 3.30.0 to 3.40.1, I keep getting the following warnings regarding user prefs.
2022-07-18 13:14:45,860+0000 WARN [Timer-0] *SYSTEM java.util.prefs - Couldn't flush user prefs: java.util.prefs.BackingStoreException: Couldn't get file lock.
2022-07-18 13:15:15,860+0000 WARN [Timer-0] *SYSTEM java.util.prefs - Could not lock User prefs. Unix error code 2.
As you can see from the startup command, the user prefs directory is inside the docker volume and at directory /nexus-data/javaprefs . I have tried looking for existing locks inside the directory, but found none. I've also tried completely deleting the directory and saw that the warning still came up and the folder itself wasn't being created by Nexus.
I honestly don't even know if this is an important issue or not, since there is little to no documentation about the user preferences folder.
Even a way to turn off the warning log which fires every 30s would be useful.
----UPDATE----
I've tried doing a clean installation of Nexus through Docker, following the simple instructions inside the github sonatype nexus3 docker repository, and still find these warnings.
I even tried on a different OS (Windwos instead of linux, through Docker Desktop) and with and without a volume for /nexus-data.
At this point I believe it to be a bug in a newer Nexus version.

TLDR: Adding -Djava.util.prefs.userRoot=/nexus-data/javaprefs should solve the problem, assuming the nexus data directory is at /nexus-data/.
Just had the same issue after upgrading from 3.38.1 to 3.42.0. After some investigation found that indeed the java.util.prefs.userRoot property got lost somewhere between those versions. The default value in the vanilla Nexus 3.38.1 is /nexus-data/javaprefs.

Related

Singularity: failed to resolve session directory

I wrote a Singularity container that works just fine on my computer. However, when a colleague of mine tries to run it, he gets the error output
FATAL: container creation failed: failed to resolve session directory /usr/local/var/singularity/mnt/session: lstat /usr/local/var: no such file or directory
In the past, he could run containers I build. In fact, he used being able to run a container with the same recipe. The change was that the version of Singularity on the machine I use to build it was upgraded.
I entered the error in a search engine, and I only found a single hit, https://forum.image.sc/t/improving-cluster-supercomputer-performance-tesla-v100-volta-16-32gb-gpu/37459/8, in which this is not resolved.
Does anybody know a way to fix this? Or what the source of the problem is? Or a workaround, preferably one that does not require me to downgrade Singularity? (The machine on which I build it is shared between several users, that's why I don't want to do that.)
Okay, this was somewhat trivial to solve, we just had the colleague create the required folder,
mkdir -p /usr/local/var/singularity/mnt/{container,final,overlay,session}

yarn usercache dir not resolved properly when running an example application

I am using Hadoop 3.2.0 and trying to run a simple application in a docker container and I have made the required configuration changes both in yarn-site.xml and container-executor.cfg to choose LinuxContainerExecutor and docker runtime.
I use the example of distributed shell in one of the hortonworks blog. https://hortonworks.com/blog/trying-containerized-applications-apache-hadoop-yarn-3-1/
The problem I face here is when the application is submitted to YARN it fails with a reason related to directory creation issue with the below error
2019-02-14 20:51:16,450 INFO distributedshell.Client: Got application
report from ASM for, appId=2, clientToAMToken=null,
appDiagnostics=Application application_1550156488785_0002 failed 2
times due to AM Container for appattempt_1550156488785_0002_000002
exited with exitCode: -1000 Failing this attempt.Diagnostics:
[2019-02-14 20:51:16.282]Application application_1550156488785_0002
initialization failed (exitCode=20) with output: main : command
provided 0 main : user is myuser main : requested yarn user is
myuser Failed to create directory
/data/yarn/local/nmPrivate/container_1550156488785_0002_02_000001.tokens/usercache/myuser
- Not a directory
I have configured yarn.nodemanager.local-dirs in yarn-site.xml and I can see the same reflected in YARN web ui localhost:8088/conf
<property>
<name>yarn.nodemanager.local-dirs</name>
<value>/data/yarn/local</value>
<final>false</final>
<source>yarn-site.xml</source>
</property>
I do not understand why is it trying to create usercache dir inside the nmPrivate directory.
Note : I have verified the permissions for myuser to the directories and also have tried clearing the directories manually as suggested in a related post. But no fruit. I do not see any additional information about container launch failure in any other logs.
How do I debug why the usercache dir is not resolved properly??
Really appreciate any help on this.
Realized that this is all because of the users the services were started with and the permissions to the directories the services work on.
After making sure the required changes are done, I am able to seamlessly run the examples and other applications..
Thanks Hadoop user community for the direction. Adding the link here for more details.
http://mail-archives.apache.org/mod_mbox/hadoop-user/201902.mbox/browser

nodeclipse editbox plugin - unable to install

I have updated eclipse to 4.10 (2018-12/R), the cpp package
Running under ubuntu 18.04.
I tried to add nodeclipse editbox using the marketplace, but it cannot find the plugin.
Then tried the option help-install New Software, adding the repository provided in the github site (https://github.com/Nodeclipse/EditBox), as
http://nodeclipse.github.io/dev.updates/editbox-1.0.0/
But I always get this error:
An error occurred while collecting items to be installed
session context was:(profile=epp.package.cpp, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=).
Unable to read repository at http://nodeclipse.github.io/dev.updates/editbox-1.0.0/plugins/pm.eclipse.editbox_1.0.0.201804021412.jar.
Connection reset
I have searched for the whole morning, and cannot find any reference to the possible cause of this error.
Any pointer will be appreciated
OK, looks like I solved it. Recording it here in case others come looking.
The problem was in the server that cut the file download midway.
So using the information in the error message, I was able to download and install directly the plugin. I did:
cd /opt/eclipse/plugins - To get the download directly into the plugin folder
Then used wget to download the folder directly:
wget http://nodeclipse.github.io/dev.updates/editbox-1.0.0/plugins/pm.eclipse.editbox_1.0.0.201804021412.jar
Restarted eclipse, and voila! It was working.
Simpler than I thougth.

bluemix java application cannot be deployed anymore

We have had a java application that's been running on bluemix for more than a year that we update periodically (a few times a week). In the last few days however, even though the build is successful, we cannot launch it. The error is the following (we never saw this before):
App/0 Error occurred during initialization of VMJul 10, 2017 12:13:14.002 PM
App/0 Could not find agent library /home/vcap/app/.java-J-buildpack/open_jdk_jre/bin/jvmkill-J-1.9.0_RELEASE in absolute path, with error: /home/vcap/app/.java-J-buildpack/open_jdk_jre/bin/jvmkill-J-1.9.0_RELEASE: cannot open shared object file: No such file or directory
The deploy cmd is
cf push "${CF_APP}" -p target/universal/myapp-SNAPSHOT.zip -b https://github.com/cloudfoundry/java-buildpack.git -k 2G
As you are able to deploy using a previous version of the buildpack, this suggests that a recent change in the buildpack may be a reason for the latest buildpack breaking.
I was going to suggest opening a ticket on the github repo, but I see you have already done that :)

Cannot install Kaltura oflaDemo on CentOS7

I'm currently setting up a Kaltura streaming server on CentOS 7 with mariaDB. When I come to the point the installation manual requires me to install oflaDemo via browser, I only get an empty list. No connection errors occour. The debug output states:
Host: vstream-dev.my.domain
Trying to connect
Net status: NetConnection.Connect.Success
Got the application list
Got the application list
Got the application list
So, in theory there shouldn't be a problem.
Firewall is down for testing/devel
SELinux is off (permissive)
The only error that ocoured during the installation process was packet mysql-server is not installed. But the manual states that I should use mariaDB on CentOS 7.
I tried to clone https://github.com/Red5/red5-examples and link the ofla Demo folder to /usr/lib/red5/webapps/ with no success.
Ok, I solved it.
What I did:
I cloned the repo with the red5 examples: https://github.com/Red5/red5-examples and navigated into the subfolder oflaDemo (with pom.xml).
Then I had to install maven with
yum install -y maven
and do a maven build
mvn clean install
After that, I was able to grab the file target/red5-example-oflaDemo-2.0.war. I extracted this file into a folder oflaDemo in /var/lib/red5/webapps and restarted the server. Finally, I did mkdir /usr/lib/red5/webapps/oflaDemo/streams to create a folder for the streams.
After that, I was able to navigate to the demo via
http://my.domain:5080/oflaDemo/