How to implement chronos debug in chronos2.5 · Issue #861 · mesos/chronos · GitHub
Skip to content

How to implement chronos debug in chronos2.5  #861

Open

Description

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!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions