Failed to parse remote port - vscode using ssh - visual-studio-code

I get the following error trying to use vscode-remote using ssh.
I think this is related to escape codes.. but I don't know how to resolve it.
> Starting agent...
> Waiting for server log...
> [?1034h
>
> *
> * Reminder: You may only use this software with Visual Studio family products,
> * as described in the license (https://go.microsoft.com/fwlink/?linkid=2077057)
> *
>
> [?1034h
> 77cf6633-c4e9-44d4-93ab-d002229c03ef==36237==
> [?1034h
> [?1034h
"install" terminal command done
Received install output: [?1034h[?1034h
Failed to parse remote port from server output: [?1034h[?1034
The log file left on the server .vscode-remote directory indicates the server started fine:
IP Address: x.x.x.x
Extension host agent listening on xxxxx
Any help appreciated.

Related

Failed to parse remote port from server output

I want to connect to jupyterhub server of my organization with vscode's Remote SSH, however it crashed with this report:
[17:48:27.180] Running script with connection command: ssh -T -D 56752 "jupyterhub.whatever.com" bash
[17:48:27.183] Terminal shell path: C:\WINDOWS\System32\cmd.exe
[17:48:27.575] > 系统无法执行指定的程序。
> ]0;C:\WINDOWS\System32\cmd.exe
[17:48:27.576] Got some output, clearing connection timeout
[17:48:28.857] "install" terminal command done
[17:48:28.858] Install terminal quit with output: ]0;C:\WINDOWS\System32\cmd.exe
[17:48:28.858] Received install output: ]0;C:\WINDOWS\System32\cmd.exe
[17:48:28.858] Failed to parse remote port from server output
[17:48:28.859] Resolver error: Error:
at g.Create (c:\Users\k6789\.vscode\extensions\ms-vscode-remote.remote-ssh-0.90.1\out\extension.js:1:585222)
at t.handleInstallOutput (c:\Users\k6789\.vscode\extensions\ms-vscode-remote.remote-ssh-0.90.1\out\extension.js:1:583874)
at t.tryInstall (c:\Users\k6789\.vscode\extensions\ms-vscode-remote.remote-ssh-0.90.1\out\extension.js:1:681023)
at process.processTicksAndRejections (node:internal/process/task_queues:96:5)
at async c:\Users\k6789\.vscode\extensions\ms-vscode-remote.remote-ssh-0.90.1\out\extension.js:1:643908
at async t.withShowDetailsEvent (c:\Users\k6789\.vscode\extensions\ms-vscode-remote.remote-ssh-0.90.1\out\extension.js:1:647224)
at async t.resolve (c:\Users\k6789\.vscode\extensions\ms-vscode-remote.remote-ssh-0.90.1\out\extension.js:1:644958)
at async c:\Users\k6789\.vscode\extensions\ms-vscode-remote.remote-ssh-0.90.1\out\extension.js:1:726917
[17:48:28.863] ------
And this is my SSH config:
Host jupyterhub.whatever.com
HostName jupyterhub.whatever.com
IdentityFile ~/.ssh/id_rsa
PreferredAuthentications publickey
User MyUserName
I think this question can't help me, so how to solve the problem?
Try deleting the content in your C:/Users/user/.ssh/known_hosts and connect against the same host.
I had a similar problem and it's looks like Visual Studio creates a new config file.
I had the same issue with VS Code. I was able to resolve it by using SSH from a terminal and running the following on the host:
rm -f .vscode-server/*.log

wildfly 23.0.1.Final with jaegertracing exception

I am running on Wildfly 23.0.1.Final (openjdk 11) under Centos 8.
I am not using opentrace in my application at all and i also did not add any jaeger dependency.
Whenever i look in the logs, i often get an excpetion(Level: Warn) the looks like the following:
> 021-04-28 15:08:29,875 WARN [io. .internal.reporters.RemoteReporter]
> (jaeger.RemoteReporter-QueueProcessor) FlushCommand execution failed!
> Repeated errors of this command will not be logged.:
> io.jaegertracing.internal.exceptions.SenderException: Failed to flush
> spans. at
> io.jaegertracing.jaeger#1.5.0//io.jaegertracing.thrift.internal.senders.ThriftSender.flush(ThriftSender.java:115)
> at
> io.jaegertracing.jaeger#1.5.0//io.jaegertracing.internal.reporters.RemoteReporter$FlushCommand.execute(RemoteReporter.java:160)
> at
> io.jaegertracing.jaeger#1.5.0//io.jaegertracing.internal.reporters.RemoteReporter$QueueProcessor.run(RemoteReporter.java:182)
> at java.base/java.lang.Thread.run(Thread.java:834) Caused by:
> io.jaegertracing.internal.exceptions.SenderException: Could not send 1
> spans at
> io.jaegertracing.jaeger#1.5.0//io.jaegertracing.thrift.internal.senders.UdpSender.send(UdpSender.java:85)
> at
> io.jaegertracing.jaeger#1.5.0//io.jaegertracing.thrift.internal.senders.ThriftSender.flush(ThriftSender.java:113)
> ... 3 more Caused by:
> org.apache.thrift.transport.TTransportException: Cannot flush closed
> transport at
> io.jaegertracing.jaeger#1.5.0//io.jaegertracing.thrift.internal.reporters.protocols.ThriftUdpTransport.flush(ThriftUdpTransport.java:148)
> at
> org.apache.thrift#0.13.0//org.apache.thrift.TServiceClient.sendBase(TServiceClient.java:73) at
> org.apache.thrift#0.13.0//org.apache.thrift.TServiceClient.sendBaseOneway(TServiceClient.java:66)
> at
> io.jaegertracing.jaeger#1.5.0//io.jaegertracing.agent.thrift.Agent$Client.send_emitBatch(Agent.java:70)
> at
> io.jaegertracing.jaeger#1.5.0//io.jaegertracing.agent.thrift.Agent$Client.emitBatch(Agent.java:63)
> at
> io.jaegertracing.jaeger#1.5.0//io.jaegertracing.thrift.internal.senders.UdpSender.send(UdpSender.java:83)
> ... 4 more Caused by: java.net.PortUnreachableException: ICMP Port
> Unreachable at java.base/java.net.PlainDatagramSocketImpl.send(Native
> Method) at
> java.base/java.net.DatagramSocket.send(DatagramSocket.java:695) at
> io.jaegertracing.jaeger#1.5.0//io.jaegertracing.thrift.internal.reporters.protocols.ThriftUdpTransport.flush(ThriftUdpTransport.java:146)
> ... 9 more
These messages fill the logfiles and i do not know how to disable the unwanted opentrace feature.
I was not able to find something on google concerning this strange exception.
Does anybody has some idea?
best regards
shane
If you don't use it, you can do something like the following in the CLI:
/subsystem=microprofile-opentracing-smallrye/jaeger-tracer=jaeger:write-attribute(name=sampler-param, value=0)
Another solution is to remove the opentracing subsystem, install jaeger or wait for a release of WildFly with a fix for https://issues.redhat.com/browse/WFLY-14625
You can disable this by remove
<subsystem xmlns="urn:wildfly:microprofile-opentracing-smallrye:3.0" default-tracer="jaeger">
<jaeger-tracer name="jaeger">
<sampler-configuration sampler-type="const" sampler-param="1.0"/>
</jaeger-tracer>
</subsystem>
in standalone.xml
In parallel to wildfly, execute the jaeger application - a log tracer, with a suitable port configuration. You may find a docker image to run.
In HAL Management Console -> Configuration -> Subsystem -> Logging -> Configuration -> View -> Categories
In Category for 'io.jaegertracing.Configuration' disable parameter 'Use Parent Handlers'.
Or just remove 'io.jaegertracing.Configuration'

Ho to fix the `getaddrinfo ENOTFOUND marketplace.visualstudio.com` when running a vs code project in Dev Container mode (with proxy pac and VPN)

Given:
machine connected through VPN (SitePoint) to company private network
vscode runs with the proxy pac configuration switch --proxy-pac-url=http://<myhostname>/<path_to_proxypac>/proxy.pac":
any extensions can be seen and installed successfully
python 3 project opened with vscode
development container configuration files... (Python 3) added to project
Add the following extensions to .devcontainer.json
"extensions": [
"ms-python.python",
"himanoa.python-autopep8",
"wholroyd.jinja",
"magicstack.MagicPython",
]
Reopened project in container
Expected:
extensions configured in .devcontainer.json are successfully installed in the Dev Container mode vs code.
Actual:
the list of DEV CONTAINER: PYTHON 3 - INSTALLED is empty
and got the following error in vs code terminal
[27528 ms] Installing extensions...
[27528 ms] getaddrinfo ENOTFOUND marketplace.visualstudio.com
getaddrinfo ENOTFOUND marketplace.visualstudio.com
getaddrinfo ENOTFOUND marketplace.visualstudio.com
getaddrinfo ENOTFOUND marketplace.visualstudio.com
[27528 ms] Exit code 1
Mentions:
1. I can install extensions from Dev Container mode vs code.
What am I supposed to do to address this problem?
Could this be an issue or feature request for Remote-Containers extension?
Try it:
In Visual Studio Code, go to:
File > Preferences > Settings
Then click on tab User > Application > Proxy
Enter your proxy address in the field, as an example:
http://proxy_userid:proxy_password#proxy_ip:proxy_port
If your password contains special characters, replace it with the URL Encode value. See here: http://www.cjdinfo.com.br/utilitario-tabela-caracteres
Or try it:
https://code.visualstudio.com/docs/setup/network

Stuck: [Remote - SSH 0.49.0] Setting up SSH Host DEV: (details) Initializing VS Code

I have successfully used the vscode's extension Remote-SSH on a few remote linux servers. However, I cannot get past the "Acquiring lock" message in my vscode terminal on one particular server and would like to know how to. The terminal displays the "Acquiring Lock" line in the terminal and nothing else follows. I have even let this connection try to resolve itself overnight and it just will not go any further.
The output I am receiving appears as follows (I have replaced some real values/hash with generic text wrapped in angle brackets):
[13:48:34.210] Log Level: 3
[13:48:34.218] remote-ssh#0.49.0
[13:48:34.218] win32 x64
[13:48:34.221] SSH Resolver called for "ssh-remote+<hash>", attempt 1
[13:48:34.221] SSH Resolver called for host: DEV
[13:48:34.221] Setting up SSH remote "DEV"
[13:48:34.291] Using commit id "<hash>" and quality "stable" for server
[13:48:34.292] Install and start server if needed
[13:48:34.296] Checking ssh with "ssh -V"
[13:48:34.347] > OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5
[13:48:34.348] Running script with connection command: ssh -T -D 55214 DEV bash
[13:48:34.354] Terminal shell path: C:\WINDOWS\System32\cmd.exe
[13:48:34.502] >
[13:48:34.503] Got some output, clearing connection timeout
[13:48:34.626] > <User>#<HostName>'s password:
[13:48:34.626] Showing password prompt
[13:48:42.869] Got password response
[13:48:42.869] "install" wrote data to terminal: "***********"
[13:48:42.908] >
>
[13:48:42.969] > <hash>: running
>
[13:48:43.009] > Acquiring lock on /<path to commit id hash>/vscode-remote-lock.<User>.<hash>
>
>
Vscode version
Version: 1.42.1 (user setup)
Commit: c47d83b293181d9be64f27ff093689e8e7aed054
Date: 2020-02-11T14:45:59.656Z
Electron: 6.1.6
Chrome: 76.0.3809.146
Node.js: 12.4.0
V8: 7.6.303.31-electron.0
OS: Windows_NT x64 10.0.17763
Remote - SSH version 0.49.0
Thank you for taking a look at my issue!
Update
The attempt appears to have finally timed out. The message that was left is:
[15:48:54.081] "install" terminal command done
[15:48:54.082] > Connection reset by <ip address> port 22
>
[15:48:54.084] Install terminal quit with output: Acquiring lock on <vscode-remote-lock file>
[15:48:54.085] Received install output: Acquiring lock on <vscode-remote-lock file>
[15:48:54.090] Stopped parsing output early. Remaining text: Acquiring lock on <vscode-remote-lock file>
[15:48:54.090] Failed to parse remote port from server output
[15:48:54.092] Resolver error:
[15:48:54.108] ------
I brought this issue up on the Remote-SSH Github project: https://github.com/microsoft/vscode-remote-release/issues/2472
After putting this issue in on Stackoverflow, the extension developers have developed a fix for this on their Nightly version of the extension. The fix will be in the Remote-SSH version 0.50.

Practise remote debugging on local glassfish server?

I tried to do remote debugging on a remote glassfish server for some time, using eclipse.
I want to do it on my local server which is in my own computer. I followed the same
instructions that one follows for setting up remote debugging. In eclipse, I set debug
configurations with info - host = localhost, port = 6767 and server in debug mode.
6767 is the port which I use to connect to the admin of my glassfish server.
This approach worked in the actual remote debugging. But it fails in local debugging.
I get the error - Failed to connect to remote VM. Connection timed out.
org.eclipse.jdi.TimeoutException
How do I fix this error ?
The log from the folder workspace dir > .metadata > .log is given below:
!ENTRY org.eclipse.jdt.launching
!MESSAGE Failed to connect to remote VM. Connection timed out.
!STACK 0
org.eclipse.jdi.TimeoutException
at org.eclipse.jdi.internal.connect.SocketTransportService.attach(SocketTransportService.java:162)
at org.eclipse.jdi.internal.connect.SocketTransportImpl.attach(SocketTransportImpl.java:45)
at org.eclipse.jdi.internal.connect.SocketAttachingConnectorImpl.attach(SocketAttachingConnectorImpl.java:134)
at org.eclipse.jdt.internal.launching.SocketAttachConnector.connect(SocketAttachConnector.java:141)
at org.eclipse.jdt.internal.launching.JavaRemoteApplicationLaunchConfigurationDelegate.launch(JavaRemoteApplicationLaunchConfigurationDelegate.java:84)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:858)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:707)
at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1018)
at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1222)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
I tried one solution which did not work -
open glassfish admin console in a browser > Configuration > server-config > JVM settings > Debug: Enable the checkbox
You do not debug a local application using the remote debugging method. Simply right click your project > debug as > debug on server > choose tomcat or glassfish etc.
Then, run your app from the web browser and see the debugging.