0

I am using Cisco anyconnect vpn, wsl2, Ubuntu 20.04 LTS and I have a problem with setting up my gcloud project.

gcloud config set project my_project

There is no issue with my Windows CMD, so there is no issue with my account. I am able to curl google.com in my wsl2 as well so there is no DNS issue, I mean have the network in my wsl.

I am not sure what privilege I don't have in my wsl2 that caused the system stuck.

In addition, I tried to use an alternative way to set the project and run the

gcloud container clusters ....

but I am not able to run this command as well.

I don't have any issue with the below commands either, which I am running before the above first statement:

    gcloud auth activate-service-account --key-file $HOME/mydevdetails.json
    gcloud config set account my-dev@dev-server.iam.gserviceaccount.com

Would you mind helping me to figure out what is missing?

Osvaldo
  • 473
  • 1
  • 12
Amir
  • 1,919
  • 8
  • 53
  • 105
  • What is the error? Saying it does not work is not a good problem description. Start your question over and state the problem, the command, and the error. Extra fluff is not required. – John Hanley Mar 21 '22 at 18:05
  • Could you please specify which problem you are having and also share any log or error message? Meanwhile, you could check [this post](https://stackoverflow.com/questions/61953082/why-is-my-gcloud-command-suddenly-very-slow-inside-wsl2) and this [forum thread](https://groups.google.com/g/google-cloud-dev/c/8xUOaiR7WKE) for some related troubleshootings. – Osvaldo Mar 22 '22 at 18:47
  • @JohnHanley: The main issue was that it was not generating any error also. However, later I used -v while connecting via ssh and then reach the below solution. I had a similar issue with my ssh command also. – Amir Mar 25 '22 at 13:26

1 Answers1

2

I am living in Germany and I am using Vodafone CGA644VF modem which is providing a horrible service for me. It seems that there is some restriction in this type of modem and the problem is due to the size of the packet.

I solve my problem by decreasing the size of the packet sent from WSL by using the below command:

 sudo ifconfig eth0 mtu 500 up

You can check your current setting by :

ifconfig | grep mtu
Amir
  • 1,919
  • 8
  • 53
  • 105
  • Although I understand exactly what mtu does, I would never guess that was the problem. If mtu is the issue, then you should have had problems using the Internet for any site. You should have put the details about using a bizarre network in your original question. – John Hanley Mar 25 '22 at 17:24
  • @JohnHanley: So do I, we figure it out by ping command with different size packets and checking the number of the lost packet, then we reach the above point. other than that everything was working properly and smoothly without any issue. – Amir Apr 04 '22 at 12:51