Could not open UDP port 4000 for listening

Known Issues and Problems with BCI2000
Locked
dcwang
Posts: 2
Joined: 21 Aug 2011, 04:50

Could not open UDP port 4000 for listening

Post by dcwang » 24 Sep 2012, 09:04

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.

mellinger
Posts: 1210
Joined: 12 Feb 2003, 11:06

Re: Could not open UDP port 4000 for listening

Post by mellinger » 25 Sep 2012, 13:20

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

dcwang
Posts: 2
Joined: 21 Aug 2011, 04:50

Re: Could not open UDP port 4000 for listening

Post by dcwang » 26 Sep 2012, 05:51

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

mellinger
Posts: 1210
Joined: 12 Feb 2003, 11:06

Re: Could not open UDP port 4000 for listening

Post by mellinger » 27 Sep 2012, 14:12

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

mihasv
Posts: 1
Joined: 14 Feb 2013, 01:25

Re: Could not open UDP port 4000 for listening

Post by mihasv » 15 Oct 2014, 01:15

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

Locked

Who is online

Users browsing this forum: No registered users and 17 guests