-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
websocket closing and/or on-open error #104
Comments
Hmm... I guess this one will be difficult to debug. Can you try again with |
Here's the backtrace:
Here's the websocket shell debug:
|
Please use triple backquotes when pasting backtrace and logs, otherwise they are not readable. I edited your comment above. You should have two WS logs "shell" and "iopub". You can open them using But I don't know what is happning here. Here is a somewhat brute force fix. What happens if you evaluate the following and then open the notebook? Do you still get the error? (defun ein:kernelinfo-new (kernel get-buffers)
) This code just skips extra stuff going on in on-open callback. Normally you should be able to use EIN without steps in this function. |
Here's the iopub debug:
When I create an empty kernelinfo-new, here's the new backtrace:
|
Ah, so that was not enough. How about this: (defun ein:kernel-run-after-start-hook (kernel)) |
Redefined both and here's the new backtrace:
|
After debugging a bit more, it looks like the port I was connected to (8888) was owned by a zombie ipython notebook that was not associated with my uid (which is why I didn't see it earlier). After killing it, all the problems go away. I can use ein in my standard emacs environment with no issue whatsoever. Using ipython notebook --pylab inline works fine too. Sorry for creating so much trouble! I wonder if the existing debug messages are sufficient to identify when the issue is on the server side? Will close this bug now. |
Well, I learned some lessons and reflected them to the bug report template: 7f17f3b |
On OS X, running emacs/ein via:
$ EMACS=/usr/local/Cellar/emacs/HEAD/Emacs.app/Contents/MacOS/Emacs lisp/zeroein.el
Steps to reproduce the problem
Expected output
The notebook opens, no error messages.
Your EIN configuration (in .emacs.d/init.el or somewhere else)
using zeroein
Your IPython configuration
ipython --version
):$ ipython --version
0.13.1
ipython notebook --port 9999
):ipython notebook
localhost:8888
Additional information (if any)
ipython + zmq installed installed by pip. zeromq=3.2.2 installed via
brew (pyzmq uses this version). tornado in ipython version 2.4.1,
pyzmq version 13.0.0.
System info:
Messages
debug-on-error=t websocket-debug=t websocket-callback-debug-on-error=nil ein:debug=t ein:log-level=debug ein:log-message-level=verbose
ein: [info] Opening notebook 62a49637-6b89-454d-bd2f-2ccf94e89fa1...
ein: [info] Worksheet Untitled0 is ready
Making mumamo-bug-3467-w14 local to temp while let-bound!
Tested for Bug 3467 => PASSED
ein: [info] Notebook Untitled0 is ready
ein: [info] Kernel started: bbbb69e9-11e1-4b50-ae1d-97f829d6a06b
ein: [info] Starting WS: "ws://127.0.0.1:8888/kernels/bbbb69e9-11e1-4b50-ae1d-97f829d6a06b"
Error found in callback
on-open': [cl-struct-websocket-frame text {"header":{"msg_id":"ca13c350-904d-4d01-9c00-5704851e363d","username":"username","session":"c4df7ad1-167e-4eda-8e7e-b1f592d6e8d9","msg_type":"execute_request"},"metadata":{},"content":{"code":"__import__('sys').stdout.write(__import__('os').getcwd())","silent":true,"user_variables":[],"user_expressions":{},"allow_stdin":false},"parent_header":{}} nil t] Error found in callback
on-open': (ein:$websocket-onopen accessing a non-ein:$websocket)Mark set [3 times]
websocket ws:///..../shell debug
[WS] Sending handshake, key: ZmplzHUA5XVNauqzmDppSA==, acceptance: j3zAZFvRpdQxQyRGIH7NORDvUfk=
[WS] Websocket opened
[WS] Received: HTTP/1.1 101 Switching Protocols
Upgrade: websocket
Connection: Upgrade
Sec-WebSocket-Accept: j3zAZFvRpdQxQyRGIH7NORDvUfk=
[WS] Checking for accept header: Sec-WebSocket-Accept: j3zAZFvRpdQxQyRGIH7NORDvUfk=
[WS] Checking for upgrade header
[WS] Checking for connection header
[WS] Sending frame, opcode: text payload: username=
[WS] Sending frame, opcode: text payload: {"header":{"msg_id":"ca13c350-904d-4d01-9c00-5704851e363d","username":"username","session":"c4df7ad1-167e-4eda-8e7e-b1f592d6e8d9","msg_type":"execute_request"},"metadata":{},"content":{"code":"import('sys').stdout.write(import('os').getcwd())","silent":true,"user_variables":[],"user_expressions":{},"allow_stdin":false},"parent_header":{}}
[WS] Closing websocket
[WS] State change to deleted
[WS] Sending handshake, key: IfcUBziTB2WzxAzQkfbczg==, acceptance: JC5x68G56ATrQ6hOHzc5aREqIZc=
[WS] Websocket opened
[WS] Received: HTTP/1.1 101 Switching Protocols
Upgrade: websocket
Connection: Upgrade
Sec-WebSocket-Accept: JC5x68G56ATrQ6hOHzc5aREqIZc=
[WS] Checking for accept header: Sec-WebSocket-Accept: JC5x68G56ATrQ6hOHzc5aREqIZc=
[WS] Checking for upgrade header
[WS] Checking for connection header
The text was updated successfully, but these errors were encountered: