Blanco
Blanco

Reputation: 185

Jenkins Mesos -- Error: Unable to access jarfile

I am trying to run Jenkins using dynamically generated Docker containers via mesos.

WARNING: Logging before InitGoogleLogging() is written to STDERR
I0120 12:03:47.100700 26501 fetcher.cpp:76] Fetching URI 'http://172.17.20.31:3000/jnlpJars/slave.jar'
I0120 12:03:47.101023 26501 fetcher.cpp:126] Downloading 'http://172.17.20.31:3000/jnlpJars/slave.jar' to '/tmp/mesos/slaves/20150107-091931-521408940-5050-11185-S7/frameworks/20150107-105325-538186156-5050-11332-0354/executors/mesos-jenkins-4bcb550d-bbcf-41ef-9f60-a401f5e4e96d/runs/521ca7ef-1285-4e95-b7bb-09c33faa6286/slave.jar'
I0120 12:03:47.213743 26501 fetcher.cpp:255] Skipped extracting path '/tmp/mesos/slaves/20150107-091931-521408940-5050-11185-S7/frameworks/20150107-105325-538186156-5050-11332-0354/executors/mesos-jenkins-4bcb550d-bbcf-41ef-9f60-a401f5e4e96d/runs/521ca7ef-1285-4e95-b7bb-09c33faa6286/slave.jar'
I0120 12:03:48.002521 26540 exec.cpp:132] Version: 0.21.1
I0120 12:03:48.035147 26543 exec.cpp:206] Executor registered on slave 20150107-091931-521408940-5050-11185-S7
Error: Unable to access jarfile /mnt/mesos/sandbox/slave.jar

I have tried:

All with the same result.

Any suggestions?

Upvotes: 1

Views: 3114

Answers (2)

Abhay Agarwal
Abhay Agarwal

Reputation: 11

For anyone having this issue, this was caused by the mesos-slave being run from a docker container. We solved this by mounting this folder into the mesos slave:

/var/lib/mesos/slave:/var/lib/mesos/slave

That way, the files written to that directory inside the mesos slave docker also get written to the host drive.

Upvotes: 1

Adam
Adam

Reputation: 4322

By default, --docker_sandbox_directory is set to /mnt/mesos/sandbox, which should be a volume in the docker container that maps to /tmp/mesos/slaves/<slaveId>/frameworks/<frameworkId>/executors/<executorId>/runs/<taskId>/. Do you see slave.jar in the sandbox through the web UI? How about at the host path listed in the log? Does docker actually mount that sandbox directory into /mnt/mesos/sandbox/ inside the container? What are the permissions on slave.jar, and what user is trying to access it?

Upvotes: 1

Related Questions