Failed to pull `gcr.io/google_containers/pause-amd64:3.0`:

Hi, I am Chinese. I use nomad to deploy a example .nomad file from the nomad website which named connect.nomad:

job “countdash” {
datacenters = [“dc1”]

group “api” {
network {
mode = “bridge”
}

service {                
  name = "count-api"     
  port = "9001"          
                         
  connect {              
    sidecar_service {}   
  }                      
}                        

because of the network limit of china, I got the error as below:
Dec 27, '19 09:03:22 +0800 Setup Failure failed to setup alloc: pre-run hook “network” failed: failed to create network for alloc: Failed to pull gcr.io/google_containers/pause-amd64:3.0: API error (500): Get https://gcr.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)

So, I pull this image to my local machine, But I still can’t solve this problem!and how can I do to resolve this problem? thank you very much!

I get the source code from github and grep the ‘’gcr.io‘’ string, it seems that I need set the infra_image parameter, is it that?

yes, I have resolved this problem! change the client node’s configure .hcl file as below :
lee@wooddeep:~$ cat client1.hcl

log_level = “DEBUG”

data_dir = “/home/lee/data/client1”

client {
enabled = true

servers = [“127.0.0.1:4647”]
}

ports {
http = 5656
}

plugin “docker” {
config {
infra_image = “registry.cn-hangzhou.aliyuncs.com/google-containers/pause-amd64:3.0
}
}

2 Likes