I have some tests in selenium. When I run them using maven on my local machine then everything works fine, but when I try to start them using jenkins I get an error. Can anyone help me out and tell why it works on my machine, and doesnt on Jenkins? Thanks
[SNOWDEN_develop_Selenium_AutoTests] $ java -cp /var/lib/jenkins/maven33-agent.jar:/var/lib/jenkins/tools/hudson.tasks.Maven_MavenInstallation/maven /boot/plexus-classworlds-2.5.2.jar:/var/lib/jenkins/tools /hudson.tasks.Maven_MavenInstallation/maven/conf/logging jenkins.maven3.agent.Maven33Main /var/lib/jenkins/tools/hudson.tasks.Maven_MavenInstallation/maven /var/lib/jenkins/slave.jar /var/lib/jenkins/maven33-interceptor.jar /var/lib/jenkins/maven3-interceptor-commons.jar 43010
Exception in thread "main" java.lang.ClassNotFoundException: hudson.remoting.Launcher
at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:247)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:239)
at jenkins.maven3.agent.Maven33Main.main(Maven33Main.java:133)
at jenkins.maven3.agent.Maven33Main.main(Maven33Main.java:64)
[SNOWDEN_develop_Selenium_AutoTests] $ /bin/bash -xe /tmp/hudson5734623695552292225.sh
+ cd /var/lib/jenkins/workspace/SNOWDEN_develop_Selenium_AutoTests/snowden-docker
+ ./docker.snowden.sh stop devsel
WORKSPACE: /var/lib/jenkins/workspace/SNOWDEN_develop_Selenium_AutoTests
Docker host : 10.0.0.27:4243 (SNOWDEN-DEV)
Stop docker container snowden_devsel ...
Stoping container snowden_devsel ...
snowden_devsel_tomcat
snowden_devsel_mongodb
ERROR: Failed to parse POMs
java.io.EOFException: unexpected stream termination
at hudson.remoting.ChannelBuilder.negotiate(ChannelBuilder.java:365)
at hudson.remoting.ChannelBuilder.build(ChannelBuilder.java:310)
at hudson.slaves.Channels.forProcess(Channels.java:115)
at hudson.maven.AbstractMavenProcessFactory.newProcess(AbstractMavenProcessFactory.java:294)
at hudson.maven.ProcessCache.get(ProcessCache.java:236)
at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:798)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
at hudson.model.Run.execute(Run.java:1728)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:544)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:404)
Finished: FAILURE
Related
I'm trying to build my automation framework using playwright with java, however I'm running into below issue when running the tests. Please advice!
Failed to install browsers
Error: Failed to download chromium v1000, caused by
Error: unable to get local issuer certificate
at TLSSocket.onConnectSecure (node:_tls_wrap:1530:34)
at TLSSocket.emit (node:events:390:28)
at TLSSocket._finishInit (node:_tls_wrap:944:8)
at TLSWrap.ssl.onhandshakedone (node:_tls_wrap:725:12)
Exception in thread "main" java.lang.RuntimeException: Failed to create driver
at com.microsoft.playwright.impl.Driver.ensureDriverInstalled(Driver.java:61)
at com.microsoft.playwright.impl.PlaywrightImpl.create(PlaywrightImpl.java:40)
at com.microsoft.playwright.Playwright.create(Playwright.java:96)
at com.microsoft.playwright.Playwright.create(Playwright.java:100)
at Example.main(Example.java:5)
Caused by: java.lang.RuntimeException: Failed to install browsers, exit code: 1
at com.microsoft.playwright.impl.DriverJar.installBrowsers(DriverJar.java:76)
at com.microsoft.playwright.impl.DriverJar.initialize(DriverJar.java:48)
at com.microsoft.playwright.impl.Driver.ensureDriverInstalled(Driver.java:57)
... 4 more
I could solve it by disabling the download (as it was already installed with npx playwright install) by setting the env
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1
IntelliJ IDE Run Configuration
It's not a Playwright or Maven problem. You can fix it yourself. If you want just to avoid the problem, not fixing it, you can follow this recommendation: https://community.claris.com/en/s/question/0D53w00005GuQXxCAN/nodejs-fmsapiclient-unable-to-verify-the-first-certificate-local-server
namely by setting the system variable to zero
I am trying to understand the Apache Flink CEP program to monitor rack temperatures in a data center as described by Flink Official Documentation. But when I follow the steps and create a jar using mvn clean package and tried to execute the package using the command
java -cp "../cep-monitoring-1.0.jar" org.stsffap.cep.monitoring.CEPMonitoring
But I get the following error,
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/flink/streaming/api/functions/source/SourceFunction
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
at java.lang.Class.getMethod0(Class.java:3018)
at java.lang.Class.getMethod(Class.java:1784)
at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526)
Caused by: java.lang.ClassNotFoundException: org.apache.flink.streaming.api.functions.source.SourceFunction
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 7 more
I tried different variations of giving the classpath as described here but getting the same error. Can someone point out my mistake in running the program?
To submit a job to the local Flink cluster:
Run Flink.
/path/to/flink-1.4.0/bin/start-local.sh
Submit the job.
/path/to/flink-1.4.0/bin/flink run -c com.package.YourClass /path/to/jar.jar
Alternatively you can run the job simply from your IDE:
Your job in this case will be run in a Flink environement.
Check Flink's example: https://github.com/apache/flink/blob/master/flink-examples/flink-examples-streaming/src/main/java/org/apache/flink/streaming/examples/wordcount/WordCount.java
The cep example uses flink version 1.3.2. So here are the steps to run it.
Install version 1.3.2 of apache flink. (wget it from here and extract it).
cd into flink-1.3.2
./bin/start-local.sh, this will start the flink cluster. Do cd ...
Clone this repo using git clone and cd into that.
mvn clean package to build the project. This will create target directory.
Run ../flink-1.3.2/bin/flink run target/cep-monitoring-1.0.jar, to start the process.
In separate terminal the output can be logged like this (assuming that you are in same directory as previous step) tail -f ../flink-1.3.2/log/flink-*-jobmanager-*.out (* will be replaced by specific user detail, press tab to autocomplete those).
Here is the sample output,
rshah9#bn18-20:~/tools/cep-monitoring-master$ tail -f ../flink-1.3.2/log/flink-rshah9-jobmanager-0-bn18-20.dcs.mcnc.org.out
TemperatureWarning(9, 102.45860162626161)
TemperatureWarning(6, 113.21295716135027)
TemperatureWarning(5, 105.46064102697723)
TemperatureWarning(0, 106.44635415722034)
TemperatureWarning(4, 112.07396748089734)
TemperatureWarning(9, 114.53346561628322)
TemperatureWarning(3, 109.05305417712648)
TemperatureWarning(7, 112.3698094257147)
TemperatureWarning(3, 107.78609416982076)
TemperatureWarning(9, 107.34373990230458)
TemperatureWarning(5, 111.46480675461656)
I am installing WOLips. I have installed the plugins in Eclipse and everything seems fine (except Goodies won't install). I have tried to run WOInstaller.jar but I get a "connection time out" error:
$ sudo java -jar WOInstaller.jar 5.4.3 $HOME/workspace/WebObjects543/Versions/WebObjects543.
Exception in thread "main" java.net.ConnectException: Connection timed out at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
This is the build recommended for my version of Eclipse on Debian. Any ideas?
I solved it. It was a proxy problem. Using java -Dhttp.proxyHost=10.0.0.0 -Dhttp.proxyPort=8080 -jar etc. it works!
I've been following these instructions and got as far as "Creating the Oozie Database Schema"; I chose to run the tool and tried
$ sudo -u oozie /usr/lib/oozie/bin/ooziedb.sh create -run
, which returned the following errors:
Validate DB Connection
Exception in thread "main" java.lang.ExceptionInInitializerError
at java.lang.Class.initializeClass(libgcj.so.10)
at org.apache.oozie.service.Services.setServiceInternal(Services.java:360)
at org.apache.oozie.service.Services.(Services.java:108)
at org.apache.oozie.tools.OozieDBCLI.getJdbcConf(OozieDBCLI.java:161)
at org.apache.oozie.tools.OozieDBCLI.createConnection(OozieDBCLI.java:461)
at org.apache.oozie.tools.OozieDBCLI.validateConnection(OozieDBCLI.java:469)
at org.apache.oozie.tools.OozieDBCLI.createDB(OozieDBCLI.java:179)
at org.apache.oozie.tools.OozieDBCLI.run(OozieDBCLI.java:118)
at org.apache.oozie.tools.OozieDBCLI.main(OozieDBCLI.java:64)
Caused by: java.lang.NullPointerException
at org.apache.oozie.service.Service.(Service.java:60)
at java.lang.Class.initializeClass(libgcj.so.10)
...8 more
What might be the cause of this and how could I fix this?
edit the oozie-env.sh at last and append export JAVA_HOME=/usr/local/jdk1.7 the java_home is yourself javapath
I'm using CentOS 5 and Jenkins 1.430. When I try to build, I get an error:
hudson.util.IOException2: remote file operation failed: /home/build/jenkins/workspace/tests at hudson.remoting.Channel#6c89db9a:build-test
at hudson.FilePath.act(FilePath.java:754)
at hudson.FilePath.act(FilePath.java:740)
at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:705)
at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:654)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1193)
at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:566)
at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:454)
at hudson.model.Run.run(Run.java:1376)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:230)
Caused by: java.io.IOException: Remote call on build-test failed
at hudson.remoting.Channel.call(Channel.java:690)
at hudson.FilePath.act(FilePath.java:747)
... 10 more
Caused by: java.lang.NoClassDefFoundError: Could not initialize class hudson.model.Hudson
at hudson.scm.SubversionWorkspaceSelector.syncWorkspaceFormatFromMaster(SubversionWorkspaceSelector.java:85)
at hudson.scm.SubversionSCM.createSvnClientManager(SubversionSCM.java:782)
at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:725)
at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:712)
at hudson.FilePath$FileCallableWrapper.call(FilePath.java:1995)
at hudson.remoting.UserRequest.perform(UserRequest.java:118)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:287)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
Email was triggered for: Failure
Sending email for trigger: Failure
An attempt to send an e-mail to empty list of recipients, ignored.
Finished: FAILURE
This thread seems to say it's something wrong with Master/Slave:
https://groups.google.com/forum/?fromgroups=#!topic/jenkinsci-issues/MaMqjK3iW8Y
But it doesn't really offer a solution. The Jenkin slave says it's connected and it's reflected on the Jenkins project page.
Well apparently disabling the slave and rebooting it worked. bleh
If you don't want to reboot then simply kill these processes on the slave
$ ps -ef | grep java
1006 11948 11930 0 Jul17 ? 00:00:00 bash -c cd "/mnt/jenkins" && java -jar slave.jar
1006 11949 11948 0 Jul17 ? 00:02:55 java -jar slave.jar
Then launch the slave agent again
Got a quite similar error, and fixed it by reverting the "publish over ssh" plug-in from 1.14 to 1.13
Our Jenkins server is run on Debian 8.2 (Jessie), and our slaves under Ubuntu 14.04 (trusty)
Terminated the slave and launched it again. Working perfectly.