Google Datalab is not working now - google-cloud-platform

The easy-and-famous datalab create instance-name command is not longer working. We did not any change in project/apis/keys/ or any other google options.
The same cmd was ok yesterday and now:
user-used-yeserday#pruebaalexborrar:~$ datalab create alexborrarpurbea
ERROR: gcloud crashed (BadStatusCodeError): HttpError accessing
<https://sourcerepo.googleapis.com/v1/projects/pruebaalexborrar/repos
alt=json>:
response: <{'status': '500', 'content-length': '109', 'x-xss-protection':
'1; mod
e=block', 'x-content-type-options': 'nosniff', 'transfer-encoding':
'chunked', 'vary': 'Origin, X-Origin, Referer', 'server': 'ESF', '-content-
encoding': 'gzip', 'cache-control': 'private', 'date': 'Wed, 19 Apr 2017
09:08:43 G
MT', 'x-frame-options': 'SAMEORIGIN', 'content-type': 'application/json;
charset=UTF-8'}>, content <{
"error": {
"code": 500,
"message": "Internal error encountered.",
"status": "INTERNAL"
}
}
>
When I use the same URL on my browser to get the error, I got other different error:
{
"error": {
"code": 401,
"message": "Request is missing required authentication credential. Expected
OAuth 2 access token, login cookie or other valid authentication credential.
See https://developers.google.com/identity/sign-in/web/devconsole-project.",
"status": "UNAUTHENTICATED"
}
}
I guess the 401 error code is not related with the upper 501 from the `datalab create´ command...
I know google now is deploying new cloud release...
Anyone knows what's happening?

There is a reported issue as #37242989 at the issue tracker regarding this, so I suggest that you can add more details and star the issue there to get further updates from the related team working on this.

Related

How to restore from 429 Resource has been exhausted (e.g. check quota)

my questions are simple, I am using PEOPLE API and I have skipped the quota limit for one of the users using the API, the error is only shown when trying to create a new contact for this specific user.
The error says code: 429, message: Resource has been exhausted (e.g. check quota).
How can I restore the user to use the API again?
If the limits are reset every minute, how is it possible that after 3 days the user is still blocked?
I do not want to increase the quota, what I want is to restore the quota again.
Additionally to this in my developer panel there is no indication that I have exceeded the quota which for PEOPLE API is limited to 90 per minute.
My code is:
const request = {
requestBody: contact
}
service.people.createContact(request)
.then((res)=>{
console.log('Done to create a contact', res.data);
})
.catch((err)=>{
console.log('Error', err);
})
And the retuning massage is:
response: {
config: {
url: 'https://people.googleapis.com/v1/people:createContact',
method: 'POST',
paramsSerializer: [Function],
data: [Object],
headers: [Object],
params: [Object: null prototype] {},
validateStatus: [Function],
body: '{"names":[{"familyName":"PASIEGA","givenName":"HOTEL","middleName":"VILLA","unstructuredName":"HOTEL VILLA PASIEGA"}],"addresses":[{"type":"home","streetAddress":"LAS BARRERAS, SN","city":"HOZNAYO","region":"S","postalCode":"39716","country":"ESPAÑA","countryCode":"ES"}],"emailAddresses":[{"value":"reservas#grupolospasiegos.com","type":"work"}],"phoneNumbers":[{"value":"785 52 12 58","type":"Villa Pasiega"},{"value":"785 52 12 58","type":"workFax"}],"biographies":[{"value":"Hotel los Pasiegos - Grupoo los Pasiegos","contentType":"TEXT_PLAIN"}],"urls":[{"value":"http://grupolospasiegos.com/contacto/","type":"profile"}],"organizations":[{"type":"Other","name":"HOTEL VILLA PASIEGA","title":"RESERVA"}],"memberships":[{"contactGroupMembership":{"contactGroupResourceName":"contactGroups/199bb8970e07b6a8"}},{"contactGroupMembership":{"contactGroupResourceName":"contactGroups/55fdbf598e048c03"}},{"contactGroupMembership":{"contactGroupResourceName":"contactGroups/5ee644148f02b901"}}]}',
responseType: 'json'
},
data: { error: [Object] },
headers: {
'alt-svc': 'h3-Q050=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-T051=":443"; ma=2592000,h3-T050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"',
'cache-control': 'private',
connection: 'close',
'content-encoding': 'gzip',
'content-type': 'application/json; charset=UTF-8',
date: 'Thu, 22 Oct 2020 12:47:16 GMT',
server: 'ESF',
'transfer-encoding': 'chunked',
vary: 'Origin, X-Origin, Referer',
'x-content-type-options': 'nosniff',
'x-frame-options': 'SAMEORIGIN',
'x-xss-protection': '0'
},
status: 429,
statusText: 'Too Many Requests'
},config: {
url: 'https://people.googleapis.com/v1/people:createContact',
method: 'POST',
paramsSerializer: [Function],
data: {
names: [Array],
addresses: [Array],
emailAddresses: [Array],
phoneNumbers: [Array],
biographies: [Array],
urls: [Array],
organizations: [Array],
memberships: [Array]
},
headers: {
'Accept-Encoding': 'gzip',
'User-Agent': 'google-api-nodejs-client/0.7.2 (gzip)',
Authorization: 'Bearer ya29.a0AfH6SMAJtuUp3vLhSXlDVyAd80iQc1D-mYZUD7mENq12vTiegBAV834dTGYbpuuVN9wCpJ0JBB51oMwEozhb9_xoM7s9NTiwqBicNYZAjzPpjLL4MvQUp8b-Oqju8opyNwDAJWCnLvUJ5Bvz266z5H1ZXIpe3_YstXDRzw',
'Content-Type': 'application/json',
Accept: 'application/json'
},
params: [Object: null prototype] {},
validateStatus: [Function],
body: '{"names":[{"familyName":"PASIEGA","givenName":"HOTEL","middleName":"VILLA","unstructuredName":"HOTEL VILLA PASIEGA"}],"addresses":[{"type":"home","streetAddress":"LAS BARRERAS, SN","city":"HOZNAYO","region":"S","postalCode":"39716","country":"ESPAÑA","countryCode":"ES"}],"emailAddresses":[{"value":"reservas#grupolospasiegos.com","type":"work"}],"phoneNumbers":[{"value":"942 525 962","type":"Villa Pasiega"},{"value":"942 525 963","type":"workFax"}],"biographies":[{"value":"Hotel los Pasiegos - Grupoo los Pasiegos","contentType":"TEXT_PLAIN"}],"urls":[{"value":"http://grupolospasiegos.com/contacto/","type":"profile"}],"organizations":[{"type":"Other","name":"HOTEL VILLA PASIEGA","title":"RESERVA"}],"memberships":[{"contactGroupMembership":{"contactGroupResourceName":"contactGroups/199bb8970e07b6a8"}},{"contactGroupMembership":{"contactGroupResourceName":"contactGroups/55fdbf598e048c03"}},{"contactGroupMembership":{"contactGroupResourceName":"contactGroups/5ee644148f02b901"}}]}',
responseType: 'json'
},
code: 429,
errors: [
{
message: 'Resource has been exhausted (e.g. check quota).',
domain: 'global',
reason: 'rateLimitExceeded'
}
]
}
The image below you can see my developer google console and it shows that i only have used 25 createContact request in a period of 2 days with a 100% error message which is the message a post here.
image
By the way thanks for your help.
I have found the solution to the problem and I have to be a bit extensive when explaining the solution.
Each google user has a limit on the number of contacts that can be stored in his contacts.google.com account, the limit is 25,000 contacts, if you exceed this limit the error shown in People API is 429 = Too Many Requests, my user only has 9000 contacts so the limit was not the cause of the problem, but what it had not considered is that a few weeks ago Google added a buttom basket for deleted contacts to contacts.google.com and it looks like that each contact deleted is stored and counted as a contact within contacts.google.com. This is what happened to me.
In summary:
My user has 9,000 visible contacts and 16,000 deleted contacts giving a total of 25,000 contacts causing error 429 to be displayed every time I try to create a new contact.
Solution:
Delete all deleted contacts, and everything should be resolved.
Hope:
Google allows access to People API to the contacts in the deleted basket and that error 429 better explains what it refers to cuz as i see in this case it is not a quota problem.
Important:
Thank you very much to #ale13 for your intent to help, I will leave this here in case future developers face the same problem.

Fail to deploy Django application with standard environment to Google App Engine

I deployed my Django app last Wednesday and everything was ok. On the next day, I tried to deploy changes, and App Engine ran into an error: INTERNAL: Internal error encountered. Also, I ran the deployment command today using the same app.yml config and nothing has changed. The same error has occurred.
My app.yml:
runtime: python37
instance_class: F1
env: standard
entrypoint: gunicorn -b :$PORT MyProject.wsgi --timeout 600
beta_settings:
cloud_sql_instances: "<project-name>:<region>:<database-name>"
handlers:
- url: /.*
script: auto
secure: always
redirect_http_response_code: 301
Here are the logs:
DEBUG: Running [gcloud.app.deploy] with arguments: [--quiet: "True", --verbosity: "debug", DEPLOYABLES:1: "[u'app.yaml']"]
DEBUG: Loading runtimes experiment config from [gs://runtime-builders/experiments.yaml]
INFO: Reading [<googlecloudsdk.api_lib.storage.storage_util.ObjectReference object at 0x7f463bc2cd10>]
DEBUG:
Traceback (most recent call last):
File "/opt/hostedtoolcache/gcloud/290.0.1/x64/lib/googlecloudsdk/api_lib/app/runtime_builders.py", line 269, in _Read
with contextlib.closing(storage_client.ReadObject(object_)) as f:
File "/opt/hostedtoolcache/gcloud/290.0.1/x64/lib/googlecloudsdk/api_lib/storage/storage_api.py", line 303, in ReadObject
object_=object_ref, err=http_exc.HttpException(err)))
BadFileException: Could not read [<googlecloudsdk.api_lib.storage.storage_util.ObjectReference object at 0x7f463bc2cd10>]. Please retry: HTTPError 404: No such object: runtime-builders/experiments.yaml
DEBUG: Experiment config file could not be read. This error is informational, and does not cause a deployment to fail. Reason: Unable to read the runtimes experiment config: [gs://runtime-builders/experiments.yaml], error: Could not read [<googlecloudsdk.api_lib.storage.storage_util.ObjectReference object at 0x7f463bc2cd10>]. Please retry: HTTPError 404: No such object: runtime-builders/experiments.yaml
Traceback (most recent call last):
File "/opt/hostedtoolcache/gcloud/290.0.1/x64/lib/surface/app/deploy.py", line 133, in _ServerSideExperimentEnabled
runtimes_builder_root)
File "/opt/hostedtoolcache/gcloud/290.0.1/x64/lib/googlecloudsdk/api_lib/app/runtime_builders.py", line 524, in LoadFromURI
.format(uri, e))
ExperimentsError: Unable to read the runtimes experiment config: [gs://runtime-builders/experiments.yaml], error: Could not read [<googlecloudsdk.api_lib.storage.storage_util.ObjectReference object at 0x7f463bc2cd10>]. Please retry: HTTPError 404: No such object: runtime-builders/experiments.yaml
DEBUG: API endpoint: [https://appengine.googleapis.com/], API version: [v1]
Services to deploy:
descriptor: [/home/runner/work/MyProject/MyProject/app.yaml]
source: [/home/runner/work/MyProject/MyProject]
target project: [<project-name>]
target service: [default]
target version: [20201018t154518]
target url: [https://<site-url>]
DEBUG: No bucket specified, retrieving default bucket.
DEBUG: Using bucket [gs://staging.<bucket-name>.appspot.com].
Beginning deployment of service [default]...
INFO: Using ignore file at [/home/runner/work/MyProject/MyProject/.gcloudignore].
DEBUG: Skipping file [README.md]
DEBUG: Skipping file [static]
DEBUG: Skipping file [.github]
DEBUG: Skipping file [tests]
DEBUG: Skipping file [.git]
DEBUG: Skipping file [misc]
DEBUG: Skipping file [static-root]
DEBUG: Skipping upload of [my_file_1.py]
...
DEBUG: Skipping upload of [my_file_n.py]
INFO: Incremental upload skipped 85.92% of data
DEBUG: Uploading 164 files to Google Cloud Storage
DEBUG: Using [16] threads
#============================================================#
#= Uploading 164 files to Google Cloud Storage =#
#INFO: Uploading [/home/runner/work/MyProject/MyProject/my_file_1.py] to [staging.<project-name>.appspot.com/1373be4811b24b04f2c1f0aaef730bdc76346e4a]
...
#INFO: Uploading [/home/runner/work/MyProject/MyProject/my_file_n.py] to [staging.<project-name>.appspot.com/1373be4811b24b04f2c1f0aaef730bdc76346e4a]
File upload done.
INFO: Manifest: [{...}]
DEBUG: Converted YAML to JSON: "{
"betaSettings": {
"cloud_sql_instances": "<project-name>:<region>:<database-name>"
},
"entrypoint": {
"shell": "gunicorn -b :$PORT MyProject.wsgi --timeout 600"
},
"env": "standard",
"handlers": [
{
"redirectHttpResponseCode": "REDIRECT_HTTP_RESPONSE_CODE_301",
"script": {
"scriptPath": "auto"
},
"securityLevel": "SECURE_ALWAYS",
"urlRegex": "/.*"
}
],
"instanceClass": "F1",
"runtime": "python37"
}"
DEBUG: Response returned status 500, retrying
DEBUG: Retrying request to url https://appengine.googleapis.com/v1/apps/<project-name>/services/default/versions?alt=json after exception HttpError accessing <https://appengine.googleapis.com/v1/apps/<project-name>/services/default/versions?alt=json>: response: <{'status': '500', 'content-length': '109', 'x-xss-protection': '0', 'x-content-type-options': 'nosniff', 'transfer-encoding': 'chunked', 'vary': 'Origin, X-Origin, Referer', 'server': 'ESF', '-content-encoding': 'gzip', 'cache-control': 'private', 'date': 'Sun, 18 Oct 2020 15:45:29 GMT', 'x-frame-options': 'SAMEORIGIN', 'alt-svc': 'h3-Q050=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-27=":443"; ma=2592000,h3-T051=":443"; ma=2592000,h3-T050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"', 'content-type': 'application/json; charset=UTF-8'}>, content <{
"error": {
"code": 500,
"message": "Internal error encountered.",
"status": "INTERNAL"
}
}
>
DEBUG: Response returned status 500, retrying
DEBUG: Retrying request to url https://appengine.googleapis.com/v1/apps/<project-name>/services/default/versions?alt=json after exception HttpError accessing <https://appengine.googleapis.com/v1/apps/<project-name>/services/default/versions?alt=json>: response: <{'status': '500', 'content-length': '109', 'x-xss-protection': '0', 'x-content-type-options': 'nosniff', 'transfer-encoding': 'chunked', 'vary': 'Origin, X-Origin, Referer', 'server': 'ESF', '-content-encoding': 'gzip', 'cache-control': 'private', 'date': 'Sun, 18 Oct 2020 15:45:29 GMT', 'x-frame-options': 'SAMEORIGIN', 'alt-svc': 'h3-Q050=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-27=":443"; ma=2592000,h3-T051=":443"; ma=2592000,h3-T050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"', 'content-type': 'application/json; charset=UTF-8'}>, content <{
"error": {
"code": 500,
"message": "Internal error encountered.",
"status": "INTERNAL"
}
}
>
DEBUG: Response returned status 500, retrying
DEBUG: Retrying request to url https://appengine.googleapis.com/v1/apps/<project-name>/services/default/versions?alt=json after exception HttpError accessing <https://appengine.googleapis.com/v1/apps/<project-name>/services/default/versions?alt=json>: response: <{'status': '500', 'content-length': '109', 'x-xss-protection': '0', 'x-content-type-options': 'nosniff', 'transfer-encoding': 'chunked', 'vary': 'Origin, X-Origin, Referer', 'server': 'ESF', '-content-encoding': 'gzip', 'cache-control': 'private', 'date': 'Sun, 18 Oct 2020 15:45:29 GMT', 'x-frame-options': 'SAMEORIGIN', 'alt-svc': 'h3-Q050=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-27=":443"; ma=2592000,h3-T051=":443"; ma=2592000,h3-T050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"', 'content-type': 'application/json; charset=UTF-8'}>, content <{
"error": {
"code": 500,
"message": "Internal error encountered.",
"status": "INTERNAL"
}
}
>
DEBUG: Response returned status 500, retrying
DEBUG: Retrying request to url https://appengine.googleapis.com/v1/apps/<project-name>/services/default/versions?alt=json after exception HttpError accessing <https://appengine.googleapis.com/v1/apps/<project-name>/services/default/versions?alt=json>: response: <{'status': '500', 'content-length': '109', 'x-xss-protection': '0', 'x-content-type-options': 'nosniff', 'transfer-encoding': 'chunked', 'vary': 'Origin, X-Origin, Referer', 'server': 'ESF', '-content-encoding': 'gzip', 'cache-control': 'private', 'date': 'Sun, 18 Oct 2020 15:45:29 GMT', 'x-frame-options': 'SAMEORIGIN', 'alt-svc': 'h3-Q050=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-27=":443"; ma=2592000,h3-T051=":443"; ma=2592000,h3-T050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"', 'content-type': 'application/json; charset=UTF-8'}>, content <{
"error": {
"code": 500,
"message": "Internal error encountered.",
"status": "INTERNAL"
}
}
>
DEBUG: (gcloud.app.deploy) INTERNAL: Internal error encountered.
Traceback (most recent call last):
File "/opt/hostedtoolcache/gcloud/290.0.1/x64/lib/googlecloudsdk/calliope/cli.py", line 983, in Execute
resources = calliope_command.Run(cli=self, args=args)
File "/opt/hostedtoolcache/gcloud/290.0.1/x64/lib/googlecloudsdk/calliope/backend.py", line 807, in Run
resources = command_instance.Run(args)
File "/opt/hostedtoolcache/gcloud/290.0.1/x64/lib/surface/app/deploy.py", line 117, in Run
default_strategy=flex_image_build_option_default))
File "/opt/hostedtoolcache/gcloud/290.0.1/x64/lib/googlecloudsdk/command_lib/app/deploy_util.py", line 643, in RunDeploy
ignore_file=args.ignore_file)
File "/opt/hostedtoolcache/gcloud/290.0.1/x64/lib/googlecloudsdk/command_lib/app/deploy_util.py", line 433, in Deploy
extra_config_settings)
File "/opt/hostedtoolcache/gcloud/290.0.1/x64/lib/googlecloudsdk/api_lib/app/appengine_api_client.py", line 172, in DeployService
extra_config_settings)
File "/opt/hostedtoolcache/gcloud/290.0.1/x64/lib/googlecloudsdk/api_lib/app/appengine_api_client.py", line 249, in _CreateVersion
return self.client.apps_services_versions.Create(create_request)
File "/opt/hostedtoolcache/gcloud/290.0.1/x64/lib/googlecloudsdk/third_party/apis/appengine/v1/appengine_v1_client.py", line 827, in Create
config, request, global_params=global_params)
File "/opt/hostedtoolcache/gcloud/290.0.1/x64/lib/third_party/apitools/base/py/base_api.py", line 729, in _RunMethod
http, http_request, **opts)
File "/opt/hostedtoolcache/gcloud/290.0.1/x64/lib/third_party/apitools/base/py/http_wrapper.py", line 346, in MakeRequest
check_response_func=check_response_func)
File "/opt/hostedtoolcache/gcloud/290.0.1/x64/lib/third_party/apitools/base/py/http_wrapper.py", line 402, in _MakeRequestNoRetry
check_response_func(response)
File "/opt/hostedtoolcache/gcloud/290.0.1/x64/lib/googlecloudsdk/api_lib/util/apis.py", line 281, in _CheckResponseForApiEnablement
http_wrapper.CheckResponse(response)
File "/opt/hostedtoolcache/gcloud/290.0.1/x64/lib/third_party/apitools/base/py/http_wrapper.py", line 223, in CheckResponse
raise exceptions.BadStatusCodeError.FromResponse(response)
BadStatusCodeError: HttpError accessing <https://appengine.googleapis.com/v1/apps/<project-name>/services/default/versions?alt=json>: response: <{'status': '500', 'content-length': '109', 'x-xss-protection': '0', 'x-content-type-options': 'nosniff', 'transfer-encoding': 'chunked', 'vary': 'Origin, X-Origin, Referer', 'server': 'ESF', '-content-encoding': 'gzip', 'cache-control': 'private', 'date': 'Sun, 18 Oct 2020 15:46:08 GMT', 'x-frame-options': 'SAMEORIGIN', 'alt-svc': 'h3-Q050=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-27=":443"; ma=2592000,h3-T051=":443"; ma=2592000,h3-T050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"', 'content-type': 'application/json; charset=UTF-8'}>, content <{
"error": {
"code": 500,
"message": "Internal error encountered.",
"status": "INTERNAL"
}
}
>
ERROR: (gcloud.app.deploy) INTERNAL: Internal error encountered.
How can I fix this problem?

gcloud sql instances patch fails with invalid data error

When trying to add high availability on an existing Cloud SQL instance using:
gcloud sql instances patch $INSTANCE --project $PROJECT --availability-type regional
the process fails with this message
The following message will be used for the patch API method.
{"project": "$PROJECT", "name": "$INSTANCE", "settings": {"availabilityType": "REGIONAL", "databaseFlags": [{"name": "sql_mode", "value": "TRADITIONAL"}, {"name": "default_time_zone", "value": "+01:00"}]}}
ERROR: (gcloud.sql.instances.patch) HTTPError 400: The incoming request contained invalid data.
It also fails using the web interface.
Gcloud version Google Cloud SDK [280.0.0]
This is the output of the log (not much help that I can see):
2020-02-14 11:01:34,476 DEBUG root Loaded Command Group: [u'gcloud', u'sql', u'instances']
2020-02-14 11:01:34,510 DEBUG root Loaded Command Group: [u'gcloud', u'sql', u'instances', u'patch']
2020-02-14 11:01:34,517 DEBUG root Running [gcloud.sql.instances.patch] with arguments: [--availability-type: "regional", --project: "$PROJECT", INSTANCE: "$INSTANCE"]
2020-02-14 11:01:35,388 INFO ___FILE_ONLY___ The following message will be used for the patch API method.
2020-02-14 11:01:35,398 INFO ___FILE_ONLY___ {"project": "$PROJECT", "name": "$INSTANCE", "settings": {"availabilityType": "REGIONAL", "databaseFlags": [{"name": "sql_mode", "value": "TRADITIONAL"}, {"name": "default_time_zone", "value": "+01:00"}]}}
2020-02-14 11:01:35,865 DEBUG root (gcloud.sql.instances.patch) HTTPError 400: The incoming request contained invalid data.
Traceback (most recent call last):
File "C:\Users\udAL\AppData\Local\Google\Cloud SDK\google-cloud-sdk\lib\googlecloudsdk\calliope\cli.py", line 981, in Execute
resources = calliope_command.Run(cli=self, args=args)
File "C:\Users\udAL\AppData\Local\Google\Cloud SDK\google-cloud-sdk\lib\googlecloudsdk\calliope\backend.py", line 807, in Run
resources = command_instance.Run(args)
File "C:\Users\udAL\AppData\Local\Google\Cloud SDK\google-cloud-sdk\lib\surface\sql\instances\patch.py", line 306, in Run
return RunBasePatchCommand(args, self.ReleaseTrack())
File "C:\Users\udAL\AppData\Local\Google\Cloud SDK\google-cloud-sdk\lib\surface\sql\instances\patch.py", line 278, in RunBasePatchCommand
instance=instance_ref.instance))
File "C:\Users\udAL\AppData\Local\Google\Cloud SDK\google-cloud-sdk\lib\googlecloudsdk\third_party\apis\sql\v1beta4\sql_v1beta4_client.py", line 697, in Patch
config, request, global_params=global_params)
File "C:\Users\udAL\AppData\Local\Google\Cloud SDK\google-cloud-sdk\bin\..\lib\third_party\apitools\base\py\base_api.py", line 731, in _RunMethod
return self.ProcessHttpResponse(method_config, http_response, request)
File "C:\Users\udAL\AppData\Local\Google\Cloud SDK\google-cloud-sdk\bin\..\lib\third_party\apitools\base\py\base_api.py", line 737, in ProcessHttpResponse
self.__ProcessHttpResponse(method_config, http_response, request))
File "C:\Users\udAL\AppData\Local\Google\Cloud SDK\google-cloud-sdk\bin\..\lib\third_party\apitools\base\py\base_api.py", line 604, in __ProcessHttpResponse
http_response, method_config=method_config, request=request)
HttpBadRequestError: HttpError accessing <https://sqladmin.googleapis.com/sql/v1beta4/projects/$PROJECT/instances/$INSTANCE?alt=json>: response: <{'status': '400', 'content-length': '269', 'x-xss-protection': '0', 'x-content-type-options': 'nosniff', 'transfer-encoding': 'chunked', 'vary': 'Origin, X-Origin, Referer', 'server': 'ESF', '-content-encoding': 'gzip', 'cache-control': 'private', 'date': 'Fri, 14 Feb 2020 10:01:35 GMT', 'x-frame-options': 'SAMEORIGIN', 'alt-svc': 'quic=":443"; ma=2592000; v="46,43",h3-Q050=":443"; ma=2592000,h3-Q049=":443"; ma=2592000,h3-Q048=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000', 'content-type': 'application/json; charset=UTF-8'}>, content <{
"error": {
"code": 400,
"message": "The incoming request contained invalid data.",
"errors": [
{
"message": "The incoming request contained invalid data.",
"domain": "global",
"reason": "invalidRequest"
}
]
}
}
>
2020-02-14 11:01:35,868 ERROR root (gcloud.sql.instances.patch) HTTPError 400: The incoming request contained invalid data.
2020-02-14 11:01:35,898 DEBUG root Metrics reporting process started...
Edit:
When using the gcloud cli command:
gcloud patch with 3 input parameters
Both $PROJECT and $INSTANCE do exist since I can gcloud sql databases list --instance $INSTANCE --project $PROJECT and it works fine.
availability-type=regional it's documented so should work
I'm not constructing the request manually, I'm using gcloud CLI
When using the console.cloud.google.com web interface:
Main menu -> SQL -> select instance -> Enable High Availability.
It's a button, no parameters added by myself.
Both return the same error "The incoming request contained invalid data."
Can't see how I may be doing it wrong.
Please check your data in the incoming request.
I used the Method: instances.patch and it worked as expected for me.
project
instance-name
request body:
"settings": {
"availabilityType": "REGIONAL",
"databaseFlags": [
{
"name": "sql_mode",
"value": "TRADITIONAL"
},
{
"name": "default_time_zone",
"value": "+01:00"
}
]
}
}
Curl command:
'https://sqladmin.googleapis.com/sql/v1beta4/projects/your-project/instances/your_instancet?key=[YOUR_API_KEY]' \
--header 'Authorization: Bearer [YOUR_ACCESS_TOKEN]' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{"settings":{"availabilityType":"REGIONAL","databaseFlags":[{"name":"sql_mode","value":"TRADITIONAL"},{"name":"default_time_zone","value":"+01:00"}]}}' \
--compressed```
Response 200:
{
"kind": "sql#operation",
"targetLink": "https://content-sqladmin.googleapis.com/sql/v1beta4/projects/your-project/instances/your-instance",
"status": "PENDING",
"user": "#cloud.com",
"insertTime": "2020-02-14T12:35:37.615Z",
"operationType": "UPDATE",
"name": "3f55c1be-97b5-4d37-8d1f-15cb61b4c6cc",
"targetId": "your-instance",
"selfLink": "https://content-sqladmin.googleapis.com/sql/v1beta4/projects/wave25-vladoi/operations/3f55c1be-97b5-4d37-8d1f-15cb61b4c6cc",
"targetProject": "your-project"
}

Google DataFlow python pipeline write failure

I'm running a simple DataFlow pipeline w/ the Python SDK for counting keywords. The job runs fine for pre-processing the input data, but it fails for grouping/output steps with the following error.
I guess the logs says the worker is having an issue accessing the temp folder, but the storage bucket in our project exists with proper permissions. What could be a possible issue for this?
"/usr/local/lib/python2.7/dist-packages/apache_beam/io/gcsio.py", line
606, in write raise self.upload_thread.last_error # pylint:
disable=raising-bad-type HttpError: HttpError accessing
<https://www.googleapis.com/resumable/upload/storage/v1/b/[PROJECT-NAME-REDACTED]-temp-2016-08-07_04-42-52/o?uploadType=resumable&alt=json&name=0015bf8d-fa87-4c9a-82d6-8ffcd742d770>:
response: <{'status': '404', 'alternate-protocol': '443:quic',
'content-length': '165', 'vary': 'Origin, X-Origin', 'server':
'UploadServer', 'x-guploader-uploadid':
'AEnB2UoYRPUwhz-OXlJ437k0J8Uxd1lJvTsFbfVJF_YMP2GQEvmdDpo7e-3DVhuqNd9b1A_RFPbfIcK6hCsFcar-hdI94rqJZUvATcDmGRRIvHecAt5CTrg',
'date': 'Sun, 07 Aug 2016 04:43:23 GMT', 'alt-svc': 'quic=":443";
ma=2592000; v="36,35,34,33,32,31,30"', 'content-type':
'application/json; charset=UTF-8'}>, content <{ "error": { "errors": [
{ "domain": "global", "reason": "notFound", "message": "Not Found" }
], "code": 404, "message": "Not Found" } } >
This is https://issues.apache.org/jira/browse/BEAM-539, which doesn't allow root buckets as outputs for TextFileSink. As a workaround, please use a subdirectory path (e.g. gs://foo/bar) as output locations.

Google Groups Settings API 500 Error

I want to update group settings via web API request. All necessary authorization scopes are provided and groups settings are enabled. I send a put request:
body = {
"whoCanPostMessage": "ALL_MEMBERS_CAN_POST",
"whoCanViewMembership": "ALL_MEMBERS_CAN_VIEW"
}
response = requests.put(
"https://www.googleapis.com/groups/v1/groups/%s" % group_id,
data=json.dumps(body),
headers={
'Content-type': 'application/json; charset=UTF-8',
'Authorization': 'Bearer %s' % access_token
}
)
but the server responds:
<Response [500]> Internal Server Error
headers:
Cache-Control: private, max-age=0
Content-Encoding: gzip
Content-Length: 122
Content-Type: application/json; charset=UTF-8
Date: Fri, 05 Feb 2016 18:36:53 GMT
Expires: Fri, 05 Feb 2016 18:36:53 GMT
Server: GSE
Vary: Origin, X-Origin
content:
{
"error": {
"errors": [
{
"domain": "global",
"reason": "backendError",
"message": "Backend Error"
}
],
"code": 500,
"message": "Backend Error"
}
}
The same error occurs when I use Try It! in the Groups Settings API Reference.
Do you have Google Groups for business enabled in your domain?
I found that UniqueGroupID field should be set to a group email address not a group id. It works now.