Nexus could not write ressource - java

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)

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....

The following resolution did the trick.
The Nexus was running behind a NGINX Reverseproxy, which didn't allow "PUT" operations. Only GET and POST where allowed.

Related

Getting error resulting in crash loop elasticsearch (GCE/kubernetes)

im getting an error while running elasticsearch on kubernetes. I dont believe this is a memory allocation issue but i dont know. Trying to set it up with discovery - not a single node.
here is my kubernetes config for elasticsearch - https://hastebin.com/ohiyivinit.bash
Here is my error on startup from kubectl logs
Exception in thread "main" java.lang.RuntimeException: starting java failed with [137]
output:
error:
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
at org.elasticsearch.tools.launchers.JvmErgonomics.flagsFinal(JvmErgonomics.java:111)
at org.elasticsearch.tools.launchers.JvmErgonomics.finalJvmOptions(JvmErgonomics.java:79)
at org.elasticsearch.tools.launchers.JvmErgonomics.choose(JvmErgonomics.java:57)
at org.elasticsearch.tools.launchers.JvmOptionsParser.main(JvmOptionsParser.java:89)
EDIT: my error was that the requested memory was the same as the max memory in limits
The error code strongly suggests this is a memory issue.
Since you're using GKE, if Stackdriver is enabled, you can use the following advanced filter to confirm if this is an OOM kill:
resource.type="container"
resource.labels.cluster_name="YOUR_CLUSTER"
resource.labels.namespace_id="NAMESPACE"
resource.labels.project_id="PROJECT_ID"
resource.labels.zone:"ZONE"
resource.labels.container_name="CONTAINER_NAME" # Container name, not pod name
resource.labels.pod_id:"POD_NAME-" # Notice that is not the full pod ID
"OOM"
If you find out this is an OOM issue, you can set requests and limits to your deployment to ensure the resources are enough to run your application.
enter image description hereTry to run command prompt run as administartor

SonarQube server does not start because of a Background initialization failure

I have just installed SonarQube server on my Windows 8 computer according to "Get Started in Two Minutes" instructions. I have the latest Java (jre1.8.0_131) on my machine. I got an error at startup in web.log. How can i fix that?
2017.07.17 05:24:33 ERROR web[][o.s.s.p.Platform] Background initialization failed. Stopping SonarQube
java.lang.IllegalArgumentException: Custom Analyzer [ındex_words_analyzer] failed to find filter under name [word_filter]
at org.elasticsearch.index.analysis.CustomAnalyzerProvider.build(CustomAnalyzerProvider.java:76)
Your logs point to an unexpected state, that should never appear. Either this is a bug in SonarQube, or something unexpected happened to your SonarQube installation.
I suggest these steps:
Verify your MD5 hash of your download. If the checksum does not match, redownload.
Unzip the downloaded zip file again.
Start with a new, empty directory
With the new version of SonarQube 6.6, the problem seems to be fixed somehow. SonarQube Server is able to start now.

Java/Spring application cannot start up on cloudfoundry: OutOfMemoryError Compressed class space

After deploying a new version of our Java/Spring Boot software to the Swisscom Developer Cloud, running on CloudFoundry, the startup suddenly failed with the following error: OutOfMemoryError: Compressed class space. So, we decided to deploy a previous version of the software, the version which was running actually just before: The same error occurred. We did not switch from Java7 to Java8, nor did we change any configuration. This leads to the question: Is this really an error on our side or rather on the server's side?
We then tried to increase the MaxMetaspaceSize by setting the variable JBP_CONFIG_OPEN_JDK_JRE to one of the following lines:
[jre: {version: 1.8.0_+}, memory_calculator: {memory_sizes: {metaspace: 128m}}]
{memory_calculator: {memory_sizes: {metaspace: 128m}}}
{memory_sizes: {metaspace: 128m}}
The application always warned, that the value of memory_sizes was invalid. What is the correct format of this YAML variable?
[ConfigurationUtils] WARN User config value for 'memory_sizes' is not valid, existing property not present
We then deleted the Java app and the database service on the Swisscom Developer Console and recreated it. It had no effect, the same error occured.
And finally, do you know why this error does suddenly occur, even with a version which was just running fine a few minutes ago?
EDIT:
This is the manifest ([database-service-name] and [application-name] were replaced):
---
path: .
instances: 1
buildpack: https://github.com/cloudfoundry/java-buildpack
services:
- [database-service-name]
applications:
- name: [application-name]
domain: scapp.io
host: [application-name]
memory: 1024M
disk_quota: 1024M
env:
SPRING_PROFILES_ACTIVE: stage, cloudfoundry
The Java buildpack version is (according to the logs):
2017-03-03 11:47:02 [STG/0] OUT -----> Java Buildpack Version: b08a692 | https://github.com/cloudfoundry/java-buildpack#b08a692
This command seems to be executed (in the logs after the crash):
2017-03-03 11:46:25 [APP/PROC/WEB/0] OUT vcap 8 0 99 10:46 ? 00:01:09 /home/vcap/app/.java-buildpack/open_jdk_jre/bin/java -Djava.io.tmpdir=/home/vcap/tmp -XX:OnOutOfMemoryError=/home/vcap/app/.java-buildpack/open_jdk_jre/bin/killjava.sh -XX:MaxDirectMemorySize=10M -XX:MaxMetaspaceSize=68540K -XX:ReservedCodeCacheSize=240M -XX:CompressedClassSpaceSize=8731K -Xmx408104K -Djavax.net.ssl.trustStore=/home/vcap/app/.java-buildpack/container_certificate_trust_store/truststore.jks -Djavax.net.ssl.trustStorePassword=java-buildpack-trust-store-password -cp /home/vcap/app/. org.springframework.boot.loader.WarLauncher
The OutOfMemory error occurred because the Java buildpack was changed to use version 3.x of the memory calculator. Similar problems arising from this change are under discussion in GitHub issue 390. Please refer to this issue for details.
In general, v3.x of the memory calculator chooses values for various JVM memory settings based on the number of class files in the application and some default values which depend on the version of Java. It then sets the maximum heap size to the remaining amount of memory.
The previous version of the memory calculator was configured by setting JBP_CONFIG_OPEN_JDK_JRE. However, v3.x can be configured simply by setting the corresponding Java memory settings in JAVA_OPTS. For example, you could set the maximum metaspace size to 100 Mb as follows:
cf set-env app-name JAVA_OPTS '-XX:MaxMetaspaceSize=100m'
If you simply want a workaround, you can use the version of the Java buildpack released before the memory calculator change:
cf push -b https://github.com/cloudfoundry/java-buildpack.git\#v3.14 ...
comment from Swisscom Java developer:
For sure they will be reverting the memory heuristics to what they
were in 3.13 or at least refine the calculations. The current
recommendation to all customers is either
to use 3.13 or
to use some explicit options with the environment variable JAVA_OPTS.

How to Enable JDK 7 for Websphere Profile

I am using Websphere 5.5.0 with Default JDk version as 6.
I installed new jdk 7. The Jdk7 got enabled only for the server and not for the entire profile.
Then I ran the managesdk command to enable the Jdk 7 for the entire profile.
managesdk.bat -enableProfile -profileName AppSrv01 -sdkName 1.7_64 -enableServers
But I see the below error:
CWSDK0009E: Unexpected exception com.ibm.websphere.management.exception.ConfigServiceException: RepositoryException while updating documents in master repository
CWSDK1018I: Profile AppSrv01 could not be enabled to use SDK 1.7_64.
CWSDK1002I: The requested managesdk task failed. See previous messages
List available profiles has the following info:
managesdk.bat -listenabledProfileAll
CWSDK1004I: Profile AppSrv01 :
CWSDK1006I: PROFILE_COMMAND_SDK = 1.6_64
CWSDK1008I: Node mvm-wNode01 SDK name: 1.6_64
CWSDK1009I: Server server1 SDK name: 1.7_64
CWSDK1001I: Successfully performed the requested managesdk task.
Any help from anybody ?
Why cannot the profile be enabled for jdk7 ?
Finally able to resolve it through multiple hits and trial.
Looks like managesdk command needs different permissions from the user who accesses the admin console.
C:\nitesh\websphere8.5.5\IBM\WebSphere\AppServer\profiles\AppSrv01\bin
C:\nitesh\websphere8.5.5\IBM\WebSphere\AppServer\bin\sdk
C:\nitesh\websphere8.5.5\IBM\WebSphere\AppServer\properties\sdk
C:\nitesh\websphere8.5.5\IBM\WebSphere\AppServer\properties
Allowed all file permissions ( on the above folders ) to all the users.

Service will not start: error 1067: the process terminated unexpectedly

We have a custom service that we install with our application. The only problem is that after it is installed, it will not start, generating the error above. I have tried to diagnose what the problem is, but can't seem to find any useful information as to why it is quitting. I have tried the same service on a non "R2" 2008 server, and manual it worked fine.
service simple java file running using batch file. Deamon service.
Has anyone had any experience troubleshooting this type of problem, where there are so few clues?
Goto:
Registry-> HKEY_LOCAL‌​_MACHINE-> System-> Cur‌​rentControlSet-> Servi‌​ces.
Find the concerned service & delete it. Close regedit. Reboot the PC & Re-install the concerned service. Now the error should be gone.
This is a problem related permission.
Make sure that the current user has access to the folder which contains installation files.
I resolved the problem.This is for EAServer Windows Service
Resolution is -->
Open Regedit in Run prompt
Under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\EAServer
In parameters, give SERVERNAME entry as EAServer.
[It is sometime overwritten with Envirnoment variable : Path value]
This error message appears if the Windows service launcher has quit immediately after being started.
This problem usually happens because the license key has not been correctly deployed(license.txt file in the license folder).
If service is not strtign with correct key, just put incorrect key and try to start. Once started, place the correct key, it will work.
I had this error, I looked into a log file C:\...\mysql\data\VM-IIS-Server.err and found this
2016-06-07 17:56:07 160c InnoDB: Error: unable to create temporary file; errno: 2
2016-06-07 17:56:07 3392 [ERROR] Plugin 'InnoDB' init function returned error.
2016-06-07 17:56:07 3392 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2016-06-07 17:56:07 3392 [ERROR] Unknown/unsupported storage engine: InnoDB
2016-06-07 17:56:07 3392 [ERROR] Aborting
The first line says "unable to create temporary file", it sounds like "insufficient privileges", first I tried to give access to mysql folder for my current user - no effect, then after some wandering around I came up to control panel->Administration->Services->Right Clicked MysqlService->Properties->Log On, switched to "This account", entered my username/password, clicked OK, and it woked!
In my case the error 1067 was caused with a specific version of Tomcat 7.0.96 32-bit in combination with AdoptOpenJDK. Spent two hours on it, un-installing, re-installing and trying different Java settings but Tomcat would not start. See...
ASF Bugzilla – Bug 63625
seems to point at the issue though they refer to seeing a different error.
I tried 7.0.99 32-bit and it started straight away with the same AdoptOpenJDK 32-bit binary install.
I solved this issue using Monitor Tomcat application. I ran it and after a few seconds its icon appeared in my system tray. I right clicked on the icon and clicked the start button and after a few seconds Apache Tomcat started.

Categories