GoogleCloudPlatform / GoogleCloudPlatform/gsutil

Facing issue while Uploading file to GCS from Google Cloud Compute

Open
#1,883 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
918
Forks
335
PR merge metrics
No merged PRs in 30d

Description

Facing issue while uploading the file to GCS from Google Cloud Compute - from Linux VM.

We are using gcloud gsutil cp "FILE_NAME" "${GCS_BUCKET}/${GCS_OBJECT}" .

It works from the compute to push in the shell session.

But when we are calling this from multiple shell sesssions (Example A-Script is calling B-Script and B-Script is calling C-Script and C-Script has the code to push it to GCS and , it is unable to push the files to GCS and giving error.
```

File "/usr/lib64/google-cloud-sdk/platform/gsutil/third_party/httplib2/python3/httplib2/__init__.py", line 1343, in _conn_request
conn.connect()
File "/usr/lib64/google-cloud-sdk/platform/gsutil/third_party/httplib2/python3/httplib2/__init__.py", line 1119, in connect
address_info = socket.getaddrinfo(host, port, 0, socket.SOCK_STREAM)
File "/usr/lib64/google-cloud-sdk/platform/bundledpythonunix/lib/python3.11/socket.py", line 962, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -2] Name or service not known

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib64/google-cloud-sdk/platform/gsutil/gsutil", line 21, in
gsutil.RunMain()
...
"/usr/lib64/google-cloud-sdk/platform/gsutil/third_party/httplib2/python3/httplib2/init.py", line 1350, in _conn_request 2025-09-25 10:37:23 raise ServerNotFoundError("Unable to find the server at %s" % conn.host) 2025-09-25 10:37:23 httplib2.error.ServerNotFoundError: Unable to find the server at storage.googleapis.coma

```

GSUTIL is not configured properply in the cloud.

However **gcloud auth list** work properly. in the same C-Script (3 rd hierarchy shell)

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the `gsutil cp` command from the nested C-Script on the Linux VM, comparing it with the working interactive shell session. Check the traceback around `httplib2` and `storage.googleapis.com`, and compare the environment with `gcloud auth list`. Done means identifying a reproducible cause and documenting or fixing the failed upload path.

Written by the indexing model from the issue text.

Assessment

Tech stack
google-cloud, python
Domain
cli, cloud, networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.