Closed GoogleCodeExporter closed 9 years ago
My partner had same problem without fixing 0 0 30, so I guess that's not what's
it's causing this error.
Original comment by sungjin0...@gmail.com
on 1 Dec 2011 at 4:51
this happens if the python process running the menu is still running when you
restart opennero.
try to find it and kill it:
ps aux | grep YOUR_USER_NAME | grep python
if you see something that looks like python NERO/menu.py, note the process
number at the beginning of that line, and then call kill PROCESS_NUMBER.
On windows and Mac, you can do this with Task Manager and Activity Monitor
respectively.
Original comment by ikarpov
on 1 Dec 2011 at 12:24
Here is also a very good response from another student:
This doesn't have anything to do with the change you made. OpenNero
communicates with the control window through a port, and if it does not get a
chance to free the port when it shuts down, when it starts up again, it won't
be able to acquire the same port (because the OS still has it allocated).
It will work again eventually because the OS will eventually perceive that the
process which has that port allocated is now gone, but it takes a while
sometimes. You should always close OpenNero by hitting Esc to take you back to
the main window and then hitting the Exit button, instead of just hitting the
OS "close" button in the window border. In case you forget and the port gets
tied up, shutting down and restarting the machine will certainly free it. If
you're in the lab, you can just hop over to another machine for a little while.
For completeness, the relevant port is 8888. What I usually do is just change
the code so that it uses another port for a while. You have to change both
common/menu.py and NERO/menu_utils.py (that's from memory; sorry if he file
names are wrong). Just change the port number in both places to 8889 or
something.
Original comment by ikarpov
on 1 Dec 2011 at 12:26
Original comment by ikarpov
on 8 Dec 2011 at 2:44
Another approach to this issue is to just use the SO_REUSEADDR (
http://www.unixguide.net/network/socketfaq/4.5.shtml ) socket option to allow
binding again to the socket left in TIME_WAIT state. I have a attached a small
patch that does just that.
Small caveat: If there is an OpenNERO training session running and you open a
second one without closing the first, things can get messy (as in, one of them
won't work) as there is no single-instance check or an easy way to change ports
to run two sessions at the same time.
Original comment by cafede...@gmail.com
on 12 Dec 2011 at 12:05
Attachments:
Note: The problem with two sessions I mentioned is only relevant in Windows
AFAIK, as in Windows SO_REUSEADDR can steal sockets that are not in TIME_WAIT
unless they were bound using SO_EXCLUSIVEADDRUSE.
Original comment by cafede...@gmail.com
on 12 Dec 2011 at 12:09
Looks good, applying patch. Should be in the next binary release if it checks
out.
Original comment by ikarpov
on 1 Sep 2013 at 7:06
Fixed with latest trunk commit.
Original comment by ikarpov
on 12 Sep 2013 at 1:58
Original issue reported on code.google.com by
sungjin0...@gmail.com
on 1 Dec 2011 at 4:46