Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying to get mesos-plugin built against mesos 0.14.0 from mesosphere #1

Closed
rayrod2030 opened this issue Oct 9, 2013 · 5 comments
Closed

Comments

@rayrod2030
Copy link

We are running the mesosphere.io debian package of mesos 0.14.0 in our cluster and I was trying to get mesos-plugin to build against this version on my mac. I added the following to the pom.xml in order to access the mesos 0.14.0 jar file from the mesosphere maven repo:

 <repositories>
    <repository>
      <id>repo.jenkins-ci.org</id>
      <url>http://repo.jenkins-ci.org/public/</url>
    </repository>
    <repository>
      <id>mesosphere-public-repo</id>
      <name>Mesosphere Public Snapshot Repo</name>
      <url>http://s3.amazonaws.com/mesosphere-maven-public/</url>
    </repository>
  </repositories>

My dependencies have also been updated accordingly to grab 0.14.0:

<dependencies>
      <dependency>
          <groupId>org.apache.mesos</groupId>
          <artifactId>mesos</artifactId>
          <version>0.14.0</version>
      </dependency>
      <dependency>
          <groupId>com.google.protobuf</groupId>
          <artifactId>protobuf-java</artifactId>
          <version>2.4.1</version>
      </dependency>
  </dependencies>

This is the stack trace I get when running mvn package with this configuration:

[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building mesos 0.1.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-hpi-plugin:1.95:validate (default-validate) @ mesos ---
[INFO]
[INFO] --- maven-enforcer-plugin:1.0.1:enforce (enforce-maven) @ mesos ---
[INFO]
[INFO] --- maven-enforcer-plugin:1.0.1:display-info (display-info) @ mesos ---
[INFO] Maven Version: 3.1.0
[INFO] JDK Version: 1.7.0_25 normalized as: 1.7.0-25
[INFO] OS Info: Arch: x86_64 Family: mac Name: mac os x Version: 10.8.4
[INFO]
[INFO] --- maven-localizer-plugin:1.14:generate (default) @ mesos ---
[INFO]
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ mesos ---
[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 5 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.5:compile (default-compile) @ mesos ---
[INFO] Compiling 3 source files to /Users/rarodriguez/projects/mesos-plugin/target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /Users/rarodriguez/projects/mesos-plugin/src/main/java/org/jenkinsci/plugins/mesos/MesosCloud.java:[93,24] error: method load in class MesosNativeLibrary cannot be applied to given types;
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.705s
[INFO] Finished at: Wed Oct 09 00:09:41 EDT 2013
[INFO] Final Memory: 39M/399M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5:compile (default-compile) on project mesos: Compilation failure
[ERROR] /Users/rarodriguez/projects/mesos-plugin/src/main/java/org/jenkinsci/plugins/mesos/MesosCloud.java:[93,24] error: method load in class MesosNativeLibrary cannot be applied to given types;
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5:compile (default-compile) on project mesos: Compilation failure
/Users/rarodriguez/projects/mesos-plugin/src/main/java/org/jenkinsci/plugins/mesos/MesosCloud.java:[93,24] error: method load in class MesosNativeLibrary cannot be applied to given types;

    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:318)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:153)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:414)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:357)
Caused by: org.apache.maven.plugin.CompilationFailureException: Compilation failure
/Users/rarodriguez/projects/mesos-plugin/src/main/java/org/jenkinsci/plugins/mesos/MesosCloud.java:[93,24] error: method load in class MesosNativeLibrary cannot be applied to given types;

    at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:729)
    at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:128)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
    ... 19 more
[ERROR]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

I'm assuming at this point that the code is not compatible with 0.14.0?

@vinodkone
Copy link
Contributor

Hmm. That is surprising. It might be that the jar supplied by Mesossphere is not built from the correct sha. You could ask them to build the jar from mesos-0.14.0-rc5 tag or wait for the official 0.14.0 release which includes publishing the jar to Apache Maven repo.

@vinodkone
Copy link
Contributor

I published the proper 0.14.0 jar to the staging repository at https://repository.apache.org/content/repositories/orgapachemesos-148. Update your pom to point to this repo and do a "mvn clean package". Let me know if it works.

@rayrod2030
Copy link
Author

By switching to the repository you suggested and changing to mesos version 0.14.0-rc5 in the pom I was able to generate a clean build of mesos-plugin. However configuring the plugin in jenkins does not seem to be working for me. I am running jenkins 1.534 and when creating a cloud I'm pointing to my native mesos library on the server running jenkins at /usr/local/lib/libmesos.so as well as my mesos master on port 5050. When I try to test connection jenkins reports an exception:

javax.servlet.ServletException: java.lang.NullPointerException
    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:735)
    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:799)
    at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:239)
    at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:685)
    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:799)
    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:587)
    at org.kohsuke.stapler.Stapler.service(Stapler.java:218)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:45)
    at winstone.ServletConfiguration.execute(ServletConfiguration.java:248)
    at winstone.RequestDispatcher.forward(RequestDispatcher.java:333)
    at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:376)
    at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:96)
    at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:88)
    at winstone.FilterConfiguration.execute(FilterConfiguration.java:194)
    at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366)
    at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:48)
    at winstone.FilterConfiguration.execute(FilterConfiguration.java:194)
    at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366)
    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
    at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
    at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:164)
    at winstone.FilterConfiguration.execute(FilterConfiguration.java:194)
    at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366)
    at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:46)
    at winstone.FilterConfiguration.execute(FilterConfiguration.java:194)
    at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366)
    at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81)
    at winstone.FilterConfiguration.execute(FilterConfiguration.java:194)
    at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366)
    at winstone.RequestDispatcher.forward(RequestDispatcher.java:331)
    at winstone.RequestHandlerThread.processRequest(RequestHandlerThread.java:227)
    at winstone.RequestHandlerThread.run(RequestHandlerThread.java:150)
    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 winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:679)
Caused by: java.lang.NullPointerException
    at org.jenkinsci.plugins.mesos.MesosCloud$DescriptorImpl.doTestConnection(MesosCloud.java:232)
    at sun.reflect.GeneratedMethodAccessor248.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:616)
    at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:297)
    at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:160)
    at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:95)
    at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:111)
    at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:685)
    ... 39 more

I see the same results when testing from a local jenkins instance brought up with mvn hpi:run

@vinodkone
Copy link
Contributor

That seems to be a bug in how test connection! Thanks for the report. Committed a fix. Let me know if you are still having problems.

@rayrod2030
Copy link
Author

This fixed my connection issue thank you. Closing.

vinodkone pushed a commit that referenced this issue May 15, 2014
Updated mesos dependency to 0.18.1.
Vlatombe added a commit to Vlatombe/mesos-plugin that referenced this issue Jan 25, 2016
The current synchronized on MesosImpl method are pointless since what we are looking for is to lock access to JenkinsScheduler.

thread-deadlock : [Computer.threadPoolForRemoting [jenkinsci#4] locked on java.util.concurrent.locks.ReentrantLock$NonfairSync@7991f96c (owned by jenkins.util.Timer [jenkinsci#5]):
	 at sun.misc.Unsafe.park(Native Method)
	 at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
	 at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:836)
	 at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued(AbstractQueuedSynchronizer.java:870)
	 at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:1199)
	 at java.util.concurrent.locks.ReentrantLock$NonfairSync.lock(ReentrantLock.java:209)
	 at java.util.concurrent.locks.ReentrantLock.lock(ReentrantLock.java:285)
	 at hudson.slaves.NodeProvisioner.update(NodeProvisioner.java:187)
	 at hudson.slaves.NodeProvisioner.access$000(NodeProvisioner.java:58)
	 at hudson.slaves.NodeProvisioner$1.run(NodeProvisioner.java:173)
	 at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
	 at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	 at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	 at java.lang.Thread.run(Thread.java:745)
, Computer.threadPoolForRemoting [jenkinsci#1] locked on java.util.concurrent.locks.ReentrantLock$NonfairSync@55469258 (owned by jenkins.util.Timer [jenkinsci#5]):
	 at sun.misc.Unsafe.park(Native Method)
	 at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
	 at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:836)
	 at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued(AbstractQueuedSynchronizer.java:870)
	 at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:1199)
	 at java.util.concurrent.locks.ReentrantLock$NonfairSync.lock(ReentrantLock.java:209)
	 at java.util.concurrent.locks.ReentrantLock.lock(ReentrantLock.java:285)
	 at org.jenkinsci.plugins.mesos.JenkinsScheduler.supervise(JenkinsScheduler.java:848)
	 at org.jenkinsci.plugins.mesos.JenkinsScheduler.terminateJenkinsSlave(JenkinsScheduler.java:254)
	 at org.jenkinsci.plugins.mesos.MesosImpl.stopJenkinsSlave(MesosImpl.java:36)
	 at org.jenkinsci.plugins.mesos.MesosComputerLauncher.terminate(MesosComputerLauncher.java:122)
	 at org.jenkinsci.plugins.mesos.MesosSlave.terminate(MesosSlave.java:92)
	 at org.jenkinsci.plugins.mesos.MesosComputerLauncher.launch(MesosComputerLauncher.java:68)
	 at hudson.slaves.SlaveComputer$1.call(SlaveComputer.java:238)
	 at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46)
	 at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	 at java.lang.Thread.run(Thread.java:745)
, jenkins.util.Timer [jenkinsci#5] locked on org.jenkinsci.plugins.mesos.MesosImpl@5e9486e (owned by Computer.threadPoolForRemoting [jenkinsci#1]):
	 at org.jenkinsci.plugins.mesos.MesosImpl.isSchedulerRunning(MesosImpl.java:15)
	 at org.jenkinsci.plugins.mesos.MesosCloud.provision(MesosCloud.java:306)
	 at hudson.slaves.NodeProvisioner$StandardStrategyImpl.apply(NodeProvisioner.java:701)
	 at hudson.slaves.NodeProvisioner.update(NodeProvisioner.java:305)
	 at hudson.slaves.NodeProvisioner.access$000(NodeProvisioner.java:58)
	 at hudson.slaves.NodeProvisioner$NodeProvisionerInvoker.doRun(NodeProvisioner.java:796)
	 at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:51)
	 at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	 at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
	 at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
	 at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
	 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	 at java.lang.Thread.run(Thread.java:745)
jeremykuhnash referenced this issue in jeremykuhnash/mesos-plugin Apr 9, 2018
jeschkies pushed a commit that referenced this issue Nov 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants