Page 1 of 1

Could not open UDP port 4000 for listening

Posted: 24 Sep 2012, 09:04
by dcwang
Hi,
I used the version of BCI2000 downloaded from the link http://bci2000.org/downloads/bin/BCI2000Contrib.exe on Sep.22,2012.

I worked like this:
Start the computer -> run the BCI2000Launcher.exe, Everything is OK; but when I quit and re-run the BCI2000Launcher or one of the batch files, an error message in the "system log" window showed up saying that "- StateMachine::EventLink::OnExecute: EventLink: Could not open UDP port 4000 for listening". I checked the TCP/UDP port status using the 'netstat -an' command line, the UDP 4000 port was still active. It seems that we should close port 4000 before running the programme a second time. Then I switched to the old version I downloaded in 2011, and there was no such problem.

So, I think this may be a bug of the latest version BCI2000Contrib.exe.

Re: Could not open UDP port 4000 for listening

Posted: 25 Sep 2012, 13:20
by mellinger
Thank you for the bug report. I have never experienced this behavior, though. Does it also occur when you use a batch file for the first startup, rather than BCI2000Launcher? Does it always occur, or is it intermittent?

Regards,
Juergen

Re: Could not open UDP port 4000 for listening

Posted: 26 Sep 2012, 05:51
by dcwang
Hello again,

I just checked that out by using CursorTask_SignalGenerator.bat for both the first and the second startup. Same behavior was observed. Complete information in System Log window was:

2012-09-26T17:17:18 - StateMachine::EventLink::OnExecute: EventLink: Could not open UDP port 4000 for listening
2012-09-26T17:17:18 - Script error: D:\Program Files\BCI2000\batch\CursorTask_SignalGenerator.bat, line 32: Could not start up system

So, the problem appears to occur as 'always', at least on my computer, for so far I haven't run this version of BCI2000 on a second computer.

All the best,
Dongcui

Re: Could not open UDP port 4000 for listening

Posted: 27 Sep 2012, 14:12
by mellinger
Hi,

thanks for the details. I added a timeout to the opening of the port, which will hopefully solve the problem in future releases of BCI2000. You may update to the latest SVN version, and recompile the Operator module in order to get the bug fix.

Regards,
Juergen

Re: Could not open UDP port 4000 for listening

Posted: 15 Oct 2014, 01:15
by mihasv
Hello,
In windows we can see the open ports in 'cmd' window
type this > netstat -a -b -p UDP
then we see the port 4000 and program that use this port, to open port we need to close the programm and launche BCI2000
GoodLuck