Forums » Software Installation »
TransportError: Only one usage of each socket address (protocol/network address/port) is normally permitted
Added by Alexander Fieroch over 10 years ago
Hi,
I'm trying to get the Leginon Client (launcher.py) working on a windows microscope computer but I'm failing with
------
C:\Python27\Lib\site-packages\leginon>launcher.py
C:\Python27\lib\site-packages\leginon\gui\wx\ImagePanel.py:38: wxPyDeprecationWarning: Call to deprecated item 'InitAllImageHandlers'.
wx.InitAllImageHandlers()
C:\Python27\lib\site-packages\leginon\gui\wx\Icons.py:9: wxPyDeprecationWarning: Call to deprecated item 'InitAllImageHandlers'.
wx.InitAllImageHandlers()
C:\Python27\lib\site-packages\imageviewer\icons\__init__.py:5: wxPyDeprecationWarning: Call to deprecated item 'InitAllImageHandlers'.
wx.InitAllImageHandlers()
Traceback (most recent call last):
File "C:\Python27\Lib\site-packages\leginon\launcher.py", line 118, in <module>
l = leginon.gui.wx.Launcher.App(*args, **kwargs)
File "C:\Python27\lib\site-packages\leginon\gui\wx\Launcher.py", line 60, in init
wx.App.__init__(self, 0)
File "C:\Python27\lib\site-packages\wx-3.0-msw\wx\_core.py", line 8631, in init
self._BootstrapApp()
File "C:\Python27\lib\site-packages\wx-3.0-msw\wx\_core.py", line 8196, in BootstrapApp
return _core.PyApp__BootstrapApp(*args, **kwargs)
File "C:\Python27\lib\site-packages\leginon\gui\wx\Launcher.py", line 63, in OnInit
self.launcher = leginon.launcher.Launcher(self.name, **self.kwargs)
File "C:\Python27\lib\site-packages\leginon\launcher.py", line 23, in init
node.Node.__init__(self, name, session, **kwargs)
File "C:\Python27\lib\site-packages\leginon\node.py", line 82, in init
self.databinder = DataBinder(self, databinderlogger, tcpport=tcpport)
File "C:\Python27\lib\site-packages\leginon\databinder.py", line 20, in init
self.server = datatransport.Server(self, logger, tcpport=tcpport)
File "C:\Python27\lib\site-packages\leginon\datatransport.py", line 82, in init
self.servers[t] = t.Server(*args)
File "C:\Python27\lib\site-packages\leginon\tcptransport.py", line 29, in init
raise TransportError(string)
leginon.tcptransport.TransportError: Only one usage of each socket address (protocol/network address/port) is normally permitted
------
I'm remembering defining a port somewhere during setup but I do not find the configuration file where both above can be changed.
Can you help me?
Thanks & best regards,
Alexander
Replies (2)
RE: TransportError: Only one usage of each socket address (protocol/network address/port) is normally permitted - Added by Anchi Cheng over 10 years ago
Has this worked before ?
Please check that you don't have another Leginon Client running in the background first as it is the most likely reason, especially on 55555.
Is it possible that you have changed the range of ports that Leginon can use ? The default is 49152 to 65536. You can narrow it but 55555 must be allowed, plus a minimal of three others.
See Ports_used_by_Leginon
If you have made change of the port range and forgot, it is most likely in leginon/tcptransport.py and sinedon/tcptransport.py
If that is not the reason, give us more details about how you configured this Windows PC to allow socket connection by Leginon like those in
In addition run test1.py with the full range of the port to see if it opens a port at all.
RE: TransportError: Only one usage of each socket address (protocol/network address/port) is normally permitted - Added by Alexander Fieroch over 10 years ago
Got it! Very funny... I was wondering how you could know my port for configurating Gatan using the environment variable SERIALEMCCD_PORT. Changing this variable from 55555 to 55550 is working! Having a port range from 49152 to 65536 I set the only one that is not allowed... :-D
Maybe you should add in your documentation
https://emg.nysbc.org/projects/leginon/wiki/Install_SerialEM_DigitalMicrograph_plugin
that indeed you can choose an unused port but not port 55555! ;-)