WebSSH not working on a linux container

Ka 5 Reputation points
2023-12-07T13:01:34.18+00:00

Hi I have a web app running .net web application. I just find I cannot webssh to the container anymore? It only happens to one resource group. Could you help to identify the problem?

It is NOT a custom container. (I've read this link but it is for a custom container)

From the dev tool in Edge, the error is "42["ssherror","SSH CONN ERROR: getaddrinfo ENOTFOUND Couldnt connect to main site container"]"

I've tried az cli
az webapp ssh -n XXX -g YY

and
az webapp create-remote-connection --subscription XXXX --resource-group YY -n XXX

The error I got is
"SSH endpoint unreachable, your app must be running before it can accept SSH connections.Use az webapp log tail to review the app startup logs."
If I az webapp log tail, the log is nothing about the ssh.

The Web App is currently running.

The Kudu site is currently running.

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,933 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Ka 5 Reputation points
    2023-12-07T22:41:51.8566667+00:00
    1 person found this answer helpful.

  2. Pinaki Ghatak 5,600 Reputation points Microsoft Employee Volunteer Moderator
    2024-01-24T15:49:47.42+00:00

    Hello Ka The error message “getaddrinfo ENOTFOUND” usually means that the hostname can’t be resolved. This could be due to a network issue or a problem with the DNS configuration. You might want to check the configuration of your .NET web application and ensure that it’s set up correctly for SSH connections. You could also try connecting using the IP address instead of the hostname. I would recommend checking the following:

    1. Ensure that your app is running and accepting incoming connections. You can check this by navigating to your app's URL in a web browser and verifying that it loads correctly.
    2. Check that your app's SSH endpoint is configured correctly. You can do this by running the following command: az webapp show -n -g --query sshHostKeyFingerprint This should return the SSH host key fingerprint for your app. If it returns an error, it's possible that the SSH endpoint is not configured correctly.
    3. Check that your app's network configuration is correct. Make sure that your app is configured to use the correct virtual network and subnet, and that the subnet is configured to allow inbound traffic from your client IP address. 4. Check the startup logs for your app to see if there are any errors related to SSH. You can do this by running the following command: az webapp log tail -n -g.
      This will stream the logs for your app to the console. Look for any errors related to SSH or network connectivity. I hope this solves your issue, and if so, please tag this as answered.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.