Linkserver ConnectionResetError

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Linkserver ConnectionResetError

跳至解决方案
1,963 次查看
larslj
Contributor I

I can no longer start linkserver. It shows shows "ERRMSG: ConnectionResetError: [WinError 64] The specified network name is no longer available".

The error message is not very helpful. What could be the problem?

 

C:\nxp\LinkServer_1.4.85> linkserver -l 5 gdbserver MIMXRT1042xxxxB:MIMXRT1040-EVK
[87]DEBUG:asyncio: Using proactor: IocpProactor
[325]INFO:launcher.cli.utils.funcs: Exact match for MIMXRT1042xxxxB:MIMXRT1040-EVK found
[326]INFO:launcher.cli.utils.click: Selected device MIMXRT1042xxxxB:MIMXRT1040-EVK
[328]DEBUG:launcher.core.redlinkserv: Starting redlinkserv: C:\nxp\LinkServer_1.4.85\binaries\redlinkserv.exe ['--port', '11111', '--telnetport', '12222', '--no-telnet-defaults']
[330]DEBUG:launcher.core.probeboot: Listing usb devices
[330]DEBUG:launcher.core.utils: Subprocess exec: cscript ['/nologo', 'C:\\nxp\\LinkServer_1.4.85\\binaries\\Scripts\\listusb.vbs']
[333]DEBUG:launcher.core.redlinkserv: Connecting to redlinkserv (localhost:12222)
[1632]DEBUG:launcher.core.probeboot: Found 19 USB devices
[2372]DEBUG:launcher.core.redlinkserv: Connected to redlinkserv
[2373]DEBUG:launcher.core.redlinkserv: [read]
[2375]INFO:launcher.cli.utils.click: Getting available probes
[2376]DEBUG:launcher.core.redlinkserv: [write] probelist
[2782]DEBUG:launcher.core.redlinkserv: [write] exit
[2782]DEBUG:launcher.core.utils: Terminating async process with PID 31492
[2787]CRITICAL:__main__: Critical error
Traceback (most recent call last):
File "asyncio\windows_events.py", line 489, in finish_recv
OSError: [WinError 64] The specified network name is no longer available

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "launcher\__main__.py", line 39, in <module>
File "click\core.py", line 1130, in __call__
File "click\core.py", line 1055, in main
File "click\core.py", line 1657, in invoke
File "click\core.py", line 1404, in invoke
File "click\core.py", line 760, in invoke
File "launcher\cli\utils\funcs.py", line 137, in wrapper
File "asyncio\runners.py", line 190, in run
File "asyncio\runners.py", line 118, in run
File "asyncio\base_events.py", line 653, in run_until_complete
File "launcher\cli\cmd\gdbserver.py", line 50, in cmd_gdbserver
File "contextlib.py", line 204, in __aenter__
File "contextlib.py", line 222, in __aexit__
File "launcher\cli\utils\funcs.py", line 184, in redlink_and_probeboot
File "launcher\core\redlinkserv.py", line 152, in close
File "contextlib.py", line 672, in aclose
File "contextlib.py", line 730, in __aexit__
File "launcher\core\utils.py", line 211, in __conn_cleanup
File "asyncio\streams.py", line 350, in wait_closed
File "asyncio\proactor_events.py", line 286, in _loop_reading
File "asyncio\windows_events.py", line 841, in _poll
File "asyncio\windows_events.py", line 493, in finish_recv
ConnectionResetError: [WinError 64] The specified network name is no longer available

0 项奖励
回复
1 解答
1,800 次查看
Waleed
NXP Employee
NXP Employee

Thanks Pavel,

this worked! 

For the record, the blog doesn't explain the process with LPCScrypt with much detail, I suggest anyone running into the same problem to read the Documentation of the LPCScrypt too before running any scripts. (I used LPCScrypt\probe_firmware\LPCXpressoV2\LPC432x_IAP_CMSIS_DAP_V5_460.bin)

 

Kind regards,

Waleed

在原帖中查看解决方案

0 项奖励
回复
7 回复数
1,904 次查看
larslj
Contributor I

I was using MCUxpresso and got "SocketException Reason: Connection reset". When trying to debug the issue I found what I think is the root cause, i.e. linkserver.

Here is the corresponding error message from MCUxpresso:

Connection reset

Connection reset
at java.base/sun.nio.ch.NioSocketImpl.implRead(NioSocketImpl.java:323)
at java.base/sun.nio.ch.NioSocketImpl.read(NioSocketImpl.java:350)
at java.base/sun.nio.ch.NioSocketImpl$1.read(NioSocketImpl.java:803)
at java.base/java.net.Socket$SocketInputStream.read(Socket.java:966)
at java.base/sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:270)
at java.base/sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:313)
at java.base/sun.nio.cs.StreamDecoder.read(StreamDecoder.java:188)
at java.base/sun.nio.cs.StreamDecoder.read0(StreamDecoder.java:137)
at java.base/sun.nio.cs.StreamDecoder.read(StreamDecoder.java:122)
at java.base/java.io.InputStreamReader.read(InputStreamReader.java:169)
at com.nxp.mcuxpresso.core.debug.support.linkserver.redlink.client.RedlinkServerClient.receive(RedlinkServerClient.java:1059)
at com.nxp.mcuxpresso.core.debug.support.linkserver.redlink.client.RedlinkServerClient.sendReceive(RedlinkServerClient.java:1160)
at com.nxp.mcuxpresso.core.debug.support.linkserver.redlink.client.RedlinkServerClient.sendReceive(RedlinkServerClient.java:1145)
at com.nxp.mcuxpresso.core.debug.support.linkserver.redlink.client.RedlinkServerClient.sendReceive(RedlinkServerClient.java:1132)
at com.nxp.mcuxpresso.core.debug.support.linkserver.redlink.client.RedlinkServerClient.probeList(RedlinkServerClient.java:1044)
at com.nxp.mcuxpresso.core.debug.support.linkserver.emulators.common.RedlinkServerEmuHandler.discoverEmulators(RedlinkServerEmuHandler.java:223)
at com.nxp.mcuxpresso.core.debug.support.linkserver.emulators.win.AbstractWinServerProbe.discoverEmulators(AbstractWinServerProbe.java:72)
at com.nxp.mcuxpresso.core.debug.support.linkserver.emulators.EmulatorsDB.getEmus(EmulatorsDB.java:268)
at com.nxp.mcuxpresso.core.debug.support.linkserver.emulators.EmulatorsDB.getEmulatorInfo(EmulatorsDB.java:208)
at com.nxp.mcuxpresso.core.debug.support.linkserver.emulators.EmulatorsDB.getAvailableEmulators(EmulatorsDB.java:139)
at com.nxp.mcuxpresso.core.debug.support.linkserver.emulators.TargetDiscovery.probeDiscovery(TargetDiscovery.java:550)
at com.nxp.mcuxpresso.core.debug.support.linkserver.emulators.TargetDiscovery.probeDiscovery(TargetDiscovery.java:501)
at com.nxp.mcuxpresso.core.debug.support.linkserver.launch.LaunchScriptUtils.getEmulatorInfo(LaunchScriptUtils.java:256)
at com.nxp.mcuxpresso.core.debug.support.linkserver.launch.LaunchScriptUtils.init(LaunchScriptUtils.java:497)
at com.nxp.mcuxpresso.core.debug.support.linkserver.launch.LaunchScriptUtils.<init>(LaunchScriptUtils.java:165)
at com.nxp.mcuxpresso.core.debug.support.linkserver.launch.LaunchScriptUtils.<init>(LaunchScriptUtils.java:152)
at com.nxp.mcuxpresso.core.debug.support.linkserver.services.TargetDiscoveryService.getTargetDiscovery(TargetDiscoveryService.java:138)
at com.nxp.mcuxpresso.core.debug.support.linkserver.override.LSFinalLaunchSequence$TargetDiscoveryJob.run(LSFinalLaunchSequence.java:129)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

 

0 项奖励
回复
1,895 次查看
Pavel_Hernandez
NXP TechSupport
NXP TechSupport

Hello, this seems like a configuration error on the IDE, did you try to reinstall the IDE again? sorry about this solution, maybe could help you. Install under administrator.

Let me know if the issue is still there.

Best regards,
Pavel

0 项奖励
回复
1,861 次查看
Waleed
NXP Employee
NXP Employee

Hi Pavel,
I am also having the same error with similar logs on the IMXRT1170-EVK. Trying to debug or flash with another PC works. Using another EVK board with my PC works too. I reinstalled the LinkServer, the mbed driver and also the IDE (once without and once with uninstalling the IDE first), but the issue persists.

Logs/Error:

Connection reset

Connection reset
at java.base/sun.nio.ch.NioSocketImpl.implRead(NioSocketImpl.java:323)
at java.base/sun.nio.ch.NioSocketImpl.read(NioSocketImpl.java:350)
at java.base/sun.nio.ch.NioSocketImpl$1.read(NioSocketImpl.java:803)
at java.base/java.net.Socket$SocketInputStream.read(Socket.java:966)
at java.base/sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:270)
at java.base/sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:313)
at java.base/sun.nio.cs.StreamDecoder.read(StreamDecoder.java:188)
at java.base/sun.nio.cs.StreamDecoder.read0(StreamDecoder.java:137)
at java.base/sun.nio.cs.StreamDecoder.read(StreamDecoder.java:122)
at java.base/java.io.InputStreamReader.read(InputStreamReader.java:169)
at com.nxp.mcuxpresso.core.debug.support.linkserver.redlink.client.RedlinkServerClient.receive(RedlinkServerClient.java:1059)
at com.nxp.mcuxpresso.core.debug.support.linkserver.redlink.client.RedlinkServerClient.sendReceive(RedlinkServerClient.java:1160)
at com.nxp.mcuxpresso.core.debug.support.linkserver.redlink.client.RedlinkServerClient.sendReceive(RedlinkServerClient.java:1145)
at com.nxp.mcuxpresso.core.debug.support.linkserver.redlink.client.RedlinkServerClient.sendReceive(RedlinkServerClient.java:1132)
at com.nxp.mcuxpresso.core.debug.support.linkserver.redlink.client.RedlinkServerClient.probeList(RedlinkServerClient.java:1044)
at com.nxp.mcuxpresso.core.debug.support.linkserver.emulators.common.RedlinkServerEmuHandler.discoverEmulators(RedlinkServerEmuHandler.java:223)
at com.nxp.mcuxpresso.core.debug.support.linkserver.emulators.win.AbstractWinServerProbe.discoverEmulators(AbstractWinServerProbe.java:72)
at com.nxp.mcuxpresso.core.debug.support.linkserver.emulators.EmulatorsDB.getEmus(EmulatorsDB.java:268)
at com.nxp.mcuxpresso.core.debug.support.linkserver.emulators.EmulatorsDB.getEmulatorInfo(EmulatorsDB.java:208)
at com.nxp.mcuxpresso.core.debug.support.linkserver.emulators.EmulatorsDB.getAvailableEmulators(EmulatorsDB.java:139)
at com.nxp.mcuxpresso.core.debug.support.linkserver.emulators.TargetDiscovery.getAvailableEmulators(TargetDiscovery.java:508)
at com.nxp.mcuxpresso.core.debug.support.linkserver.launch.LinkServerLaunchConfigHandler.probeDiscovery(LinkServerLaunchConfigHandler.java:628)
at com.nxp.mcuxpresso.core.debug.support.linkserver.launch.LinkServerLaunchConfigHandler.checkProbe(LinkServerLaunchConfigHandler.java:944)
at com.nxp.mcuxpresso.core.debug.launch.AbstractNXPLaunchConfigHandler.promptDiscovery(AbstractNXPLaunchConfigHandler.java:1268)
at com.nxp.mcuxpresso.core.debug.launch.AbstractNXPLaunchConfigHandler.createMissingLaunchConfigurations(AbstractNXPLaunchConfigHandler.java:1394)
at com.nxp.mcuxpresso.core.debug.support.linkserver.launch.LinkServerLaunchConfigHandler.createMissingLaunchConfigurations(LinkServerLaunchConfigHandler.java:491)
at com.nxp.mcuxpresso.core.debug.launch.NXPLaunchConfigUtils.createMissingLaunchConfigurations(NXPLaunchConfigUtils.java:358)
at com.nxp.mcuxpresso.core.debug.launch.NXPLaunchConfigUtils.createMissingLaunchConfigurations(NXPLaunchConfigUtils.java:439)
at com.nxp.mcuxpresso.core.debug.launch.NXPLaunchConfigUtils.createLaunchConfigurations(NXPLaunchConfigUtils.java:983)
at com.crt.quickstart.utils.QSUtilDebug.linkSelected(QSUtilDebug.java:257)
at com.crt.quickstart.views.DebugCommandHandler.execute(DebugCommandHandler.java:36)
at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:283)
at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:97)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:58)
at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:309)
at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:243)
at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:173)
at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:156)
at org.eclipse.core.commands.Command.executeWithChecks(Command.java:488)
at com.crt.quickstart.actions.DebugAction.run(DebugAction.java:111)
at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:239)
at org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPluginAction.java:218)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:580)
at org.eclipse.jface.action.ActionContributionItem.lambda$5(ActionContributionItem.java:453)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4274)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1066)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4072)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3660)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1155)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1046)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:643)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:550)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:171)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:152)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:136)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:402)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:659)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:596)
at org.eclipse.equinox.launcher.Main.run(Main.java:1467)



Kind regards,
Waleed

0 项奖励
回复
1,850 次查看
Pavel_Hernandez
NXP TechSupport
NXP TechSupport

Hello, could you try to change the firmware of your debugger on the board, please follow the steps of this thread to use J-link.

Upgrading LPC4322-based Debug Probe Firmware on RT10xx | MCU on Eclipse

Let me know if you have more doubts.

Best regards,
Pavel

1,801 次查看
Waleed
NXP Employee
NXP Employee

Thanks Pavel,

this worked! 

For the record, the blog doesn't explain the process with LPCScrypt with much detail, I suggest anyone running into the same problem to read the Documentation of the LPCScrypt too before running any scripts. (I used LPCScrypt\probe_firmware\LPCXpressoV2\LPC432x_IAP_CMSIS_DAP_V5_460.bin)

 

Kind regards,

Waleed

0 项奖励
回复
1,726 次查看
larslj
Contributor I

Thanks. That solved the issue. This is what I did:

  1. Put a jumper on J12 (I borrowed the J13 jumper temporarily)
  2. Run C:\NXP\LPCScrypt_2.1.3_83\scripts\program_CMSIS.cmd
  3. Remove the J12 jumper
0 项奖励
回复
1,907 次查看
Pavel_Hernandez
NXP TechSupport
NXP TechSupport

Hello, my name is Pavel, and I will be supporting your case, I need more information about this behavior, what is the IDES that are you using? is this happening when your installation was done? or are you able to compile before? 

Best regards,
Pavel

0 项奖励
回复