-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
After update 'zmq.error.ZMQError: Operation not permitted' problem #6677
Comments
Hi @ManPython thank you for submitting this issue. Is this a problem that you also face when running Jupyter Lab? This would be helpful in identifying whether this is a Jupyter issue or not. |
Yes, pure jupyter and jupyterlab. |
Looks it's can be problem due fact that jupyter not respecting the parameters for tcp as:
And the ports, coz not taking into --debug vars from c.KernelManager.connection_file and the ports, etc. always random. |
I made some test with downgrade around and I was suprised that no any version not respecting settings around |
Hi @ManPython thank you for the updates. A follow up question from triage, could you verify if any of the settings in the file where you are adding configuration details get loaded? We're also linking Jupyter_Client where the KernelManager reside, as it could be a matter of loading the settings to a different Kernel Manager class. (Thanks to @krassowski) |
The settings not working from json as file and as static config .py around KernelManager. |
Hi @ManPython - I'm not entirely sure I'm following the complete issue here, but regarding the My understanding is that attribute is configurable in name only. That is, the user can provide what is essentially the name of where they want configuration information stored, but any existing contents are not used and, indeed, overwritten with the port information determined at runtime [*]. Also, because multi-kernel applications, like Jupyter Notebook or Lab, can create and manage multiple kernels, the configurable setting is (at least up to today) ignored (and is where the [*] Another configurable approach that could be taken (and, again, really only applies to single-kernel applications) is that each of the ZMQ port values can be configured. As a result, I believe one could set their port values, then execute a notebook using It sounds like you'd like the ability to participate in environments in which port ranges are restricted. If so, the only Jupyter application that I'm aware of that enables the ability to honor port ranges is Jupyter Enterprise Gateway. It can be configured to choose ports from within a given range, as can the kernels it spawns. Because it is primarily used for launching remote kernels, each kernelspec can specify its own range of ports that, presumably, apply to the configuration on which kernels of that specification will run. |
And this is what not working for me, the ports are random due
But exist option that FreeBSD and admin require to usage only preserved ports due fact many users can use own and can be conflict, by this in some hosting panels are option ot reserve ports, and if user ussing other not have acess. Anyway.. if can't confirm seted own static ports from vars, then hard to say where is issue if not here. |
If you're seeing a connection file name like
The existing kernel framework does have an inherent race condition in play where the application creates the connection file, but the kernel (following its process launch) is what actually binds to the ports. As a result, those ports can be bound by other, related or unrelated, applications. This is a known issue within the ecosystem. EG mitigates this by asking a process that embeds the kernel to allocate the ports prior to starting the kernel (essentially eliminating the overhead of process startup and significantly decreasing the window of the race condition), but this can't be completely resolved until the kernel itself creates/binds the ports itself. How frequently is this error occurring? When it does occur are you able to determine what kind of load/activity is taking place on the server? If this is due to port conflicts, then the issue should be relatively intermittent, although would likely happen more frequently on more heavily loaded servers. |
It was plan exactly to call a
This same error around title issue is for jupyter notebook and jupyter lab, coz connection problem/sockets. Jupyter lab don't have own configuration around, I think.. not sure. I can say, that everything works time ago, but don't know what was changed and when.. eg. server update, configuration server update, or due my updated around jupyter, python, and adding 2 kernel as python311. And regarding venv I'm running jupyter by python37 and python311 and both problems are this same. But.. some accidental situations, where some kernels working, and code in jupyter as simple example works, but don't know reason why working sometimes as 1% of restarts. |
The (up to) 5 restart attempts you're seeing...
take place when the
Correct. Each kernel instance, which is one-to-one with a "running" notebook, which is one-to-one with a tab, will be associated with a
Each kernel instance uses 5 ZMQ ports. So if you have 3 kernels active on a server, those kernels are consuming 15 ports. Kernel implementations consume a connection file that contains that kernel's port and signature key information and nothing related to another kernel.
If your server is heavily loaded or has limited ports available for applications, this is the kind of behavior you'd see (relatively intermittent). However, if you're only seeing "simple" notebooks working, you may have issues with the more complex notebooks (and their associated kernels) running and exiting due to those kinds of issues. Those unexpected exits, however, would not occur until the first cell is submitted for execution. So, as a result, you would not see the sequence of 1 thru 5 restarts occurring because, in those cases, the kernel is able to start. So, you'd likely see automatic restarts succeed after the first attempt. Then, when the first cell (or problematic cell) is submitted, see the kernel restarted - indicating that that cell's content is causing the kernel's unexpected termination. I would recommend emulating your same environment on another server or desktop in order to capture data points from other configurations and try to determine if this is due to that particular server's configuration (or activity). |
More as restart via terminal or server as hardware, etc. more as result experiments around configurations.
By this answer is clear that is no sense to set static values for ports and any attempts to set for future with reservation not have sense..
I think this not have sense and it's not solution due on windows, desktop working, etc. but only FreeBSD I meet this issue. Eg. I have jupyter on p27, p37, p311 as venv and time ago works well, but after some updated around python (exactly when installed p311) all options not working normally. |
The issue is reagardin tcp |
Describe the bug
I can't recognize the real source of problem as it is IPython problem or notebook, cython, zmq, ipykernel ?
ipython/ipython#13867
OS: [e.g. iOS]
NAME=FreeBSD
VERSION=13.0-RELEASE-p11
VERSION_ID=13.0
Browser [FF]
Version [108.0.1]
Additional context
I upgraded everyting what was possible around jupyter. Works fine before I decided move to P311, no sucess then back to P378.. and ops.. this same error.
The text was updated successfully, but these errors were encountered: