How to run spark pad on docker on MacOS X?

Running a spark laptop using dockers on OSX (via boot2docker) doesn't seem to do anything. Here is the conclusion

pkerp@toc:~/apps/spark-notebook$ docker run -p 9000:9000 andypetrella/spark-notebook:0.1.4-spark-1.2.0-hadoop-1.0.4
Play server process ID is 1
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/opt/docker/lib/spark-repl_2.10-1.2.0-notebook.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/opt/docker/lib/ch.qos.logback.logback-classic-1.1.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/opt/docker/lib/org.slf4j.slf4j-log4j12-1.7.7.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
15/02/07 11:51:32 INFO play: Application started (Prod)
15/02/07 11:51:32 INFO play: Listening for HTTP on /0:0:0:0:0:0:0:0:9000

When I point my browser to http: // localhost: 9000 , it says that the webpage is not available. Am I missing something? Is something incorrectly configured?

+4
source share
3 answers

To run the spark notebook using boot2docker, you need an additional command to work.

In fact, port forwarding in the docker is not enough and should be done at the VM level, as well as to access the host (localhost / 127.0.0.1).

Here is the necessary additional command: VBoxManage modifyvm "boot2docker-vm" --natpf1 "tcp-port9000,tcp,,9000,,9000"

@see .

+7

ipython,

ipython notebook --no-browser --profile=pyspark --ip=*

open http://$(boot2docker ip):8888

.

0

:

➜ VBoxManage modifyvm "boot2docker-vm" --natpf1 "tcp-port9000,tcp,,9000,,9000" VBoxManage: error: The machine 'boot2docker-vm' is already locked for a session (or being unlocked) VBoxManage: error: Details: code VBOX_E_INVALID_OBJECT_STATE (0x80bb0007), component Machine, interface IMachine, callee nsISupports VBoxManage: error: Context: "LockMachine(a->session, LockType_Write)" at line 471 of file VBoxManageModifyVM.cpp

, , boot2docker...

1) boot2docker stop

2) VBoxManage modifyvm "boot2docker-vm" --natpf1 "tcp-port9000,tcp,,9000,,9000"

3) boot2docker start

0

All Articles