USB connection to T4 attempts to access TCP socket and errors

6 posts / 0 new
Last post
AnimatronicDoggo
wrees's picture
USB connection to T4 attempts to access TCP socket and errors

I am trying to open a USB connection to a T4 via the LJM Library, but keep getting OS Errors related to accessing TCP sockets that are forbidden:

[{"created":"@1542663320.042000000","description":"OS Error","file":"..\src\core\lib\iomgr\tcp_server_windows.c","file_line":214,"os_error":"An attempt was made to access a socket in a way forbidden by its access permissions.\r\n","syscall":"bind","wsa_error":10013}]

 

This is not the full traceback, but is the root of it.

This error is coming when trying to call LJM_Open or LJM_OpenS (both in C++ and the Python wrapper). I have tried reinstalling the drivers and the LJM library to no avail. I have also tried restarting, as well as flat out disabling, the Windows firewall.

 

LabJack Support
LabJack Support's picture
Perhaps you are using ANY as

Perhaps you are using ANY as one of your parameters which would cause LJM to do a search?

AnimatronicDoggo
wrees's picture
The parameters I'm using (for

The parameters I'm using (for OpenS) are "T4", "USB", S/N

LabJack Support
LabJack Support's picture
Does the error go away if you

Does the error go away if you use LJM_WriteLibraryConfigS to set LJM_RPC_ENABLE to 0? LJM uses gRPC to coordinate device connections, which uses sockets. You can also use the startup configs to disable LJM_RPC_ENABLE, but they're overwritten when LJM is installed.

It's strange that I don't get this error. Are you using a non-admin account? Are you on a non-standard Windows computer? Please try installing to LJM 1.1900, if you don't already have it:

https://labjack.com/support/software/installers/ljm

AnimatronicDoggo
wrees's picture
Setting LJM_RPC_ENABLE to 0

Setting LJM_RPC_ENABLE to 0 did in fact fix the issue. I agree that it is very strange--I was using an admin account with standard Windows 10, and also have other machines where this wasn't happening.

 

Thank you!!

LabJack Support
LabJack Support's picture
Glad to hear that fixed it.

Glad to hear that fixed it.

If you happen to figure out what the difference is that causes it, I'd like to know so that I can fix it once and for all in LJM.