0

I created a VM machine from image TF (tf-1-10-cu92) to use tensorflow. I found that it includes already jupyter notebook but I can connect to it just the first time. Later I encounter an error

A connection to the notebook server could not be established. The notebook will continue trying to reconnect. Check your network connection or notebook server configuration

I search for this problem and found that maybe it is because my IP is not static so I did it. static ip

I also created a firewall rule that allows all protocols firewall rule

However, the error is not solved. I am very appreciated if someone can help me with this. Thank you

p/s: The command I used to created the VM is below:

export IMAGE_FAMILY="tf-1-10-cu92" # 
export ZONE="us-west2-b" # budget: "us-west1-b"
export INSTANCE_NAME="tf-instance"
export INSTANCE_TYPE="n1-highmem-8" # budget: "n1-highmem-4"

# budget: 'type=nvidia-tesla-k80,count=1'
gcloud compute instances create $INSTANCE_NAME \
        --zone=$ZONE \
        --image-family=$IMAGE_FAMILY \
        --image-project=deeplearning-platform-release \
        --maintenance-policy=TERMINATE \
        --accelerator="type=nvidia-tesla-p4,count=1" \
        --machine-type=$INSTANCE_TYPE \
        --boot-disk-size=200GB \
        --metadata="install-nvidia-driver=True" \
        --preemptible
0

If you have already created a firewall rule for all IP and all protocols, what I assume is that your internal firewall might be closed or the service is not listening in any port.

I suggest you to make an nmap test such as sudo nmap -p <port> <your-server-ip>

If the result is something different to OPEN then that's the issue.

  • Do you mean by checking port of my GCP machine (IP found in GCP) ? If yes then the port is actually 8080/tcp open I can access to Jupyter notebook by taping: <GCP-VM-IP>:8080 . The Notebook page load successful. Actually I can use jupyter the first time when I created it. Then, when I shut it down, and move to another place, I cannot use it anymore. So I guess it might come from static or dynamic IP. However, I follow a tutorial and everything is fine. When I open a notebook, it takes forever to load then an error appear "A connection to the notebook server could not be established..." – Ben Jan 22 at 15:45
  • Yes, in fact, if you are using an ephemeral IP most likely you'll lose it at some point. I suggest you [reserve a static IP] (cloud.google.com/compute/docs/ip-addresses/…) and then update all your configuration to use the one you just reserved – J. Carbajal Jan 23 at 1:22
  • Yes I reserved the static IP already but it is not working. The full error is :"A connection to the notebook server could not be established. The notebook will continue trying to reconnect. Check your network connection or notebook server configuration." – Ben Jan 23 at 13:54
  • Please update your case with a nmap test for all your ports and a screenshot of your firewall rules – J. Carbajal Jan 24 at 0:17
  • You find here the firewall rule: fire wall . You can see the tensortr_rule apply for all port. However, when I try to run the nmap for all ports, it takes really long time. I used the command like this: nmap -p- -T2 -n <ip> . Do you know another way to make it faster. Thank you a lot – Ben Jan 24 at 10:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.