Re: [google-cloud-sdk] access my gcloud through proxy

345 views
Skip to first unread message

Zachary Newman

unread,
Aug 15, 2016, 9:22:35 AM8/15/16
to Xiao Liang, Google Cloud Developers
-google-cloud-sdk@
+google-cloud-dev@

We've consolidated email groups, so that we can focus our support efforts.

On Mon, Aug 15, 2016 at 5:33 AM, Xiao Liang <liang...@gmail.com> wrote:
Hi, here

I download google-cloud-sdk and setup to access my cloud storage through proxy. According to some experience from internet. it's work fine when I use below command.
http_proxy=[proxyserver] gsuilt ls

And I try the example from office site:
http_proxy=[proxyserver] go run example.go

it still work fine

but, I get some error If I use those code in a app engine developing server that run in my local computer. and My example code as bellow

func init(){
 http
.HandleFunc("/",hello)
}
func hello
(w http.ResponseWriter,r *http.Request){
 ctx
:= appengine.NewContext(r)
 client
, err:=storage.NewClient(ctx)
 bucket := client.Bucket(bucketName)
 
// do some stuff of read/write storage
}

developing server run as command
http_proxy=[proxyserver] goapp serve myapp


error message as bellow

 ERROR: Get https://www.googleapis.com/storage/v1/b/{...}: API error 2 (urlfetch: FETCH_ERROR): [Errno 101] Network is unreachable

Actually, those code is work fine when I deploy it on google app engine.

so I guess the reason is developing app engine server doesn't use proxy when running, How can I solve it?

Thanks in Advance

L.X.

--
You received this message because you are subscribed to the Google Groups "google-cloud-sdk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sdk+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/google-cloud-sdk.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sdk/ca0e424c-9d5e-48c1-83b4-e5ed1dc6dc93%40googlegroups.com.

Nick Payne

unread,
Aug 15, 2016, 11:11:41 AM8/15/16
to Google Cloud Developers, liang...@gmail.com
Hey Xiao,

Is it correct to assume that your system blocks outgoing network traffic except through the proxy?

There's currently an open issue for this in the Public Issue Tracker, where other users are seeing the same behaviour. There are some potential workarounds posted. You can star that thread and post there for more updates.

Cheers,

Nick
Cloud Platform Community Support
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-s...@googlegroups.com.

Xiao Liang

unread,
Aug 15, 2016, 7:23:34 PM8/15/16
to Google Cloud Developers, liang...@gmail.com
thanks.

在 2016年8月15日星期一 UTC+8下午11:11:41,Nick Payne写道:

Xiao Liang

unread,
Aug 15, 2016, 10:54:10 PM8/15/16
to Google Cloud Developers, liang...@gmail.com
Refer to issue 544, I look into the source file of appengine. I found that environment variable name is HTTPS_PROXY(upper case) instead of https_proxy(low case). After I setup it, everything is OK.

Thanks


在 2016年8月15日星期一 UTC+8下午11:11:41,Nick Payne写道:
Hey Xiao,

Nick Payne

unread,
Aug 16, 2016, 12:24:48 PM8/16/16
to Google Cloud Developers, liang...@gmail.com
Hey Xiao,

Glad to hear you found a workaround. We'll be taking a look at getting this better-documented. 

Best of luck in your future development! 


Nick
Cloud Platform Community Support

Reply all
Reply to author
Forward
0 new messages