Code Monkey home page Code Monkey logo

Comments (3)

declanjryan avatar declanjryan commented on September 27, 2024

I'm having the same problem using v17.03.0 of the book on macOS 10.12.5. I followed these instructions, but couldn't make it work:

> sudo mkdir -p /var/jenkins_home
> cd /var/jenkins_home
> sudo chown -R 1000 /var/jenkins_home

I successfully completed the chapter using a VirtualBox CentOS as host (i.e., CentOS VM running docker that creates a Jenkins container that itself uses docker to create a test run) and file sharing from macOS with the CentOS host (and sharing internally with Jenkins).

That may work for others who want to work through the chapters while waiting for this issue to resolve.

from docker-jenkins-sample.

sspat avatar sspat commented on September 27, 2024

Same problem on Windows 10 using Docker Toolbox with Virtualbox, book version v17.12.0-ce.
opt/project/workspace directory is created during mounting but is empty, build fails on rake spec

from docker-jenkins-sample.

hubmeister avatar hubmeister commented on September 27, 2024

Similar problem as declanjryan while making the home directories and changing ownership.

Using book version:
Version: v18.03.1-ce (d498111)

The only way I could get the jenkins web interface to work on MacOSX, was to run docker like this:
sudo docker run -u root -d -p 8080:8080 -p 50000:50000
-v jenkins-data:/var/jenkins_home
-v /var/run/docker.sock:/var/run/docker.sock
--name jenkins
jamtur01/jenkins

Interesting that the first -v flag in listing 5.70 in the book calls for:
-v /var/jenkins_home:/var/jenkins_home

but I could not get this to work for the life of me, changing permissions and ownership and even trying /private/var/jenkins_home as James recommended for the Mac OS X users in Listing 5.68 on page 184, to no avail. Being new to docker, I'm not sure of the significance of the jenkin-data:/var/jenkins_home mapping but that seemed to at least get the container up and running so I could log into the web interface.

However, another thing I suggest is to select the "Install Suggested plugins" options on the Customize Jenkins, during the initial setup, otherwise, when James has you create your first build job on page 190, selecting the Git repository option under "Source Code Management" is not there as an option and to a rookie such as myself, you are left baffled, wondering how to enable this option.

Having said that, even after I was able to specify the git repository James setup for us, I was getting errors on the first build:

...
Commit message: "Update Dockerfile"
First time build. Skipping changelog.
FATAL: jenkins/scm/RunWithSCM
java.lang.NoClassDefFoundError: jenkins/scm/RunWithSCM
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
	at jenkins.util.AntClassLoader.defineClassFromData(AntClassLoader.java:1139)
	at hudson.ClassicPluginStrategy$AntClassLoader2.defineClassFromData(ClassicPluginStrategy.java:878)
	at jenkins.util.AntClassLoader.getClassFromStream(AntClassLoader.java:1310)
	at jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1366)
	at jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1326)
	at jenkins.util.AntClassLoader.loadClass(AntClassLoader.java:1079)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	at org.jenkinsci.plugins.workflow.job.WorkflowJob$SCMListenerImpl.onCheckout(WorkflowJob.java:653)
	at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:609)
	at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)
	at hudson.model.Run.execute(Run.java:1741)
	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
	at hudson.model.ResourceController.execute(ResourceController.java:98)
	at hudson.model.Executor.run(Executor.java:410)
Caused by: java.lang.ClassNotFoundException: jenkins.scm.RunWithSCM
	at jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1376)
	at jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1326)
	at jenkins.util.AntClassLoader.loadClass(AntClassLoader.java:1079)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	... 17 more
Finished: FAILURE

Looks like something to do with Java

from docker-jenkins-sample.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.