zeppelin无法与Cassandra(docker,windows 10 host)进行通信

时间:2016-10-10 16:48:28

标签: windows docker cassandra

我正在使用zeppelin的docker版本和另一个docker版本 卡桑德拉。他们两个都分开工作,但当我尝试运行一些 在zeppelin笔记本中的基本cassandra命令,我收到一个错误:

  

java.lang.ClassNotFoundException:scala.reflect.internal.Trees at   java.net.URLClassLoader.findClass(URLClassLoader.java:381)at   java.lang.ClassLoader.loadClass(ClassLoader.java:424)at   sun.misc.Launcher $ AppClassLoader.loadClass(Launcher.java:331)at at   java.lang.ClassLoader.loadClass(ClassLoader.java:357)at   java.lang.ClassLoader.defineClass1(Native Method)at   java.lang.ClassLoader.defineClass(ClassLoader.java:763)at   java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)     在java.net.URLClassLoader.defineClass(URLClassLoader.java:467)at   java.net.URLClassLoader.access $ 100(URLClassLoader.java:73)at   java.net.URLClassLoader $ 1.run(URLClassLoader.java:368)at   java.net.URLClassLoader $ 1.run(URLClassLoader.java:362)at   java.security.AccessController.doPrivileged(Native Method)at   java.net.URLClassLoader.findClass(URLClassLoader.java:361)at   java.lang.ClassLoader.loadClass(ClassLoader.java:424)at   sun.misc.Launcher $ AppClassLoader.loadClass(Launcher.java:331)at at   java.lang.ClassLoader.loadClass(ClassLoader.java:357)at   java.lang.ClassLoader.defineClass1(Native Method)at   java.lang.ClassLoader.defineClass(ClassLoader.java:763)at   java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)     在java.net.URLClassLoader.defineClass(URLClassLoader.java:467)at   java.net.URLClassLoader.access $ 100(URLClassLoader.java:73)at   java.net.URLClassLoader $ 1.run(URLClassLoader.java:368)at   java.net.URLClassLoader $ 1.run(URLClassLoader.java:362)at   java.security.AccessController.doPrivileged(Native Method)at   java.net.URLClassLoader.findClass(URLClassLoader.java:361)at   java.lang.ClassLoader.loadClass(ClassLoader.java:424)at   sun.misc.Launcher $ AppClassLoader.loadClass(Launcher.java:331)at at   java.lang.ClassLoader.loadClass(ClassLoader.java:357)at   org.fusesource.scalate.support.ScalaCompiler.generateSettings(ScalaCompiler.scala:123)     在   。org.fusesource.scalate.support.ScalaCompiler(ScalaCompiler.scala:59)     在   org.fusesource.scalate.support.ScalaCompiler $ .create(ScalaCompiler.scala:42)     在   org.fusesource.scalate.TemplateEngine.createCompiler(TemplateEngine.scala:231)     在   org.fusesource.scalate.TemplateEngine.compiler $ lzycompute(TemplateEngine.scala:221)     在   org.fusesource.scalate.TemplateEngine.compiler(TemplateEngine.scala:221)     在   org.fusesource.scalate.TemplateEngine.compileAndLoad(TemplateEngine.scala:757)     在   org.fusesource.scalate.TemplateEngine.compileAndLoadEntry(TemplateEngine.scala:699)     在   org.fusesource.scalate.TemplateEngine.liftedTree1 $ 1(TemplateEngine.scala:419)     在   org.fusesource.scalate.TemplateEngine.load(TemplateEngine.scala:413)     在   org.fusesource.scalate.TemplateEngine.load(TemplateEngine.scala:471)     在   org.fusesource.scalate.TemplateEngine.layout(TemplateEngine.scala:573)     在   。org.apache.zeppelin.cassandra.DisplaySystem $ NoResultDisplay $(DisplaySystem.scala:369)     在   org.apache.zeppelin.cassandra.DisplaySystem $ NoResultDisplay $(DisplaySystem.scala)     在   。org.apache.zeppelin.cassandra.EnhancedSession(EnhancedSession.scala:40)     在   。org.apache.zeppelin.cassandra.InterpreterLogic(InterpreterLogic.scala:98)     在   org.apache.zeppelin.cassandra.CassandraInterpreter.open(CassandraInterpreter.java:294)     在   org.apache.zeppelin.interpreter.LazyOpenInterpreter.open(LazyOpenInterpreter.java:69)     在   org.apache.zeppelin.interpreter.LazyOpenInterpreter.interpret(LazyOpenInterpreter.java:93)     在   org.apache.zeppelin.interpreter.remote.RemoteInterpreterServer $ InterpretJob.jobRun(RemoteInterpreterServer.java:390)     在org.apache.zeppelin.scheduler.Job.run(Job.java:176)at   org.apache.zeppelin.scheduler.ParallelScheduler $ JobRunner.run(ParallelScheduler.java:162)     在   java.util.concurrent.Executors $ RunnableAdapter.call(Executors.java:511)     在java.util.concurrent.FutureTask.run(FutureTask.java:266)at   java.util.concurrent.ScheduledThreadPoolExecutor中的$ ScheduledFutureTask.access $ 201(ScheduledThreadPoolExecutor.java:180)     在   java.util.concurrent.ScheduledThreadPoolExecutor中的$ ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)     在   java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)     在   java.util.concurrent.ThreadPoolExecutor中的$ Worker.run(ThreadPoolExecutor.java:617)     在java.lang.Thread.run(Thread.java:745)

     

-----------------------信息:

     

在docker网络上:两个容器都在基于自定义网桥的网络中运行。

     

命令运行zeppelin: docker run --name zeppelin -d -p 127.0.0.1:8080:8080 --network = flyingCassandra -v / d / Gdrive / dockerShipyards /体积/飞艇/:/ C / USR /飞艇/   飞艇

     

用于启动cassandra容器的bat文件的内容: powershell -Command"& {docker run --name myCassandra -p   127.0.0.1:9042:9042 -p 127.0.0.1:9160:9160 -d --network = flyingCassandra -vd:/ GDrive / dockerShipyards / volumes / myCassandra:/ USR /卡桑德拉   卡桑德拉:3.0;}"

     

生成的网络 PS D:_GDrive__dockerShipyards_>码头网络检查飞行卡桑德拉[       {           "姓名":" flyingCassandra",           " Id":" 0250fb1cbe9b3f83722975a05dcc7d97aafaa5b68e40d056d766277d078ddd67",           "范围":"本地",           "司机":"桥",           " EnableIPv6":false,           " IPAM":{               "司机":"默认",               "选项":{},               "配置":[                   {                       "子网":" 172.18.0.0/16",                       " Gateway":" 172.18.0.1"                   }               ]           },           "内部":错误,           "容器":{               " 0a07c4e94350ac04d205fd08b57fc538b58b4fa309274871265ceecf13c2945d":{                   "姓名":" myCassandra",                   " EndpointID":" 687701ecf617ef0f6df64553510577c6690058e253f00e72b33ce628bc76eee2",                   " MacAddress":" 02:42:ac:12:00:03",                   " IPv4Address":" 172.18.0.3/16",                   " IPv6Address":""               },               " 34d3225eb7d2974ff83a2d6fe437167110d13af67bca8d415ddf74e63faf6327":{                   "姓名":" Cassinterface",                   " EndpointID":" 8921e5b970bb40983cec6e1ff5a222beb94382a03a80e0d8e4271d17f270e0d2",                   " MacAddress":" 02:42:ac:12:00:04",                   " IPv4Address":" 172.18.0.4/16",                   " IPv6Address":""               },               " 904b3fe78a64d61a6e1ee07a7236483efbb9e2d9eed81347a035f4ed9056b143":{                   "姓名":" zeppelin",                   " EndpointID":" 436c5a749bda9b12b78bd5f6564d483d2f611345dff48c4ffc8cdc841573bda0",                   " MacAddress":" 02:42:ac:12:00:02",                   " IPv4Address":" 172.18.0.2/16",                   " IPv6Address":""               }           },           "选项":{},           "标签":{}       }]        PS D:_GDrive__dockerShipyards_>码头工人       集装箱ID图像命令创建状态端口
  名字   34d3225eb7d2 cassandra:3.0" /docker-entrypoint.s" 35分钟前上涨35分钟7000-7001 / tcp,7199 / tcp,9042 / tcp,9160 / tcp Cassinterface

904b3fe78a64 zeppelin" bin / zeppelin.sh" 2

  

小时前上一个小时127.0.0.1:8080->8080/tcp
  zeppelin

0a07c4e94350 cassandra:3.0

  

" /docker-entrypoint.s" 2小时前上涨2小时
  7000-7001 / tcp,127.0.0.1:9042-> 9042 / tcp,7199 / tcp,   127.0.0.1:9160->9160/tcp myCassandra PS D:_GDrive__dockerShipyards_>

     

测试CASSANDRA:        D:_GDrive__dockerShipyards_> powershell -Command"& {docker run -it --name Cassinterface --link myCassandra:cassandra --network = flyingCassandra --rm cassandra:3.0 cqlsh cassandra;}"

Connected to Test Cluster at cassandra:9042.
[cqlsh 5.0.1 | Cassandra 3.0.9 | CQL spec 3.4.0 | Native protocol v4]
Use HELP for help.
cqlsh> describe keyspaces

system_traces  system_schema  system_auth  system  system_distributed

cqlsh> describe cluster

Cluster: Test Cluster
Partitioner: Murmur3Partitioner

cqlsh>
     

Cassandra工作正常。

     

_____________ Zeppelin解释器设置:(主机为172.18.0.3,端口为9042,协议v4)

     

http://imgur.com/a/Hue5u

     

结果:[在此处输入图像说明] [1]

     

[1]:http://i.stack.imgur.com/38OMh.png

0 个答案:

没有答案