Invalid maximum heap size: -Xmx0m - jenkins

getting below text while running xvfb build config on OKD & which leads to pod termination
" exec java -XX:+UseParallelGC -XX:MinHeapFreeRatio=5 -XX:MaxHeapFreeRatio=10 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -Xmx0m -cp /home/jenkins/remoting.jar hudson.remoting.jnlp.Main -headless -url http://192.168.247.189:80/ -tunnel 192.168.198.249:50000 09d85a0ed4e8b67a0e8bc448cba7c0e5aea962f34b782dcf22597494e8e0e921 xvfb-mlhmf
Picked up JAVA_TOOL_OPTIONS: -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -Dsun.zip.disableMemoryMapping=true
Invalid maximum heap size: -Xmx0m
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit."
couldn't find "-Xmx0m" in either of yaml( buildconfig & Deploymentconfig)
I'm trying to run Jenkins & facing xvfb issue.

Related

debezium in podman FATAL ERROR in native method: processing of -javaagent failed

I have a problem with monitoring debezium. My env - KAFKA_OPTS=-javaagent:/kafka/jmx_prometheus_javaagent.jar=8080:/kafka/config.yml don't work correctly
I builded my project on podman 2.2.1 version. with root user.
FATAL ERROR in native method: processing of -javaagent failed, processJavaStart failedFATAL ERROR in native method: processing of -javaagent failed, processJavaStart failed at io.prometheus.jmx.shaded.io.prometheus.jmx.JavaAgent.premain(JavaAgent.java:47) ... 6 more*** java.lang.instrument ASSERTION FAILED ***: "result" with message agent load/premain call failed at line: 422## A fatal error has been detected by the Java Runtime Environment:## SIGSEGV (0xb) at pc=0x00007f6a4143db77, pid=1, tid=606## JRE version: OpenJDK Runtime Environment (11.0.6+10) (build 11.0.6+10-LTS)# Java VM: OpenJDK 64-Bit Server VM (11.0.6+10-LTS, mixed mode, sharing, tiered, compressed oops, g1 gc, linux-amd64)# Problematic frame:# C [libc.so.6+0x37b77] abort+0x297## Core dump will be written. Default location: Core dumps may be processed with "/usr/lib/systemd/systemd-coredump %P %u %g %s %t %c %h %e" (or dumping to /kafka/app/core.1)## An error report file with more information is saved as:# /kafka/app/hs_err_pid1.log## If you would like to submit a bug report, please visit:# http://bugreport.java.com/bugreport/crash.jsp
On docker my project running good, but i want to use podman. Please help me with some advice

Jenkins - Exception in thread "main" java.lang.OutOfMemoryError: GC overhead limit exceeded

I have configured the TFS repository in jenkins for maven build, while doing checkout i have been observing the below error for every new checkin it has been running 30 to 40 min finally giving the below error and continuing build, other then that if i broke/kill and re-trigger the build its going fine without an issue.
I have tried the below steps but is not helping out.
1.
export JAVA_OPTS="-XX:-UseGCOverheadLimit -Xms1024m -Xmx2048m -XX:MaxPermSize=1024m" --> set the JAVA_OPTS in catalina.sh.
2.
export JAVA_ARG="-Xmx1048m -XX:MaxPermSize=512m" --> set the JAVA_ARG in tomcat setenv.sh
3.
export CATALINA_OPTS="-Djava.awt.headless=true -Dfile.encoding=UTF-8
-server -Xms1536m -Xmx1536m
-XX:NewSize=256m -XX:MaxNewSize=256m -XX:PermSize=256m
-XX:MaxPermSize=256m -XX:+DisableExplicitGC" --> set CATALINA_OPTS in setenv.sh
ERRRO logs:
Exception in thread "main" java.lang.OutOfMemoryError: GC overhead
limit exceeded
com.microsoft.tfs.core.clients.workitem.internal.rowset.DBRowSetHandler.handleRow
com.microsoft.tfs.core.clients.workitem.internal.rowset.RowSetParser.parseIndividualRow(RowSetParser.java:340)
at
com.microsoft.tfs.core.clients.workitem.internal.rowset.RowSetParser.parseRows(RowSetParser.java:270)
at
com.microsoft.tfs.core.clients.workitem.internal.rowset.RowSetParser.parse(RowSetParser.java:128)
at
com.microsoft.tfs.core.clients.workitem.internal.metadata.Metadata$3.performTask(Metadata.java:415)
at
com.microsoft.tfs.core.internal.db.ConnectionPool.executeWithPooledConnection(ConnectionPool.java:80)
at
com.microsoft.tfs.core.clients.workitem.internal.metadata.Metadata.updateMetadata(Metadata.java:353)
at
com.microsoft.tfs.core.clients.workitem.internal.metadata.Metadata.update(Metadata.java:540)
at
com.microsoft.tfs.core.clients.workitem.internal.metadata.Metadata.update(Metadata.java:490
The above issue got resolved after upgraded TFS plugin in jenkins(version-1.654). I have upgraded from TFS 1.12 to 3.20

Can't run NiFi on OSX

I installed NiFi on my OSX machine using
brew install nifi
This worked fine, but when I run the command
nifi run
I checked the nifi-app log and this is what pops out:
2017-10-27 00:24:26,211 WARN [main] org.apache.nifi.bootstrap.Command
Launched Apache NiFi but could not determined the Process ID
I tried nifi startas well but get the following as status:
2017-10-27 00:26:48,081 INFO [main] org.apache.nifi.bootstrap.Command
Apache NiFi is currently running, listening to Bootstrap on port
50289, PID=unknown
Not sure if I have to edit something, but I'm concerned by PID is unknown.
EDIT:
When running
2017-10-27 11:14:13,809 ERROR [main] org.apache.nifi.NiFi Failure to
launch NiFi due to java.util.ServiceConfigurationError:
org.apache.nifi.processor.Processor: Provider
org.apache.nifi.processors.standard.ParseCEF could not be instantiated
java.util.ServiceConfigurationError:
org.apache.nifi.processor.Processor: Provider
org.apache.nifi.processors.standard.ParseCEF could not be instantiated
at java.base/java.util.ServiceLoader.fail(ServiceLoader.java:581)
at java.base/java.util.ServiceLoader.access$100(ServiceLoader.java:390)
at java.base/java.util.ServiceLoader$ProviderImpl.newInstance(ServiceLoader.java:799)
at java.base/java.util.ServiceLoader$ProviderImpl.get(ServiceLoader.java:721)
at java.base/java.util.ServiceLoader$3.next(ServiceLoader.java:1389)
at org.apache.nifi.nar.ExtensionManager.loadExtensions(ExtensionManager.java:142)
at org.apache.nifi.nar.ExtensionManager.discoverExtensions(ExtensionManager.java:117)
at org.apache.nifi.web.server.JettyServer.start(JettyServer.java:702)
at org.apache.nifi.NiFi.<init>(NiFi.java:160)
at org.apache.nifi.NiFi.main(NiFi.java:268)
Caused by: java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException
at org.apache.bval.jsr.ConfigurationImpl.parseValidationXml(ConfigurationImpl.java:357)
at org.apache.bval.jsr.ConfigurationImpl.createBootstrapConfiguration(ConfigurationImpl.java:349)
at org.apache.bval.jsr.ConfigurationImpl.prepare(ConfigurationImpl.java:340)
at org.apache.bval.jsr.ConfigurationImpl.__privileged_doBuildValidatorFactory(ConfigurationImpl.java:329)
at org.apache.bval.jsr.ConfigurationImpl.doBuildValidatorFactory(ConfigurationImpl.java)
at org.apache.bval.jsr.ConfigurationImpl.buildValidatorFactory(ConfigurationImpl.java:324)
at org.apache.nifi.processors.standard.ParseCEF.<init>(ParseCEF.java:179)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:488)
at java.base/java.util.ServiceLoader$ProviderImpl.newInstance(ServiceLoader.java:777)
... 7 common frames omitted
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.JAXBException
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:466)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:563)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:496)
... 19 common frames omitted
I was using JDK 9. Turns out as of today, this doesn't work. I downgraded to JDK 8 and voila! Thanks y'all
No need to download to JDK 8, but you do need it installed.
Picking which JDK to Run
I have an app (nifi) which does not work on JDK 9, so I want to switch the JDK Version.
List Possible Versions
This is the command
/usr/libexec/java_home -V
And the correctponing output
Matching Java Virtual Machines (2):
9.0.1, x86_64: "Java SE 9.0.1" /Library/Java/JavaVirtualMachines/jdk-9.0.1.jdk/Contents/Home
1.8.0_151, x86_64: "Java SE 8" /Library/Java/JavaVirtualMachines/jdk1.8.0_151.jdk/Contents/Home
/Library/Java/JavaVirtualMachines/jdk-9.0.1.jdk/Contents/Home
Set your Java-Home
For picking just a major Version you can do this
export JAVA_HOME=`/usr/libexec/java_home -v 1.8`
Run App (nifi)
I now just need to select this Java, export it. And run the startup script...
export JAVA_HOME=`/usr/libexec/java_home -v 1.8`
tim#T-Mac-mini bin $ java -version
java version "1.8.0_151"
Java(TM) SE Runtime Environment (build 1.8.0_151-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.151-b12, mixed mode)
tim#TMac-mini bin $ ./nifi.sh run
It now works.

ant build failes on Jenkins

When I start the Jenkins build, on arriving on ant-build-step the build is canceled immediately with the following stack:
...
[PROJECT] $ cmd.exe /C "D:\jenkins\tools\hudson.tasks.Ant_AntInstallation\Ant\bin\ant.bat -file build-jenkins.xml -Djenkins.result.dir=${JENKINS.WORKSPACES}/Results "-Dbranch=*/develop" -Djenkins.result.dir=C:/Tools/Jenkins/Results -Djenkins.workspace.dir=C:\Tools\Jenkins\Project-SNAPSHOT\workspace/PRO_56/PRO/java/Project -Dproject.path=C:\Tools\Jenkins\Project-SNAPSHOT\workspace clean.compile.jar.server.snapshot -v && exit %%ERRORLEVEL%%"
Usage: java [-options] class [args...]
(to execute a class)
or java [-options] -jar jarfile [args...]
(to execute a jar file)
where options include:
...
See http://www.oracle.com/technetwork/java/javase/documentation/index.html for more details.
Build step 'Invoke Ant' marked build as failure
Finished: FAILURE
I get no debug messages, nothing.
I've got other project with a similar/equal config which work. I think it could be a incompatibility of my plugins.
Has anyone experienced this bug before?
In my case the problem was a big M in the java options of the ant-build-step.
Here no m for Megabit und M für Megabyte.
-Xmx1024M
-Xms1024m

Openlayers Custom build tutorial is crashing

I am working through the openlayers custom build tutorial and I am getting the following error
info ol Parsing dependencies
info ol Compiling 345 sources
events.js:141
throw er; // Unhandled 'error' event
^
Error: spawn java ENOENT
at exports._errnoException (util.js:870:11)
at Process.ChildProcess._handle.onexit
(internal/child_process.js:178:32)
at onErrorNT (internal/child_process.js:344:16)
at nextTickCallbackWith2Args (node.js:441:9)
at process._tickCallback (node.js:355:17)
Exit 1
when I run:
node tasks/build.js build/ol-custom.json build/ol-custom.js
Googling the error gives a solution where it could be another node instance running in the background (there isnt)
also the tutorial says closure-util should be in:
node_modules/openlayers/node_modules
but it is actually in:
node_modules/closure-util
Any idea why this is happening?
It turns out java wasn't set up properly on my path and so it couldn't build. Remember to check your environment with java -version.
On Ubuntu you can install install java 11 (working with this version):
sudo apt install openjdk-11-jre-headless
It should return:
openjdk version "11.0.8" 2020-07-14
OpenJDK Runtime Environment (build 11.0.8+10-post-Ubuntu-0ubuntu118.04.1)
OpenJDK 64-Bit Server VM (build 11.0.8+10-post-Ubuntu-0ubuntu118.04.1, mixed mode, sharing)
Then you can run again:
node tasks/build.js build/ol-custom.json build/ol-custom.js

Resources