Hi Guys, Finally we are able to run, After adding *--NotebookApp.disable_check_xsrf=True*
*working commands:* export TOKEN=$( head -c 30 /dev/urandom | xxd -p ) docker run --net=host -d -e CONFIGPROXY_AUTH_TOKEN=$TOKEN jupyter/configurable-http-proxy --default-target http://127.0.0.1:9999 docker run --net=host -d -e CONFIGPROXY_AUTH_TOKEN=$TOKEN -v /var/run/docker.sock:/docker.sock jupyter/tmpnb python orchestrate.py --image="jupyter/r-notebook" --allow_origin="*" --command="jupyter notebook --no-browser --port {port} --ip=* --NotebookApp.allow_origin=* --NotebookApp.base_url={base_path} --NotebookApp.token='' --NotebookApp.disable_check_xsrf=True" --cull-timeout=300 --cull_period=60 On Thursday, January 12, 2017 at 10:38:48 AM UTC-5, Dhanasekaran Anbalagan wrote: > > Hi Guys, > > Currenly I am trying with tmpnb with (OReily THEBE), Currenly I am getting > error starting notebook > > *XMLHttpRequest cannot load > http://192.168.70.54:8000/user/MCkTzGFH4xN1?token=fc868fcdf38d1e03d00aeef57bf5f5c91333de3e61e65325/api/kernels > > <http://192.168.70.54:8000/user/MCkTzGFH4xN1?token=fc868fcdf38d1e03d00aeef57bf5f5c91333de3e61e65325/api/kernels>. > > No 'Access-Control-Allow-Origin' header is present on the requested > resource. Origin 'http://localhost:5555 <http://localhost:5555>' is > therefore not allowed access. The response had HTTP status code 405.* > > export TOKEN=$( head -c 30 /dev/urandom | xxd -p ) > docker run --net=host -d -e CONFIGPROXY_AUTH_TOKEN=$TOKEN --name=proxy > jupyter/configurable-http-proxy --default-target http://127.0.0.1:9999 > docker run -d \ > --net=host \ > --name=tmpnb \ > -e CONFIGPROXY_AUTH_TOKEN=$TOKEN \ > -v /var/run/docker.sock:/docker.sock \ > jupyter/tmpnb \ > python orchestrate.py --use_tokens=1 > --image='jupyter/minimal-notebook' --allow-origin='*' \ > --command='start-notebook.sh \ > "--NotebookApp.base_url={base_path} \ > --ip=0.0.0.0 \ > --port={port} \ > --NotebookApp.trust_xheaders=True" \ > --NotebookApp.allow_origin='*' \ > --NotebookApp.token=''' > > Web Console I see the following error: > ============================== > Thebe is in tmpnb mode > main-built.js:28 cookie was wrong/outdated, call spawn as needed > main-built.js:28 Tmpnb server seems to be up > main-built.js:28 Thebe: start > main-built.js:28 show cell state: start for 0 > main-built.js:28 call spawn > main-built.js:28 spawn handler called > main-built.js:28 tmpnb says we should use > main-built.js:28 > http://192.168.70.54:8000/user/MCkTzGFH4xN1?token=fc868fcdf38d1e03d00aeef57bf5f5c91333de3e61e65325/ > main-built.js:28 start_kernel with > http://192.168.70.54:8000/user/MCkTzGFH4xN1?token=fc868fcdf38d1e03d00aeef57bf5f5c91333de3e61e65325/ > jquery-2.1.4.min.js:4 POST > http://192.168.70.54:8000/user/MCkTzGFH4xN1?token=fc868fcdf38d1e03d00aeef57bf5f5c91333de3e61e65325/api/kernels > > send @ jquery-2.1.4.min.js:4ajax @ jquery-2.1.4.min.js:4o.start @ > main-built.js:20e.start_kernel @ main-built.js:28(anonymous function) @ > main-built.js:28e.spawn_handler @ main-built.js:28(anonymous function) @ > main-built.js:28(anonymous function) @ main-built.js:28 > (index):1 XMLHttpRequest cannot load > http://192.168.70.54:8000/user/MCkTzGFH4xN1?token=fc868fcdf38d1e03d00aeef57bf5f5c91333de3e61e65325/api/kernels. > > No 'Access-Control-Allow-Origin' header is present on the requested > resource. Origin 'http://localhost:5555' is therefore not allowed access. > The response had HTTP status code 405. > main-built.js:6 Object {readyState: 0, responseJSON: undefined, status: 0, > statusText: "error"} > main-built.js:6 API request failed (0): error > main-built.js:28 Ajax Error! > main-built.js:28 Thebe: disconnected > > Please guide me How to fix this. > > On Monday, July 11, 2016 at 4:41:29 PM UTC-4, Timothy Hogan wrote: >> >> Thanks so much Kyle! Your solution worked! >> >> On Monday, 11 July 2016 11:21:33 UTC-4, rgbkrk wrote: >>> >>> Hey Timothy, >>> >>> Both tmpnb _and_ the notebook in the docker container have to change the >>> origin headers for use by Thebe. >>> >>> For tmpnb, the option is titled --allow-origin ( >>> https://github.com/jupyter/tmpnb#options) >>> >>> On Sun, Jul 10, 2016 at 2:13 PM, Timothy Hogan <[email protected]> >>> wrote: >>> >>>> I set up tmpnb on Docker as instructed on Github >>>> >>>> It can be accessed via the browser, on http://192.168.99.100:8000. >>>> This works as expected >>>> >>>> I am trying to connect a "Python Fiddle" type frontend (OReily THEBE) >>>> to the tmpnb environment. >>>> >>>> I can connect thebe to "tmpnb.org" and to a kernel running on my local >>>> computer. Both work as expected. >>>> >>>> When I change the URL to http://192.168.99.100:8000, the connection is >>>> not made. >>>> >>>> When I check the Web Console I see the following error: >>>> >>>> *XMLHttpRequest cannot load http://192.168.99.100:8000/api/spawn/ >>>> <http://192.168.99.100:8000/api/spawn/>. No 'Access-Control-Allow-Origin' >>>> header is present on the requested resource.* >>>> >>>> I have tried starting the notebook, with including the following >>>> commands >>>> >>>> --NotebookApp.trust_xheaders=True >>>> >>>> --NotebookApp.allow_origin=* >>>> >>>> >>>> Yet this does not solve the problem. >>>> >>>> >>>> If I don't use '--NotebookApp.allow_origin=*' on my local computer, >>>> when I start up the system, I get the same error. >>>> >>>> >>>> I do not see any errors in my docker containers >>>> >>>> >>>> What additional steps do I need to take? >>>> >>>> Thank you! >>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "Project Jupyter" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to [email protected]. >>>> To post to this group, send email to [email protected]. >>>> To view this discussion on the web visit >>>> https://groups.google.com/d/msgid/jupyter/374fe7d1-ec41-48af-83ac-26ee18b48f9d%40googlegroups.com >>>> >>>> <https://groups.google.com/d/msgid/jupyter/374fe7d1-ec41-48af-83ac-26ee18b48f9d%40googlegroups.com?utm_medium=email&utm_source=footer> >>>> . >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>> >>> >>> >>> -- >>> Kyle Kelley (@rgbkrk <https://twitter.com/rgbkrk>; lambdaops.com) >>> >> -- You received this message because you are subscribed to the Google Groups "Project Jupyter" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/df6b50dd-f40d-41a6-b68d-f351507676ee%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
