google-cloud-platform

Dataflow with python flex template - launcher timeout

£可爱£侵袭症+ 提交于 2021-02-10 05:22:50
问题 I'm trying to run my python dataflow job with flex template. job works fine locally when I run with direct runner (without flex template) however when I try to run it with flex template, job stuck in "Queued" status for a while and then fail with timeout. Here is some of logs I found in GCE console: INFO:apache_beam.runners.portability.stager:Executing command: ['/usr/local/bin/python', '-m', 'pip', 'download', '--dest', '/tmp/dataflow-requirements-cache', '-r', '/dataflow/template

Dataflow with python flex template - launcher timeout

北慕城南 提交于 2021-02-10 05:22:09
问题 I'm trying to run my python dataflow job with flex template. job works fine locally when I run with direct runner (without flex template) however when I try to run it with flex template, job stuck in "Queued" status for a while and then fail with timeout. Here is some of logs I found in GCE console: INFO:apache_beam.runners.portability.stager:Executing command: ['/usr/local/bin/python', '-m', 'pip', 'download', '--dest', '/tmp/dataflow-requirements-cache', '-r', '/dataflow/template

Unable to send email from nodemailer

≯℡__Kan透↙ 提交于 2021-02-10 04:43:04
问题 Hi I am using nodemailer to send email. My nodejs application is deployed on gcp instance with nginx reverse proxy. My code is able to send email locally but not from server. Note that ssl is also enabled. note that this command is not running from telnet smtp.1and1.com 587 but this is running telnet smtp.gmail.com 587 This is my code var transporterOptions = { host: "smtp.1and1.com", port: 587, auth: { user: email, pass: pass }, secure:true }; 回答1: Google has blocked port 587 at the instance

Unable to send email from nodemailer

你。 提交于 2021-02-10 04:36:48
问题 Hi I am using nodemailer to send email. My nodejs application is deployed on gcp instance with nginx reverse proxy. My code is able to send email locally but not from server. Note that ssl is also enabled. note that this command is not running from telnet smtp.1and1.com 587 but this is running telnet smtp.gmail.com 587 This is my code var transporterOptions = { host: "smtp.1and1.com", port: 587, auth: { user: email, pass: pass }, secure:true }; 回答1: Google has blocked port 587 at the instance

Generating thumbnails with Cloud Functions using the Python37 runtime

筅森魡賤 提交于 2021-02-10 04:21:55
问题 I have a Google Cloud Function triggered by Firebase Storage, and I want to generate thumbnails. While the Node.js docs have an example that uses ImageMagick there is no such equivalent for the python runtime. What would be an acceptable approach keeping performance in mind ? Would Pillow-SIMD work in a cloud function ? Or should I go App Engine for thumbnail generation and use the Images service ? 回答1: You can use wand, a binding to ImageMagick, along with google-cloud-storage to resize an

App Engine Service Deployment Stopped Working on Known Good Version

心不动则不痛 提交于 2021-02-09 12:10:36
问题 We have a service hosted in gcloud that is not actively developed and we have not deployed for a few weeks. On deployment we now get the error ERROR: gcloud crashed (TypeError): unorderable types: NoneType() > int() and the deployment fails. We get the exact same results even if we run the last deployed version through CI. This is my app.yaml runtime: aspnetcore env: flex threadsafe: true service: myapp manual_scaling: instances: 1 env_variables: service_name: myapp AWS_ACCESS_KEY_ID: {{AWS

App Engine Service Deployment Stopped Working on Known Good Version

喜你入骨 提交于 2021-02-09 11:59:12
问题 We have a service hosted in gcloud that is not actively developed and we have not deployed for a few weeks. On deployment we now get the error ERROR: gcloud crashed (TypeError): unorderable types: NoneType() > int() and the deployment fails. We get the exact same results even if we run the last deployed version through CI. This is my app.yaml runtime: aspnetcore env: flex threadsafe: true service: myapp manual_scaling: instances: 1 env_variables: service_name: myapp AWS_ACCESS_KEY_ID: {{AWS

GCS - Python download blobs with directory structure

烂漫一生 提交于 2021-02-08 20:53:10
问题 I'm using a combination of the GCS python SDK and google API client to loop through a version-enabled bucket and download specific objects based on metadata. from google.cloud import storage from googleapiclient import discovery from oauth2client.client import GoogleCredentials def downloadepoch_objects(): request = service.objects().list( bucket=bucket_name, versions=True ) response = request.execute() for item in response['items']: if item['metadata']['epoch'] == restore_epoch: print(item[

passing path parameter in google endpoints to backend not working

跟風遠走 提交于 2021-02-08 20:52:59
问题 My setup contains google-endpoints with google-cloud-functions as my backend. Google endpoints is defined with the following swagger v2 yaml: swagger: "2.0" info: description: "yada..." version: "0.0.1" title: "yadada.." termsOfService: "http://swagger.io/terms/" contact: name: "blah" email: "email@mail.com" url: "https://example.com" host: "(generated service url by google when endpoints is deployed, i.e. 'api-gateway-xyz123123-ew.a.run.app')" tags: - name: "Documents" description: "blah"

passing path parameter in google endpoints to backend not working

余生颓废 提交于 2021-02-08 20:52:21
问题 My setup contains google-endpoints with google-cloud-functions as my backend. Google endpoints is defined with the following swagger v2 yaml: swagger: "2.0" info: description: "yada..." version: "0.0.1" title: "yadada.." termsOfService: "http://swagger.io/terms/" contact: name: "blah" email: "email@mail.com" url: "https://example.com" host: "(generated service url by google when endpoints is deployed, i.e. 'api-gateway-xyz123123-ew.a.run.app')" tags: - name: "Documents" description: "blah"