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

Kafka-mesos jar not found in current dir #172

Closed
frankscholten opened this issue Jan 10, 2016 · 6 comments
Closed

Kafka-mesos jar not found in current dir #172

frankscholten opened this issue Jan 10, 2016 · 6 comments

Comments

@frankscholten
Copy link
Contributor

The problem

I tried running Kafka on minimesos and noticed that the scheduler requires the kafka-mesos jar to be available in the sandbox. See the stderr logs.

WARNING: terminal is not fully functional
WARNING: Logging before InitGoogleLogging() is written to STDERR
I0110 01:10:16.338825 14080 process.cpp:995] libprocess is initialized on 172.17.0.6:54103 for 8 cpus
I0110 01:10:16.339066 14080 logging.cpp:172] INFO level logging started!
I0110 01:10:16.339236 14080 logging.cpp:177] Logging to /var/log
I0110 01:10:16.339642 14080 exec.cpp:134] Version: 0.25.0
I0110 01:10:16.340152 14085 exec.cpp:184] Executor started at: executor(1)@172.17.0.6:54103 with pid 14080
I0110 01:10:16.341146 14088 exec.cpp:208] Executor registered on slave ef6bdeb8-cd19-4ad2-baa9-6b0593787e49-S0
I0110 01:10:16.341588 14088 exec.cpp:220] Executor::registered took 49563ns
I0110 01:10:16.341641 14088 exec.cpp:295] Executor asked to run task 'kafka-mesos-scheduler.e891e33c-b736-11e5-a399-0242ac110005'
I0110 01:10:16.341676 14088 exec.cpp:304] Executor::launchTask took 21761ns
I0110 01:10:16.342524 14081 exec.cpp:517] Executor sending status update TASK_RUNNING (UUID: b2fd49e9-9d96-4a6b-acc1-2dc59f6694a0) for task kafka-mesos-scheduler.e891e33c-b736-11e5-a399-
0242ac110005 of framework ef6bdeb8-cd19-4ad2-baa9-6b0593787e49-0000
I0110 01:10:16.404819 14082 exec.cpp:341] Executor received status update acknowledgement b2fd49e9-9d96-4a6b-acc1-2dc59f6694a0 for task kafka-mesos-scheduler.e891e33c-b736-11e5-a399-0242
ac110005 of framework ef6bdeb8-cd19-4ad2-baa9-6b0593787e49-0000
tput: No value for $TERM and no -T specified
Exception in thread "main" java.lang.IllegalStateException: kafka-mesos.*\.jar not found in current dir
        at ly.stealth.mesos.kafka.HttpServer$.resolveDeps(HttpServer.scala:92)
        at ly.stealth.mesos.kafka.HttpServer$.start(HttpServer.scala:44)
        at ly.stealth.mesos.kafka.Scheduler$.start(Scheduler.scala:342)
        at ly.stealth.mesos.kafka.Cli$SchedulerCli$.handle(Cli.scala:369)
        at ly.stealth.mesos.kafka.Cli$.exec(Cli.scala:54)
        at ly.stealth.mesos.kafka.Cli$.main(Cli.scala:36)
        at ly.stealth.mesos.kafka.Cli.main(Cli.scala)
I0110 01:10:16.744897 14086 exec.cpp:517] Executor sending status update TASK_FAILED (UUID: 1fe9a831-6fab-49dd-9139-ba74ac711805) for task kafka-mesos-scheduler.e891e33c-b736-11e5-a399-0
242ac110005 of framework ef6bdeb8-cd19-4ad2-baa9-6b0593787e49-0000
I0110 01:10:16.797904 14083 exec.cpp:341] Executor received status update acknowledgement 1fe9a831-6fab-49dd-9139-ba74ac711805 for task kafka-mesos-scheduler.e891e33c-b736-11e5-a399-0242
ac110005 of framework ef6bdeb8-cd19-4ad2-baa9-6b0593787e49-0000

Steps to reproduce

  • Check out mesos-kafka and build
  • Use minimesos master branch
  • cd to mesos-kafka git working dir
  • $ minimesos up
  • Create the following file kafka.json
{
    "id":"kafka-mesos-scheduler",
    "cpus": 0.5,
    "mem": 256,
    "ports": [7000],
    "cmd": "java -jar /home/path/to/mesos-kafka/kafka-mesos-0.9.4.0.jar scheduler --master=zk://minimesos-zookeeper:2181 --zk=minimesos-zookeeper:2181 --api=http://localhost:7000 --storage=zk:/kafka-mesos",
    "instances": 1
}
  • $ minimesos install kafka.json
  • $ docker exec -it $AGENT
  • Check logs in /tmp/mesos/slaves/...

Possible solution

How about packaging the executor jar inside the scheduler jar and serve it as a resource. We used this resource technique in Mesos Elasticsearch. See the SimpleFileServer and the Main which initializes the server with the Elasticsearch executor jar.

@frankscholten
Copy link
Contributor Author

@joestein Currently adding Jar support to http://github.com/mesos/logstash as well. Are you interested in a PR to solve this issue?

@joestein
Copy link
Contributor

Hey Frank, that sounds like an interesting addition. It is important to not break the functionality of the executor being independent from the scheduler it is how we can run different kafka broker binary versions through the scheduler. It is quite vital to working with kafka so you can run a different branch, patch or distro without being pinned to any one Kafka version/binary. If you can make a PR that solves the issue without changing and breaking the multiple version/binary compatibility that would be great. Maybe something like "if not specified/found" then use the scheduler supplied executor or something maybe that would work @dmitrypekar might have another recommend or maybe you can come up with an approach.

@dmitrypekar
Copy link
Contributor

I would recommend to add --jar and --kafka options having default values: kafka-mesos*.jar, kafka*.tgz. This way it would be possible to override the place from which jar and distro is loaded
for those corner cases.

That approach seems to be straightforward and consistent with mechanism for specifying jre path that exists now.

@frankscholten
Copy link
Contributor Author

Instead of adding Jar support I added a minimesos quickstart script in #183

Steps to run Mesos Kafka

  1. Install minimesos by running
    curl -sSL https://minimesos.org/install | sh
  2. Determine the wlan0 or eth0 IP address of your machine
  3. Run the quickstart script with the IP
    ./quickstart.sh 192.168.X.X

and off you go.

@jiteshsharma
Copy link

I am getting this error on running the quickstart.sh script
Unable to find image 'vagrant/kafka-mesos:latest' locally
Pulling repository docker.io/vagrant/kafka-mesos
docker: Error: image vagrant/kafka-mesos not found.

@frankscholten
Copy link
Contributor Author

@jiteshsharma First build the Mesos Kafka Docker image in src/docker/Dockerfile

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

4 participants