IPython Notebook WebSocket connection failed - ipython

With Chrome/Firefox and IPython 1.1 under Windows 7 64bit I've got the error "WebSocket connection failed" on opening an existing IPython notebook if using automatic proxy configuration (with authentication) though the configuration file contains exception for localhost.
I poked a little bit around in Chrome (30) and found in the Javascript console (F12):
Kernel started: aec48410-068f-424f-8fc1-8fd229409e70 kernel.js:110
Starting WebSockets: ws://127.0.0.1:8888/kernels/aec48410-068f-424f-8fc1-8fd229409e70 kernel.js:143
WebSocket connection to 'ws://127.0.0.1:8888/kernels/aec48410-068f-424f-8fc1-8fd229409e70/iopub' failed: WebSocket is closed before the connection is established.
WebSocket connection to 'ws://127.0.0.1:8888/kernels/aec48410-068f-424f-8fc1-8fd229409e70/stdin' failed: WebSocket is closed before the connection is established.
WebSocket connection failed: ws://127.0.0.1:8888/kernels/aec48410-068f-424f-8fc1-8fd229409e70
Obviously the websocket server has been started and it is the right adress (same as output of ipython-notebook)
Any ideas? Thanks!

It is about proxy configuration: We have a proxy that needs authentication and it is normally automatically configured by a central configuration file.
In this file there is an exception for localhost but for some reason this does not work.
Manually configuring the proxy with authentication and adding localhost as an exception did the job. And that was the difference between Firefox and Chrome - I forgot that I configured them differently.

happened same with me. When I installed tensorflowjs, it downgraded my prompt-toolkit version to 1.0.14. To solve this issue just upgrade prompt-toolkit version to 3.0.5 by running the following code in your command prompt:
pip install prompt-toolkit==3.0.5

I ran into websocket closed/connection issues and zmq message arrived on closed channel when running jupyter notebook and jupyter lab. The issue was caused by running the xpython kernel. When I switched back to python3, all was good.

Related

VSCode remote debugging on NextCloudPi not working because SSH connection failed

Not really a question but already the answer. Just to save others from spending days on this task.
What I want to do
I want to extend the basic NextCloudPi image with some custom websites including PHP. For ease use of remote debugging I am using VSCode and Xdebug.
The Problem was
I can't get a SSH connection to my raspi from VSCode and therefore also PHP debugging didn't work. SSH connection to the raspi worked well with other tools (putty, PowerShell etc.). Also Xdebug was set properly on the raspi (according to phpinfo();). In the log of the ssh-plugin of VSCode the following error appeared:
Failed to set up socket for dynamic port forward to remote port 37399: Socket closed. Is the remote port correct?
Relevant Versions
NextCloudPi 1.36.3
Xdebug 3.0.4
VSCode 1.60.2 (RemoteSSH 0.65.8, PhpDebug 1.19.0)
The Solution is
After spending evenings of googling I found out that the TCP port forwarding of the raspi's SSH service has to be enabled which is not in the basic nextcloudpi-image. This thread gave me the final clue: VSCode Remote SSH Connection Failed
So just set in /etc/ssh/sshd_config AllowTcpForwarding to yes and everything should work as easy as described in all the manuals.

VS Code Remote-SSH: The vscode server failed to start SSH

I'm trying to connect to a server via remote-ssh extension for Visual Studio Code, however, I'm getting the following error:
The vscode server failed to start SSH
Everything is fine on the server-side, and the connection to this host worked fine for a while.
Any suggestions to re-access the server via remote-ssh extension?
After a while, I found a solution that can be useful to others.
In VS Code press:
CTRL + SHIFT + P
Type or select the option:
Remote-SSH: kill VS Code Server on Host...
Select the host name:
And after this procedure, try connecting again to the host.
That worked for me.
In my case it was ssh plugin issue. I updated remote ssh plugin then it worked
wrong proxy setting may cause problem.
If Remote-SSH: kill VS Code Server on Host command not work for you, open settings and clear proxy setting and retry.
Everything is fine on the server-side, and the connection to this host worked fine for a while.
In case it is a simple intermittent network issue, VSCode 1.70 (July 2022) will retry the connection for you (up to 5 times)
See issue 127565 and PR 156444
Retry up to 5 times the initial authority resolving and also retry up to 5 times the initial connection
When connecting to a remote, if the initial connection fails, we will give up. The idea was that retrying would be useless, since the initial setup might have failed.
But it is possible that perhaps it was an intermittent network error.
This is available in VSCode insiders today.
Update the Remote ssh
check file groups belongs to same group if you manually copied .vscode-server
Remote-SSH: kill VS Code Server on Host...
Didn't work for me, so I tried the other option:
Remote-SSH: Uninstall VS Code Server from Host...
It took a bit more time but worked for me!

Context Broker FI: Fatal Error (error starting REST interface)

I have stopped a virtual machine with CentOS running an instance of Context Broker. Upon relaunching the system with the enabler, the latter gives a Fatal Error. See the below log:
# contextBroker
INFO#13:18:32 contextBroker.cpp[1348]: Orion Context Broker is running
INFO#13:18:32 mongoGlobal.cpp[164]: Successful connection to database
INFO#13:18:32 contextBroker.cpp[1157]: Connected to mongo at localhost:orion
INFO#13:18:32 mongoGlobal.cpp[483]: Database Operation Successful ({ conditions.type: "ONTIMEINTERVAL" })
INFO#13:18:32 rest.cpp[901]: Fatal Error (error starting REST interface)
I'm working on the 4.1.2 version of Orion, CentOS 6 running in VirtualBox. Running with su because I get a permission denied on a log file error. For info, I have enabled bridging network connection just before the VM reboot.
Is it the fact that the broker was not closed correctly that there is something blocking its restart? (PS. yes I know that there is a nearly exact same error message in the administration guide, but I don't see any solutions there)
Thank you!
EDIT: one solution that works is uninstalling the contextBroker package and installing it again. I wish there was a cleaner way!
EDIT: this problem reproduces every time I kill the contextBroker application - then every time restarts don't help, reinstalling the package does.
Make sure there is no other instance of the broker running (ps aux | grep contextBroker), using the same port.
If there is another instance of the broker running, then the port will be taken and the REST initialization will fail.
About running as root because of log-file permissions ... Why not simply change the owner of the log-file instead?

Netbeans IDE8 Glassfish 4, GlassFish Server: Administrator port is occupied by null

I just downloaded Netbeans IDE7 with the Glassfish 4.
I just made a project to test it out and see how it goes, and I got this error right from the start:
Could not start GlassFish Server: DAS port is occupied while server is not running
[location]: Deployment error: Could not start GlassFish Server: DAS port is occupied while server is not running
See the server log for details.
BUILD FAILED (total time: 1 second)
I have reinstalled it three times, with the Glassfish and without and then later add it to Netbeans, i changed the domain.xml name="admin-listener" port="4848" to something different
i did this cmd code netstat -aon | find ":80" | find "LISTENING" and closed the programm.
i ran as administrator i think i did almost everyting but it wont simply run, and it keeps returning to the same error
usually i would have given up but this software is required for a school project.
i will try everything.
i hope someone can help me.
Thx in advance
You have to find the process that has taken the port you need. You can try finding it by running the terminal with the command:
netstat -aon | find ":80" | find "LISTENING"
Find the information you need and than kill the process with specific PID in Task Manager.
I hope you find this useful,
Thanks.
A few points:
Why not download NetBeans 8 that also includes GlassFish 4?
Assuming that you have successfully figured out that no other process is listening on port 4848, then Which version of the JDK are you using? Can you try JDK 7 if you are using JDK 8?
Looks like you are not alone - see NetBeans bug 237477.
Note that this isn't the only problem. I run on a Mac and can use the asadmin start command successfully on the remote server. IF I try to start it from NetBeans, it gives me this message.
One hint might be that the domain.xml file is set so that the listening port is 9090, the properties screen for the remote server, which I entered 9090 for, tells me the HTTP port is 23043. I can't edit it. Everytime I try to create that remote server it sets it to this value. The server will run fine if I start it by hand on the remote server, but NetBeans doesn't think it is running.
This occurs because I had to select domain2 because NetBeans says domain1 is already registered on my local machine. I wanted to have a local domain1 and a remote domain1 that are identical so I can test locally, and then deploy remotely.
This error message could be misleading, because it is the same when IP adress of glassfish server in netbeans settings is wrong (not port).
By my experience with this over win 8.1 + Netbeans 8.0 + Glassfish 4.0
The problem resides in permission of folder in windows that block the server execution
I solve the problem changing the permission of the glassfish/domain/domain1 folder for xxxx/user to totalcontrol
If this not solve your problem, try launch the server over console:
asadmin start-domain --verbose
And read the exceptions to try solve the problem.
-EDIT:
Reading other post to try help:
like this: Glassfish server started failed in netbeans 6.9
Or check your firewall:
allow >> C:\Program
Files\glassfish-X.X\glassfish\modules\glassfish.jar
In my case when using the command
netstat -aon | find ":4848" | find "LISTENING"
I noticed that one process was occupying this port. When checked what it was I noticed it was VMWare NAT controller, because I previously had configured a network adapter to listen to this port.
Just stopped all VMWare related services (in my case I didn't need them for development purposes), and solved the problem.
Go to Task Manager -> Services -> Stop Process whose PID IS 3136,2268,2468 ,23.... and near Range in PID. All processes near to the web server's PID.
It works for me on Windows 8.1 pro & Windows 7.
I had the same error message.
Turned out it was caused because my firewall blocked port 4848
May be late but I solved this issue by deleting the app server from the Netbeans and by adding it again. In my case Netbeans 8.2 and Payara 4.1 instead of Glassfish.
If you changed the host of Glassfish server then set it to localhost it should work.

Eclipse C/C++ Remote Debugging connection failed

i tried to apply a remote debugging session with Eclipse to a Windows XP remote pc. So i configured a Windows-Connection in "Debug Configuration" for a "C/C++ Remote Application". But it gives me the following Error message:
"Daemon failed to launch server on IP_ADDRESS using port 0.
Connection refused. Make sure that the DataStore daemon is running on
IP_ADDRESS"
What is the probleme here? Why is a "DataStore" needed, where to get it if it's necessary!?
To connect, a RSE Server has to run on windows box. This invokes the necessary daemon which eclipse wants to connect to.
This was helpful: http://www.eclipse.org/tm/
Along with this guide: http://help.eclipse.org/helios/index.jsp?topic=/org.eclipse.rse.doc.user/tasks/tbeginwindows.html