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

How to implement chronos debug in chronos2.5 #861

Open
ghost opened this issue Oct 26, 2017 · 0 comments
Open

How to implement chronos debug in chronos2.5 #861

ghost opened this issue Oct 26, 2017 · 0 comments

Comments

@ghost
Copy link

ghost commented Oct 26, 2017

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!

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

0 participants