Timeout when trying to open a SSH Remote, but the same server under a different remote target works correctly - vscode-remote

I have a ubuntu VM with multiple IP addresses, all in the same subnet. SSHD is listening on a single IP, 192.168.101.87/24.
My SSH config file has this server under the name dockerhost, and the HostName is configured as the IP address. The config block is below.
Host dockerhost 192.168.101.87
HostName 192.168.101.87
User webtroter
ForwardAgent yes
I have been using this config for a long time without problems.
Usually, I open the remote sidepanel, and I open the workspace docker-veznet.
[
But now, when I try to open a folder/file/workspace on the remote dockerhost, it times-out everytime. I can open the remote directly with VSCode (without opening a folder/file/workspace), but as soon as I open the docker-veznet folder (or the associated workspace) the remote times-out.
I just tried doing a copy of the folder, and I was able to open it. I also tried to open the same folder, but under another remote Target (192.168.101.87) and it opens correctly.
I would like some help finding what I need to check to fix the problem.

So I finally found that there is a GitHub Issue opened about this problem.
The issue is caused by the secondary side bar.
Link to comment in the issue about how to fix : https://github.com/microsoft/vscode-remote-release/issues/7324#issuecomment-1307954310

Related

Access host variable from virtual machine

I have a react-app, I set up my app to run on a custom url using the HOST variable when starting the app, something like:
"scripts": {
"start": "HOST=my-local-website.com ..."
}
I need to access this url from a windows virtual machine to test it on IE11, before setting up the HOST variable I was able to access it simply from my IP address (192.168.X.XX:3000), having changed the HOST variable this doesn't work anymore.
Does anyone know how I can access it from a virtual machine?
Thank you in advance
I suggest to set environment variables in separate .env file like described in dicumentation.
In .env file set HOST=my-local-website.com to change host (it's unclear why official doc recommends prefixing all env variables with REACT_APP_)
Web site name my-local-website.com mapping to IP address of server (192.168.X.XX:3000 in your case) is done using DNS. This relate to networking and not to frameworks you use. So to be able to access your site by name you have to establish mapping between name of the site and IP address
I terms of DNS this mapping will look like
my-local-website.com A 192.168.X.XX
But for testing purpuses you can use simplified approach (I don't think that you have established DNS server in place). On Windows you can use hosts file which is located in C:\Windows\System32\drivers\etc folder. File is named hosts. Open it with any text editor (like notepad) and add string
192.168.X.XX my-local-website.com
IP address goes first, name last. Dont include port number (:3000) as it not related to DNS. hosts file should be changed on you test (client) PC, not on the PC where your app run.
You may also modify hosts on PC where you app runs to check if host has been configured correctly.
To check that everything is correct you may use ping like this
ping my-local-website.com
IP address should be printed if you configured everything correctly.
If you run your app on Windows host there may be problem with firewall configuration. If your app open on the same PC where it is started but not on another PC, most probaly that firewall blocks traffic. It can be WIndows Firewall or antivirus software if you have any.

Not able to access a port on ec2 instance for an Angular app

I am working on an angular app using the angular cli to set things up. Running the ng serve command spawns a server at this address <my_ec2_host_name>:4200. When I try to access the page on the browser it doesn't work (connection timed out error). I believe this is because of security reasons so I added the following rule to my security groups for the ec2 instance:
Port 4200 should now be accessible but I still can't get the page to load. Can someone think of how to get this to work?
Start angular with below command.
ng serve --host=0.0.0.0 --disable-host-check
it will disable host check and allow to access with IP
You can set up the host option like this:
ng serve -host 0.0.0.0
The steps you are doing are correct for opening a port via Security Groups in the EC2 console. Make sure you are modifying the correct security group, and make sure that your changes have been saved.
Your container may have additional firewalls in place, so you will want to check the OS documentation. For Example, RHEL uses iptables as a further security measure: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sect-Security_Guide-IPTables.html.
That looks correct. Are you sure that your server is running and listening for connections?
You should ssh to that server and verify that the page can be loaded locally. Eg:
curl http://<YOUR HOST IP ADDRESS>:4200
eg: curl http://54.164.10.123:4200
You should be careful to use the public ip address (eg: IPv4 Public IP when you're in the EC2 console). I've run into problems in the past where I've got a server listening on one IP address (often localhost) and not the public ip address.
Also maybe a problem: Is your host inside a VPC of some sort?

Monaca Localkit Launch Error

When I try to launch the Monaca Localkit application, it shows "Unable to start HTTP server. Maybe the port is occupied. Please change the port and restart the program."
Then, I have changed my port setting many times, but it still shows the same message.
My default port setting is 8001. And I checked whether other application is using this port by netstat command. But no application is using.
I tried to re-install Monaca Localkit application too. But the result is the same as before.
How can I fix this problem? Please give me an advise.
It means that another program is using that port, maybe another instance of localkit? If yes, terminate the program to free the port. You should also check if your firewall allows communications through port 8001.
If you want just to change port, you can open Localkit and go, from the menu bar, to Monaca Localkit -> Preferences and change Listening Port.

Webstorm localhost from mobile

I can't access my Webstrom localhost on port 63342 from mobile.
I opened the port in Windows firewall and ESET (but port online checkers say me that the port still close).
I checked option "Can accept external connections" in Webstorm (but it caused message that Built-in HTTP server on that port disabled).
But when I check 192.168.0.48:63342 in mobile chrome - it still not available.
Please help.
I'd suggest using a different port (8080, 8090) if you need to access the server from another host. External connections to 63342 are not supported for security reasons.
Here are instruction for connecting to WebStorm internal web server from a different host:
- on a remote host, make sure to install JetBrains IDE Support extension into Chrome
- in extension options (chrome-extension://hmhgeddbohgjknpmjagkdomcpobmllji/options.html), specify the IP and port of the target machine
- on a target computer, start WebStorm, make sure that the port specified in Settings/JavaScript/Debugger is the same as above and 'Can accept external connections' is on. Open your project and run your application
Changing the port number to something else than 63342, does work. However I had some difficulties changing the debug port number. If you have the Chrome plugin, changing the debug port number from Webstorm's settings will not override the plugin's default debug port. Thus, you should right click on the plugin, click "Options", change port number and hit apply. At the same time, you should enable external connections in Webstorm's settings: "Settings/JavaScript/Debugger". Then you can access your web app from your smartphone by specifying the IP and port address of the app.

How to change the admin port using the Google App engine launcher?

It's easy to change the port of the application using the launcher. Go to Edit>>Application Settings (or alternatively Ctrl+i) and change the port. Since I was getting an error similar to the one given below, I changed the application port from 8080 to 48080. Unfortunately, I am not able to change the admin port from 8000 to 48000, because of which I am getting the following error.
google.appengine.tools.devappserver2.wsgi_server.BindError: Unable to bind localhost:8000
I also tried the method illustrated in the following image (my reference being this link):
Regardless of what I try, my web-browsers (Chrome and Firefox) return a message similar to This webpage is not available. Any ideas are appreciated.
I have seen this before, when I had a crashed instance running on the port. You may have a frozen Python script running on that port. On a Mac, I can go to Activity Monitor and kill the process. Not sure if you can do that via task manager in Windows. You may need to restart machine.

Resources