guenter / mesos-getting-started

A tutorial that explains how to build a simple distributed fault-tolerant framework on top of Mesos
48 stars 14 forks source link

field state is not supported #1

Open deric opened 11 years ago

deric commented 11 years ago

Hi,

I trying to run the code from tutorial and I keep getting this error:

MESOS_HOME is not set. Defaulting to /usr/local
MESOS_NATIVE_LIBRARY set to /usr/local/lib/libmesos.so
Exception in thread "main" 2013-08-19 15:38:04,629:9093(0x7f2c8fc34700):ZOO_INFO@log_env@658: Client environment:zookeeper.version=zookeeper C client 3.3.4
2013-08-19 15:38:04,629:9093(0x7f2c8fc34700):ZOO_INFO@log_env@669: Client environment:os.name=Linux
2013-08-19 15:38:04,629:9093(0x7f2c8fc34700):ZOO_INFO@log_env@670: Client environment:os.arch=2.6.32-5-amd64
2013-08-19 15:38:04,629:9093(0x7f2c8fc34700):ZOO_INFO@log_env@671: Client environment:os.version=#1 SMP Fri May 10 08:43:19 UTC 2013
2013-08-19 15:38:04,629:9093(0x7f2c8fc34700):ZOO_INFO@log_env@679: Client environment:user.name=deric
2013-08-19 15:38:04,629:9093(0x7f2c8fc34700):ZOO_INFO@log_env@687: Client environment:user.home=/home/deric
2013-08-19 15:38:04,629:9093(0x7f2c8fc34700):ZOO_INFO@log_env@699: Client environment:user.dir=/home/deric/mesos-getting-started
2013-08-19 15:38:04,629:9093(0x7f2c8fc34700):ZOO_INFO@zookeeper_init@727: Initiating client connection, host=localhost:2181 sessionTimeout=10000 watcher=0x7f2c93903aa0 sessionId=0 sessionPasswd= context=0x955df0 flags=0
java.lang.NoSuchFieldError: __state2013-08-19 15:38:04,629:9093(0x7f2c8dc30700):ZOO_INFO@check_events@1585: initiated connection to server [127.0.0.1:2181]

        at org.apache.mesos.state.ZooKeeperState.initialize(Native Method)
        at org.apache.mesos.state.ZooKeeperState.(ZooKeeperState.java:53)
        at mesos.getting.started.Main$delayedInit$body.apply(Main.scala:35)
        at scala.Function0$class.apply$mcV$sp(Function0.scala:40)
        at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:12)
        at scala.App$$anonfun$main$1.apply(App.scala:71)
        at scala.App$$anonfun$main$1.apply(App.scala:71)
        at scala.collection.immutable.List.foreach(List.scala:318)
        at scala.collection.generic.TraversableForwarder$class.foreach(TraversableForwarder.scala:32)
        at scala.App$class.main(App.scala:71)
        at mesos.getting.started.Main$.main(Main.scala:12)
        at mesos.getting.started.Main.main(Main.scala)

The mesos version is 0.14 and zookeeper version is 3.4.5+dfsg-1~exp2. Mesos cluster coordinated by zookeeper. This error looks like the zookeeper driver is outdated.

curzonj commented 11 years ago

I got this issue when I ran marathon with a mesos native library that I had compiled myself from 0.14.0-rc3. When I switched to the mesos deb package linked to from the marathon README, the problem went away.

https://s3.amazonaws.com/mesos-pkg/master/ubuntu/12.04/mesos_0.14.0_amd64.deb SHA256: 5716cecf309b221ba2ab476afc3a4e119508f44e3de2cd035f8b521ec43f0db9

curzonj commented 11 years ago

See: http://mail-archives.apache.org/mod_mbox/mesos-dev/201310.mbox/%3C52618072.3080000@gmail.com%3E and https://reviews.apache.org/r/12441/

prayagupa commented 9 years ago

Same NoSuchFieldError: __state error with mesos 0.20.1, zookeeper-3.4.6, while running this example.

$ java -cp target/mesos-getting-started-0.1-SNAPSHOT.jar -Djava.library.path=$MESOS_HOME/build/src/.libs mesosphere.mesos_scala.Main "/bin/echo prayagupd"
2014-12-15 15:37:46,259:26339(0x7fef0c7de700):ZOO_INFO@log_env@712: Client environment:zookeeper.version=zookeeper C client 3.4.5
2014-12-15 15:37:46,259:26339(0x7fef0c7de700):ZOO_INFO@log_env@716: Client environment:host.name=prayagupd
2014-12-15 15:37:46,259:26339(0x7fef0c7de700):ZOO_INFO@log_env@723: Client environment:os.name=Linux
2014-12-15 15:37:46,259:26339(0x7fef0c7de700):ZOO_INFO@log_env@724: Client environment:os.arch=3.8.0-35-generic
2014-12-15 15:37:46,259:26339(0x7fef0c7de700):ZOO_INFO@log_env@725: Client environment:os.version=#50-Ubuntu SMP Tue Dec 3 01:24:59 UTC 2013
2014-12-15 15:37:46,259:26339(0x7fef0c7de700):ZOO_INFO@log_env@733: Client environment:user.name=prayagupd
Exception in thread "main" 2014-12-15 15:37:46,259:26339(0x7fef0c7de700):ZOO_INFO@log_env@741: Client environment:user.home=/home/prayagupd
2014-12-15 15:37:46,259:26339(0x7fef0c7de700):ZOO_INFO@log_env@753: Client environment:user.dir=/packup/workspace/smartad-mesos-zookeeper
2014-12-15 15:37:46,259:26339(0x7fef0c7de700):ZOO_INFO@zookeeper_init@786: Initiating client connection, host=localhost:2181 sessionTimeout=10000 watcher=0x7fef0edc7e70 sessionId=0 sessionPasswd=<null> context=0x7feefc001460 flags=0
2014-12-15 15:37:46,260:26339(0x7fef09fd9700):ZOO_INFO@check_events@1703: initiated connection to server [127.0.0.1:2181]
java.lang.NoSuchFieldError: __state
    at org.apache.mesos.state.ZooKeeperState.initialize(Native Method)
    at org.apache.mesos.state.ZooKeeperState.<init>(ZooKeeperState.java:53)
    at mesosphere.mesos_scala.Main$delayedInit$body.apply(Main.scala:35)
    at scala.Function0$class.apply$mcV$sp(Function0.scala:40)
    at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:12)
    at scala.App$$anonfun$main$1.apply(App.scala:71)
    at scala.App$$anonfun$main$1.apply(App.scala:71)
    at scala.collection.immutable.List.foreach(List.scala:318)
    at scala.collection.generic.TraversableForwarder$class.foreach(TraversableForwarder.scala:32)
    at scala.App$class.main(App.scala:71)
    at mesosphere.mesos_scala.Main$.main(Main.scala:12)
    at mesosphere.mesos_scala.Main.main(Main.scala)