So, I made minor progress on the multi-tenancy with z-manager (albeit, slowly).
Since my last mail, 1. I switched to zeppelin hub login for authentication 2. Switched to Java 1.7 from 1.8 3. Switched to Scala 2.10 from 2.11 3. used image at nflabs/zeppelin-bhs-nov-13-with-zeppelinhub-integration-spark-1.4-hadoop2.0.0-mr1-cdh-4.7.1 I am able to start the notebook server on the container. However, I don't think it is successfully talking to my standalone spark cluster (see below). I have verified that both master/slave workers are up and running (I can submit jobs locally against them using the spark-shell) I am seeing messages like following on zeppelin notebook when I execute a cell: java.net.BindException: Failed to bind to: /192.168.99.100:49847: Service 'sparkDriver' failed after 16 retries! at org.jboss.netty.bootstrap.ServerBootstrap.bind(ServerBootstrap.java:272) at akka.remote.transport.netty.NettyTransport$$anonfun$listen$1.apply(NettyTransport.scala:393) at akka.remote.transport.netty.NettyTransport$$anonfun$listen$1.apply(NettyTransport.scala:389) at scala.util.Success$$anonfun$map$1.apply(Try.scala:206) at scala.util.Try$.apply(Try.scala:161) at scala.util.Success.map(Try.scala:206) at scala.concurrent.Future$$anonfun$map$1.apply(Future.scala:235) at scala.concurrent.Future$$anonfun$map$1.apply(Future.scala:235) at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:32) at akka.dispatch.BatchingExecutor$Batch$$anonfun$run$1.processBatch$1(BatchingExecutor.scala:67) at akka.dispatch.BatchingExecutor$Batch$$anonfun$run$1.apply$mcV$sp(BatchingExecutor.scala:82) at akka.dispatch.BatchingExecutor$Batch$$anonfun$run$1.apply(BatchingExecutor.scala:59) at akka.dispatch.BatchingExecutor$Batch$$anonfun$run$1.apply(BatchingExecutor.scala:59) at scala.concurrent.BlockContext$.withBlockContext(BlockContext.scala:72) at akka.dispatch.BatchingExecutor$Batch.run(BatchingExecutor.scala:58) at akka.dispatch.TaskInvocation.run(AbstractDispatcher.scala:41) at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:393) at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260) at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339) at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979) at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107) on the z-manager.log, I see following 404 at the end: Starting a Z-Manager server z-manager: 2015/11/15 16:28:10 DOCKER_HOSTS: 1 hosts z-manager: 2015/11/15 16:28:10 Host: 192.168.99.100, 1 users z-manager: 2015/11/15 16:28:10 user: asifimran z-manager: 2015/11/15 16:28:10 Dev mode: serving webapp from ../web/ui/public martini: 2015/11/15 16:28:10 listening on :3000 (production) z-manager: 2015/11/15 16:28:10 Running program version: 0.0.3 autoupdate: 2015/11/15 16:28:10 Defaulted HTTPClient martini: 2015/11/15 16:28:17 Started GET /api/v1/users/whoiam for [::1]:58362 z-manager: 2015/11/15 16:28:17 User: asifimran, proxy Hub: https://www.zeppelinhub.com/api/v1/users/whoiam -> https://www.zeppelinhub.com/api/v1/users/whoiam martini: 2015/11/15 16:28:17 Completed 200 OK in 403.976663ms martini: 2015/11/15 16:28:17 Started GET /api/v1/cluster for [::1]:58362 z-manager: 2015/11/15 16:28:17 User: asifimran, proxy Spark: http://192.168.99.1:8080/api/v1/cluster -> http://192.168.99.1:8080/json/ martini: 2015/11/15 16:28:17 Completed 200 OK in 94.62008ms martini: 2015/11/15 16:28:28 Started POST /api/v1/containers/create for [::1]:58362 z-manager: 2015/11/15 16:28:28 Can not pick a free port on http://192.168.99.100:7777, using 41825 instead. Reason: Get http://192.168.99.100:7777: dial tcp 192.168.99.100:7777: getsockopt: connection refused z-manager: 2015/11/15 16:28:28 Can not pick a free port on http://192.168.99.100:7777, using 49831 instead. Reason: Get http://192.168.99.100:7777: dial tcp 192.168.99.100:7777: getsockopt: connection refused z-manager: 2015/11/15 16:28:28 Can not pick a free port on http://192.168.99.100:7777, using 42651 instead. Reason: Get http://192.168.99.100:7777: dial tcp 192.168.99.100:7777: getsockopt: connection refused z-manager: 2015/11/15 16:28:28 Can not pick a free port on http://192.168.99.100:7777, using 9873 instead. Reason: Get http://192.168.99.100:7777: dial tcp 192.168.99.100:7777: getsockopt: connection refused z-manager: 2015/11/15 16:28:28 Can not pick a free port on http://192.168.99.100:7777, using 54255 instead. Reason: Get http://192.168.99.100:7777: dial tcp 192.168.99.100:7777: getsockopt: connection refused z-manager: 2015/11/15 16:28:28 Can not pick a free port on http://192.168.99.100:7777, using 50212 instead. Reason: Get http://192.168.99.100:7777: dial tcp 192.168.99.100:7777: getsockopt: connection refused z-manager: 2015/11/15 16:28:28 Can not pick a free port on http://192.168.99.100:7777, using 1099 instead. Reason: Get http://192.168.99.100:7777: dial tcp 192.168.99.100:7777: getsockopt: connection refused z-manager: 2015/11/15 16:28:28 User: asifimran, start container asifimran-1-4096m-41825, from image nflabs/zeppelin-bhs-nov-13-with-zeppelinhub-integration-spark-1.4-hadoop2.0.0-mr1-cdh-4.7.1:latest on https://192.168.99.100:2376 martini: 2015/11/15 16:28:32 Completed 200 OK in 4.681614958s martini: 2015/11/15 16:28:32 Started POST /api/v1/containers/list for [::1]:58362 z-manager: 2015/11/15 16:28:32 User: asifimran, listing containers on https://192.168.99.100:2376 martini: 2015/11/15 16:28:33 Completed 200 OK in 38.175745ms martini: 2015/11/15 16:28:36 Started GET /ws for [::1]:58388 z-manager: 2015/11/15 16:28:36 User: asifimran, proxy websocket: /ws -> ws://192.168.99.100:41825/ws martini: 2015/11/15 16:28:40 Started GET /zeppelin/api/notebook/interpreter/bind/2B73SVWUH for [::1]:58362 z-manager: 2015/11/15 16:28:40 User: asifimran, proxy Zeppelin: http://localhost/zeppelin/api/notebook/interpreter/bind/2B73SVWUH -> http://192.168.99.100:41825/api/notebook/interpreter/bind/2B73SVWUH martini: 2015/11/15 16:28:40 Completed 200 OK in 101.357274ms martini: 2015/11/15 16:31:33 Completed 200 OK in 10.981001ms martini: 2015/11/15 16:31:36 Started GET /zeppelin/api/notebook/interpreter/bind/2B68GWQQ5 for [::1]:58463 z-manager: 2015/11/15 16:31:36 User: asifimran, proxy Zeppelin: http://localhost/zeppelin/api/notebook/interpreter/bind/2B68GWQQ5 -> http://192.168.99.100:41825/api/notebook/interpreter/bind/2B68GWQQ5 martini: 2015/11/15 16:31:36 Completed 200 OK in 11.284047ms martini: 2015/11/15 16:31:39 Started PUT /zeppelin/api/notebook/interpreter/bind/2B68GWQQ5 for [::1]:58463 martini: 2015/11/15 16:31:39 Completed 404 Not Found in 244.147µs z-manager: 2015/11/15 16:31:40 Running program version: 0.0.3 z-manager: 2015/11/15 16:32:50 Running program version: 0.0.3 On Thu, Nov 12, 2015 at 11:31 PM, Asif Imran <[email protected]> wrote: > Hi Khalid, > > Thanks for your helpful comments. > > 1. I have enabled ${DOCKER_HOST},${DOCKER_PORT} variables via the docker > env variables, thusly: > eval "$(docker-machine env zmanager)" > > Therefore, ${DOCKER_HOST} resolves to tcp://192.168.99.100:2376 > > 2. I have (indirectly) verified that the daemon is running okay — assuming > "/api/v1/containers" is actually querying the Docker object > ( > https://github.com/NFLabs/z-manager/blob/master/multitenancy/server/main.go#L125 > ) > > > curl http://localhost:3000/api/v1/containers/images > > {"images":[{"Size":"0","id":"dae730ff441834dba07f662d6fe18a0c624ee0475b41c73f3a6121b7851256b1","tag":"ztrial1:latest"},{"Size":"0","id":"3bbbf0aca3593044c280551babb73f306c145fe512976015829cfc98d2b45d94","tag":"centos:centos6"},{"Size":"0","id":"0b90e3e501c3d986c1f03a72537f28545955560a7a264ef3f0ac6261ea7fd1bc","tag":"nflabs/zeppelin-bhs-aug-5-spark-1.4-hadoop-2.0.0-cdh-4.7.0:latest"}]} > > 3. In the same vein, if I query: > curl -v http://localhost:3000/api/v1/containers/list returns a 500 error > > Incidentally, I found that running docker machine requires a few > modifications, e.g., > > https://github.com/NFLabs/z-manager/blob/master/multitenancy/server/docker.go#L180 > must be changed to > > client, _ := docker.NewClientFromEnv() //this is recommended by > github.com/fsouza/go-dockerclient > > > Is there anything else I can do to debug this. > > Best, > Asif > > > On Thu, Nov 12, 2015 at 7:07 PM, Khalid Huseynov <[email protected]> > wrote: > >> Hello Asif, >> >> You don't need to have docker container running Zeppelin (z-manager would >> spin up one for you), however you need running docker daemon on >> ${DOCKER_HOST}:${DOCKER_PORT}. Currently DOCKER_HOST is commented out in >> z-manager.sh (assuming you export it in your environment), you can >> uncomment it though. DOCKER_PORT can also be changed depending on your >> docker setup. >> >> Answers to questions: >> 1) Dockerfile is for building your own image from Zeppelin build. You can >> specify the name of your build in here: >> https://github.com/NFLabs/zeppelin-manager/blob/master/multitenancy/Dockerfile#L26 >> 2) _config folder contains "defaultuser" folder ( >> https://github.com/NFLabs/z-manager/blob/master/multitenancy/server/z-manager.sh#L19) >> which is copied for every new user and mounted/bound to the conf folder of >> Zeppelin container. >> >> Kind regards, >> Khalid. >> >> On Fri, Nov 13, 2015 at 6:55 AM, Erdos <[email protected]> wrote: >> >>> Hi, >>> >>> I am trying to get multi-tenancy working with z-manager. I need some >>> help. >>> >>> My current use/test case: >>> 1. Set up standalone spark-cluster on my laptop (spark 1.4.1) >>> 2. Use docker containers using docker-machine (v0.4.1) and corresponding >>> VM on my laptop >>> 3. Run containerized zeppelin notebook with basic authentication >>> ie. **No Zeppelin Hub** >>> >>> >>> Steps completed/tried thus far: >>> 1. Installed spark-cluster (running locally and shows up on >>> http://localhost:8080) >>> 2. Installed z-manager >>> 3. Enabled Basic login service (in main.go) >>> var loginService = BasicLoginService{} >>> This also required me to handwire some authentication steps but I got >>> them working >>> 4. z-manager/multi-tenancy/build-all.sh compiles without any error >>> 5. start server with ./z-manager.sh >>> I see the following: >>> martini: 2015/11/11 23:23:13 listening on :3000 (development) >>> z-manager: 2015/11/11 23:23:13 Running program version: 0.0.3 >>> autoupdate: 2015/11/11 23:23:13 Defaulted HTTPClient >>> martini: 2015/11/11 23:23:25 Started GET /api/v1/users/whoiam for >>> [::1]:56534 >>> martini: 2015/11/11 23:23:25 Started GET /api/v1/cluster for >>> [::1]:56534 >>> z-manager: 2015/11/11 23:23:25 User: asifimran, proxy Spark: >>> http://localhost:8080/api/v1/cluster -> http://localhost:8080/json/ >>> martini: 2015/11/11 23:23:25 Completed 200 OK in 10.75563ms >>> martini: 2015/11/11 23:23:25 Started POST /api/v1/containers/list for >>> [::1]:56534 >>> martini: 2015/11/11 23:23:25 Completed 422 in 1.302455ms >>> >>> I am currently stuck with /api/v1/containers/list not working. I don't >>> know enough about golang to be able to debug this. >>> >>> I am not even sure if I need to have any docker containers running prior >>> to this step. A couple of questions: >>> 1) What is the purpose of the Dockerfile in under mutltenancy >>> 2) what are the files under _configs? >>> >>> >>> I would love to be able to contribute documentation once I figure this >>> out. >>> >>> >>> >>> Thanks for reading >>> Asif >>> >>> Details: >>> spark 1.4.1 >>> Docker version 1.8.2, build 0a8c2e3 >>> Scala version: 2.111.6 >>> Java 1.8.0_51 >>> >>> >>> >>> >>> >>> >>> >> >
