Closed kohend closed 6 years ago
Hey @kohend,
thanks for you pushed docker image dkohen/debug:minimesos
. I started searching in your output --plugin_dir /marathon/plugin --plugin_conf /marathon/plugin-conf.json
and will sum up what I found inside your image:
root@7f3cc99cbf4e:/marathon# ls -la /marathon/plugin
total 12
drwxr-xr-x 2 root root 4096 Jul 13 07:58 .
drwxr-xr-x 17 root root 4096 Jul 13 07:58 ..
-rw-r--r-- 1 root root 289 Jul 3 13:37 plugins_2.11-0.1-SNAPSHOT.jar
root@7f3cc99cbf4e:/marathon# cd plugin
root@7f3cc99cbf4e:/marathon/plugin# unzip plugins_2.11-0.1-SNAPSHOT.jar
Archive: plugins_2.11-0.1-SNAPSHOT.jar
inflating: META-INF/MANIFEST.MF
root@7f3cc99cbf4e:/marathon/plugin# ls
META-INF plugins_2.11-0.1-SNAPSHOT.jar
root@7f3cc99cbf4e:/marathon/plugin# ls META-INF/
MANIFEST.MF
root@7f3cc99cbf4e:/marathon/plugin# cat /marathon/plugin-conf.json
{
"plugins": {
"envVarExtender": {
"plugin": "mesosphere.marathon.plugin.task.RunSpecTaskProcessor",
"implementation": "mesosphere.marathon.example.plugin.env.EnvVarExtenderPlugin",
"configuration": {
"env": {
"foo": "bar",
"key": "value"
}
}
}
}
}
root@7f3cc99cbf4e:/marathon/plugin#
As far as I can see, the provided plugin jar file is nearly empty. So probably something with the build process is not working properly. Can you verify that this file is empty (except the MANIFEST) on your box as well and explain how you build the jar?
Thanks Johannes
I built it using sbt clean pack
as the readme says, I can confirm it is indeed nearly empty on my box as well (I assumed the build to work if it doesn't visibly fail).
On the fork I checked (git@github.com:blackgold/marathon-vault-plugin.git) it does have all classes in the jar file but it is changing a lot of other things so I think getting the sample code to build properly would be best and hopefully I could take it from there myself.
@kohend could you post your build.sbt? When I had the same issue, I needed to add sbt pack settings to my build file so the pack
command would work as intended. (Specifically, I appended the following line):
packAutoSettings
@postmillenial The packAutoSettings is in the project.sbt file, I didn't change that.
@kohend Not sure if "project.sbt" was intentional but I'd check if it's in a build definition file that's actually being used, and that the other parameters in that file are correct.
Turns out that the jar file I used was not the correct one for the plugin, env/target/scala-2.11/env-plugin_2.11-1.0.jar worked.
● marathon.service - Scheduler for Apache Mesos Loaded: loaded (/lib/systemd/system/marathon.service; enabled; vendor preset: enabled) Active: active (running) since 五 2017-11-24 14:52:55 CST; 1s ago Process: 28396 ExecStartPre=/bin/chmod 755 /run/marathon (code=exited, status=0/SUCCESS) Process: 28389 ExecStartPre=/bin/chown marathon:marathon /run/marathon (code=exited, status=0/SUCCESS) Process: 28382 ExecStartPre=/bin/mkdir -p /run/marathon (code=exited, status=0/SUCCESS) Main PID: 28401 (java) Tasks: 70 Memory: 170.2M CPU: 2.453s CGroup: /system.slice/marathon.service └─28401 java -cp /usr/share/marathon/lib/mesosphere.marathon.marathon-1.5.2.jar:/usr/share/marathon/lib/mesosphere.marathon.plugin-interface-1
11月 24 14:52:55 node3 systemd[1]: Starting Scheduler for Apache Mesos... 11月 24 14:52:55 node3 systemd[1]: Started Scheduler for Apache Mesos. 11月 24 14:52:55 node3 marathon[28401]: No start hook file found ($HOOK_MARATHON_START). Proceeding with the start script.
root@node3:~# service marathon status ● marathon.service - Scheduler for Apache Mesos Loaded: loaded (/lib/systemd/system/marathon.service; enabled; vendor preset: enabled) Active: activating (auto-restart) (Result: exit-code) since 五 2017-11-24 14:56:05 CST; 50s ago Process: 29029 ExecStart=/usr/share/marathon/bin/marathon (code=exited, status=1/FAILURE) Process: 29026 ExecStartPre=/bin/chmod 755 /run/marathon (code=exited, status=0/SUCCESS) Process: 29019 ExecStartPre=/bin/chown marathon:marathon /run/marathon (code=exited, status=0/SUCCESS) Process: 29011 ExecStartPre=/bin/mkdir -p /run/marathon (code=exited, status=0/SUCCESS) Main PID: 29029 (code=exited, status=1/FAILURE)
11月 24 14:56:05 node3 systemd[1]: marathon.service: Unit entered failed state. 11月 24 14:56:05 node3 systemd[1]: marathon.service: Failed with result 'exit-code'.
where is the hook file ?
when I run commond of service marathon restart
I tried to add the jar file and the config file to the Marathon Docker image of minimesos and it seems to fail in loading the plugin despite the config being read properly (from what I can tell) and the file seen by Marathon.
I also added the directory that the plugin is in to the class path.