Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

usbipd: error: Server is currently not running. #122

Closed
graydonli opened this issue Nov 30, 2021 · 10 comments
Closed

usbipd: error: Server is currently not running. #122

graydonli opened this issue Nov 30, 2021 · 10 comments

Comments

@graydonli
Copy link

Please run with usbipd server Logging:LogLevel:Default=Trace for running usbipd server as windows Administrator mode in cmd.exe

Originally posted by @dorssel in #96 (comment)

@graydonli
Copy link
Author

If you meet the problem "usbipd: error: Server is currently not running", Please run with usbipd server Logging:LogLevel:Default=Trace

@m4l490n
Copy link

m4l490n commented Jan 10, 2022

If you meet the problem "usbipd: error: Server is currently not running", Please run with usbipd server Logging:LogLevel:Default=Trace

Do I have to do this every time? Isn't it supposed to start automatically?

@dorssel
Copy link
Owner

dorssel commented Jan 11, 2022

@m4l490n
No, the service should start automatically on Windows boot. If it does not, please check the status in Windows Service manager. It should be set to "Automatic Start". If it is, and the service is not running, then please check the Windows Event Log, it should have an entry with a crash report on what went wrong. Please post it here.

@JohnBerg60
Copy link

Same problem here. Occurs after debugging with a STLINK-V2 device. After starting the USBIP Device Host in the Service mananger, I am back in business.

Log Name:      Application
Source:        usbipd-win
Date:          11-1-2022 18:26:23
Event ID:      3
Task Category: None
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      JOHN-LEGION5
Description:
Category: UsbIpServer.ConnectedClient
EventId: 3

An exception occurred while communicating with the client:

Exception: 
System.IO.IOException: Unable to read data from the transport connection: An established connection was aborted by the software in your host machine..
 ---> System.Net.Sockets.SocketException (10053): An established connection was aborted by the software in your host machine.
   --- End of inner exception stack trace ---
   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource<System.Int32>.GetResult(Int16 )
   at UsbIpServer.Tools.ReadExactlyAsync(Stream stream, Memory`1 buf, CancellationToken cancellationToken) in D:\a\usbipd-win\usbipd-win\UsbIpServer\Tools.cs:line 23
   at UsbIpServer.Interop.UsbIp.ReadUsbIpHeaderAsync(Stream stream, CancellationToken cancellationToken) in D:\a\usbipd-win\usbipd-win\UsbIpServer\Interop\UsbIp.cs:line 184
   at UsbIpServer.AttachedClient.RunAsync(CancellationToken cancellationToken) in D:\a\usbipd-win\usbipd-win\UsbIpServer\AttachedClient.cs:line 477
   at UsbIpServer.ConnectedClient.HandleRequestImportAsync(CancellationToken cancellationToken) in D:\a\usbipd-win\usbipd-win\UsbIpServer\ConnectedClient.cs:line 207
   at UsbIpServer.ConnectedClient.HandleRequestImportAsync(CancellationToken cancellationToken) in D:\a\usbipd-win\usbipd-win\UsbIpServer\ConnectedClient.cs:line 228

Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="usbipd-win" />
    <EventID Qualifiers="0">3</EventID>
    <Version>0</Version>
    <Level>2</Level>
    <Task>0</Task>
    <Opcode>0</Opcode>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2022-01-11T17:26:23.8625797Z" />
    <EventRecordID>10710</EventRecordID>
    <Correlation />
    <Execution ProcessID="0" ThreadID="0" />
    <Channel>Application</Channel>
    <Computer>JOHN-LEGION5</Computer>
    <Security />
  </System>
  <EventData>
    <Data>Category: UsbIpServer.ConnectedClient
EventId: 3

An exception occurred while communicating with the client:

Exception: 
System.IO.IOException: Unable to read data from the transport connection: An established connection was aborted by the software in your host machine..
 ---&gt; System.Net.Sockets.SocketException (10053): An established connection was aborted by the software in your host machine.
   --- End of inner exception stack trace ---
   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource&lt;System.Int32&gt;.GetResult(Int16 )
   at UsbIpServer.Tools.ReadExactlyAsync(Stream stream, Memory`1 buf, CancellationToken cancellationToken) in D:\a\usbipd-win\usbipd-win\UsbIpServer\Tools.cs:line 23
   at UsbIpServer.Interop.UsbIp.ReadUsbIpHeaderAsync(Stream stream, CancellationToken cancellationToken) in D:\a\usbipd-win\usbipd-win\UsbIpServer\Interop\UsbIp.cs:line 184
   at UsbIpServer.AttachedClient.RunAsync(CancellationToken cancellationToken) in D:\a\usbipd-win\usbipd-win\UsbIpServer\AttachedClient.cs:line 477
   at UsbIpServer.ConnectedClient.HandleRequestImportAsync(CancellationToken cancellationToken) in D:\a\usbipd-win\usbipd-win\UsbIpServer\ConnectedClient.cs:line 207
   at UsbIpServer.ConnectedClient.HandleRequestImportAsync(CancellationToken cancellationToken) in D:\a\usbipd-win\usbipd-win\UsbIpServer\ConnectedClient.cs:line 228
</Data>
  </EventData>
</Event>

@dorssel
Copy link
Owner

dorssel commented Jan 12, 2022

@JohnBerg60
I can reproduce this log when the WSL instance is shut down while a device is attached. It is an error report from usbipd-win itself, and (at least for the case I described) is normal. In my test, this does not stop the service itself and is intended behavior.

Can you determine what causes the error in your case? Is it WSL shutdown? Or something else. What I am looking for is a crash report from the Windows Service manager that explains why the service itself stopped.

@dorssel dorssel reopened this Jan 12, 2022
@JohnBerg60
Copy link

@dorssel
I am running a Debian 10 WSL2 instance, and a (clone) ST-LINK V2 adapter on USB. I use remote (arm-non-eabi) GDB debugging. When debugging from vscode, the code in the embedded device has a problem (I am not perfect) and I disconnect the remote debugging session, USBIPd dies. I try to figure out a way to get more info on the crash, stay tuned.

@dorssel
Copy link
Owner

dorssel commented Jan 12, 2022

@JohnBerg60
Ah, I see. Please run the server with verbose debug logging, see https://github.com/dorssel/usbipd-win/wiki/Troubleshooting. That should give you a crash report on the console.

@dorssel
Copy link
Owner

dorssel commented Jan 17, 2022

@JohnBerg60
I've just finished a PR that may solve your problem. See #164, the installer is at https://github.com/dorssel/usbipd-win/actions/runs/1705631433. Could you give that a go?

@JohnBerg60
Copy link

I installed the update, and used it for a couple days. So far so good!

@dorssel dorssel closed this as completed Feb 11, 2022
@pavly-gerges
Copy link

I just started the service manually:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants