mesos / chronos

Fault tolerant job scheduler for Mesos which handles dependencies and ISO8601 based schedules
http://mesos.github.io/chronos/
Apache License 2.0
4.39k stars 529 forks source link

How to implement chronos debug in chronos2.5 #861

Open ghost opened 7 years ago

ghost commented 7 years ago

Can someone suggest me how to implement the debugging for chronos 2.5 image Image: mesosphere/chronos:chronos-2.5.0-0.1.20170628182950.ubuntu1404-mesos-1.3.0

Docs: https://mesos.github.io/chronos/docs/debugging.html.

I have added the log4j.properties file and create the log dir added these two lines

RUN mkdir -p /var/log/chronos_log

ADD log4j.properties /chronos

Edited docker file :

FROM ubuntu:14.04

RUN echo "deb http://repos.mesosphere.io/ubuntu/ trusty main" > /etc/apt/sources.list.d/mesosphere.list && \ apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv E56151BF && \ apt-get update && \ apt-get install -y maven \ npm \ default-jdk \ mesos \ scala \ curl && \ apt-get clean all && \ ln -s /usr/bin/nodejs /usr/bin/node

ADD . /chronos

RUN mkdir -p /var/log/chronos_log

ADD log4j.properties /chronos

WORKDIR /chronos

RUN mvn clean package

EXPOSE 8080

ENTRYPOINT ["bin/start-chronos.bash"]

My log4j.properties :

log4j.rootLogger=info, stdout, R log4j.appender.stdout=org.apache.log4j.ConsoleAppender log4j.appender.stdout.layout=org.apache.log4j.PatternLayout

Pattern to output the caller's file name and line number.

log4j.appender.stdout.layout.ConversionPattern=%d %5p [%t] (%F:%L) - %m%n log4j.appender.R=org.apache.log4j.RollingFileAppender log4j.appender.R.File=/var/log/chronos_log log4j.appender.R.MaxFileSize=10MB

Keep nine backup file

log4j.appender.R.MaxBackupIndex=100 log4j.appender.R.layout=org.apache.log4j.PatternLayout log4j.appender.R.layout.ConversionPattern=%d %p %t %c - %m%n

i built the image and pushed to a private registry, but when i use the private docker image in marathon with

--Dlog4j.configuration file:///chronos/log4j.properties

, but the application is failing.

Has anyone succeeded in doing this, please share me how you build the docker image, should i pass any parameters while building the docker image?

Thanks!