Re: [google-appengine] Re: app engine firewall - allow services to access each other?

2017-09-26 Thread John Pettitt
They all use the same primary service address and then dispatch.yaml to route 
them.  Count the dispatch.yaml be causing the 403’s we’re seeing?  For the same 
reason I’m trying to use the firewall to protect the origin server I don;t want 
to publish the service names here.

John

> On Sep 26, 2017, at 6:43 PM, 'Kenworth (Google Cloud Platform)' via Google 
> App Engine  wrote:
> 
> If the services are coming from the same project, it should be allowed by 
> default and there's no need to put allow rules. Otherwise, let me know which 
> services are involved on your application.
> 
> -- 
> You received this message because you are subscribed to a topic in the Google 
> Groups "Google App Engine" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/google-appengine/AIG6yyUn8Xg/unsubscribe 
> .
> To unsubscribe from this group and all its topics, send an email to 
> google-appengine+unsubscr...@googlegroups.com 
> .
> To post to this group, send email to google-appengine@googlegroups.com 
> .
> Visit this group at https://groups.google.com/group/google-appengine 
> .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/google-appengine/2db2b348-4881-4996-9ae8-0953009beff5%40googlegroups.com
>  
> .
> For more options, visit https://groups.google.com/d/optout 
> .

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/00776B80-AE14-4BB9-B00D-3EE692353B0E%40relaymedia.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: GAE-Flex environment - 502 error when latency grows too high?

2017-09-26 Thread 'Kenworth (Google Cloud Platform)' via Google App Engine
Latency can be caused by a number of things - geography, startup time, size 
of payload, etc. You can visit this blog on How to Troubleshoot Latency in 
your App Engine Application 

 and 
hopefully might help you isolate the latency problem. 

It is also helpful to observe how long request takes to respond through 
Stackdriver Trace[1]. If this is not possible because most of the requests 
timeout, one should try to make split up or defer the work being done to 
respond to the request. 

If you are still affected after trying the above, I recommend you post on 
StackOverflow  
which we also monitor. You'll be in touch with a much larger user-base of 
people who are going to help you, in a format which is designed for that 
purpose. Check out our community support page for the list of tags [2] we 
monitor. 

[1] https://cloud.google.com/trace/docs/
[2] https://cloud.google.com/support/docs/stackexchange 

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/00a2bd4f-047b-4f3f-a0d7-b9961109f120%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: app engine firewall - allow services to access each other?

2017-09-26 Thread 'Kenworth (Google Cloud Platform)' via Google App Engine
If the services are coming from the same project, it should be allowed by 
default and there's no need to put allow rules. Otherwise, let me know 
which services are involved on your application.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/2db2b348-4881-4996-9ae8-0953009beff5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] GAE-Flex environment - 502 error when latency grows too high?

2017-09-26 Thread jyang
I've noticed that I am getting a lot of 502 error as the latency of my 
service starts to grow. The number of 502 error basically grows with the 
number of requests sent, and it seems like I can only process very small 
number of events on the GAE.

The service is written in Python, and is performing data ETL of my app 
events that is then loaded into Google BigQuery. 

I've tried changing the instance class or increasing the maximum number of 
instances but I thing there is some other problem with my setup as we are 
still in development and shouldn't really need that much computing power.



runtime: python
env: flex
entrypoint: gunicorn -b :$PORT standard-event-service:app
threadsafe: true

runtime_config:
  python_version: 3

service: standard-event-service

instance_class: F1
automatic_scaling:
  min_num_instances: 1
  max_num_instances: 10
  max_idle_instances: automatic  # default value
  max_concurrent_requests: 20

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/192f0b3d-83e5-4615-ab45-e4d7fc21c408%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] app engine firewall - allow services to access each other?

2017-09-26 Thread John Pettitt

I've been playing the the new firewall beta.  The use case is disallow all 
traffic except our CDN, essentially origin shielding.  Works great except 
some of our services access each other and I'd like to be able to put allow 
rules in for that but I can't be sure of what outbound IP they use.  Is 
there way of specifying allow for a service?

John

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/207f9f0e-68f7-4a52-95ea-ee374cc5ded4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: "www.custom-url.com is already mapped to a project" error when trying to point custom domain to App Engine app

2017-09-26 Thread 'Kenworth (Google Cloud Platform)' via Google App Engine
Are you still experiencing this issue? When I go to the URL 
, I do not see a blogger site.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/84662afa-2224-4758-9d06-991884a46b85%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [google-appengine] Java8 on standard: need to migrate off Endpoints v1?

2017-09-26 Thread Charles Capps
Typo, it was slower, not faster.

On Sep 26, 2017 2:20 PM, "Charles Capps"  wrote:

> We did A/B testing where we deployed:
> * Version A of simple service - implemented with Jersey and swagger
> annotations
> * Version B of simple service - identical code, but with Endpoints v2
> servlet filters, and Endpoints v2 deployed along with the service using the
> generated swagger.json.
>
> We ran Gatling tests that did thousands of requests from a GCE virtual
> machine (to rule out any slowness in our local internet connection.)
>
> Version A -- which was identical except we didn't deploy Endpoints v2 --
> was consistently ~100ms faster.
>
> We reproduced this in multiple tests, including a test that deployed one
> of our real world services with or without Endpoints v2.
>
> There seems to be some significant lag introduced by Endpoints v2. We also
> just don't need whatever console page is added by adding the Endpoints v2
> servlet filters and so on.
>
> On Tuesday, September 26, 2017 at 1:44:33 PM UTC-7, Frank Natividad wrote:
>>
>> Hi Charles,
>>
>> I'm curious about the different experiments performed with Endpoints
>> Frameworks v2. Could you tell us more about that?
>>
>> Thanks!
>>
>> On Friday, September 22, 2017 at 8:32:01 AM UTC-7, Charles Capps wrote:
>>>
>>> Hi Nico,
>>>
>>> It's a straightforward process if you use the Jersey Servlet container,
>>> since GAE works well with any servlet-based technology. In the services we
>>> have already migrated to Jersey, we only need these 2 maven dependencies
>>> from Jersey (currently using version 2.25.1):
>>>
>>> 
   org.glassfish.jersey.containers
   jersey-container-servlet-core
   ${jersey.version}
 
 
   org.glassfish.jersey.media
   jersey-media-json-jackson
   ${jersey.version}
 
>>>
>>>
>>> Then, in your web.xml, you can define a servlet like:
>>>
 
 MyServiceApplication
 org.glassfish.jersey.servlet.ServletContainer
 
 
   javax.ws.rs.Application
   com.mycompany.jersey.MyServiceApplication>>> m-value>
 
 1
   
>>>
>>>
>>> where the MyServiceApplication class extends the JAX-RS Application base
>>> class, for which you can find documentation at
>>> https://jersey.github.io/documentation/latest/index.html
>>>
>>> Good luck migrating!
>>>
>>> On Thursday, September 21, 2017 at 11:52:47 PM UTC-7, Nico Verwer wrote:

 Is there a guide on how to use Jersey on App Engine?
 I am still on Cloud Endpoints v1, and I am reluctant to migrate to v2
 because it might be deprecated before I finish the migration. Jersey is
 probably more stable and future-proof. And, as you indicate, it is faster
 than GCE v2.

>>> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Google App Engine" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/google-appengine/Ab-1Pa8GJE0/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> google-appengine+unsubscr...@googlegroups.com.
> To post to this group, send email to google-appengine@googlegroups.com.
> Visit this group at https://groups.google.com/group/google-appengine.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/google-appengine/cea39b28-145f-442d-91b7-
> 3910d3909f79%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/CAGnsvRUsAHn7FB2mnHP%3DPWgz1vgBRbNHSLe%2BtjBCZWHnXxoYng%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [google-appengine] Java8 on standard: need to migrate off Endpoints v1?

2017-09-26 Thread Charles Capps
We did A/B testing where we deployed:
* Version A of simple service - implemented with Jersey and swagger 
annotations
* Version B of simple service - identical code, but with Endpoints v2 
servlet filters, and Endpoints v2 deployed along with the service using the 
generated swagger.json.

We ran Gatling tests that did thousands of requests from a GCE virtual 
machine (to rule out any slowness in our local internet connection.) 

Version A -- which was identical except we didn't deploy Endpoints v2 -- 
was consistently ~100ms faster. 

We reproduced this in multiple tests, including a test that deployed one of 
our real world services with or without Endpoints v2.

There seems to be some significant lag introduced by Endpoints v2. We also 
just don't need whatever console page is added by adding the Endpoints v2 
servlet filters and so on.

On Tuesday, September 26, 2017 at 1:44:33 PM UTC-7, Frank Natividad wrote:
>
> Hi Charles,
>
> I'm curious about the different experiments performed with Endpoints 
> Frameworks v2. Could you tell us more about that? 
>
> Thanks!
>
> On Friday, September 22, 2017 at 8:32:01 AM UTC-7, Charles Capps wrote:
>>
>> Hi Nico,
>>
>> It's a straightforward process if you use the Jersey Servlet container, 
>> since GAE works well with any servlet-based technology. In the services we 
>> have already migrated to Jersey, we only need these 2 maven dependencies 
>> from Jersey (currently using version 2.25.1):
>>
>> 
>>>   org.glassfish.jersey.containers
>>>   jersey-container-servlet-core
>>>   ${jersey.version}
>>> 
>>> 
>>>   org.glassfish.jersey.media
>>>   jersey-media-json-jackson
>>>   ${jersey.version}
>>> 
>>
>>
>> Then, in your web.xml, you can define a servlet like:
>>
>>> 
>>> MyServiceApplication
>>> 
>>> org.glassfish.jersey.servlet.ServletContainer
>>> 
>>>   javax.ws.rs.Application
>>>   
>>> com.mycompany.jersey.MyServiceApplication
>>> 
>>> 1
>>>   
>>
>>
>> where the MyServiceApplication class extends the JAX-RS Application base 
>> class, for which you can find documentation at 
>> https://jersey.github.io/documentation/latest/index.html
>>  
>> Good luck migrating!
>>
>> On Thursday, September 21, 2017 at 11:52:47 PM UTC-7, Nico Verwer wrote:
>>>
>>> Is there a guide on how to use Jersey on App Engine?
>>> I am still on Cloud Endpoints v1, and I am reluctant to migrate to v2 
>>> because it might be deprecated before I finish the migration. Jersey is 
>>> probably more stable and future-proof. And, as you indicate, it is faster 
>>> than GCE v2.
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/cea39b28-145f-442d-91b7-3910d3909f79%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [google-appengine] Java8 on standard: need to migrate off Endpoints v1?

2017-09-26 Thread 'Frank Natividad' via Google App Engine
Hi Charles,

I'm curious about the different experiments performed with Endpoints 
Frameworks v2. Could you tell us more about that? 

Thanks!

On Friday, September 22, 2017 at 8:32:01 AM UTC-7, Charles Capps wrote:
>
> Hi Nico,
>
> It's a straightforward process if you use the Jersey Servlet container, 
> since GAE works well with any servlet-based technology. In the services we 
> have already migrated to Jersey, we only need these 2 maven dependencies 
> from Jersey (currently using version 2.25.1):
>
> 
>>   org.glassfish.jersey.containers
>>   jersey-container-servlet-core
>>   ${jersey.version}
>> 
>> 
>>   org.glassfish.jersey.media
>>   jersey-media-json-jackson
>>   ${jersey.version}
>> 
>
>
> Then, in your web.xml, you can define a servlet like:
>
>> 
>> MyServiceApplication
>> 
>> org.glassfish.jersey.servlet.ServletContainer
>> 
>>   javax.ws.rs.Application
>>   com.mycompany.jersey.MyServiceApplication
>> 
>> 1
>>   
>
>
> where the MyServiceApplication class extends the JAX-RS Application base 
> class, for which you can find documentation at 
> https://jersey.github.io/documentation/latest/index.html
>  
> Good luck migrating!
>
> On Thursday, September 21, 2017 at 11:52:47 PM UTC-7, Nico Verwer wrote:
>>
>> Is there a guide on how to use Jersey on App Engine?
>> I am still on Cloud Endpoints v1, and I am reluctant to migrate to v2 
>> because it might be deprecated before I finish the migration. Jersey is 
>> probably more stable and future-proof. And, as you indicate, it is faster 
>> than GCE v2.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/97636cf5-c923-4c88-9b51-3facb5e55fae%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] "www.custom-url.com is already mapped to a project" error when trying to point custom domain to App Engine app

2017-09-26 Thread Evan Kaminsky
Hello,

I recently purchased a domain through Google Domains and when I try to 
point it to my App Engine app, I receive the "already mapped to a project" 
error. I have not done anything with the domain and I have verified this by 
going to its DNS settings page. When I go to the URL www.tipsymix.com, I 
see a Blogger site that I did not put up even though I own the domain name.

Thanks,
Evan

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/cb764f50-99fc-411a-a612-c5e8a6750759%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: gcsfuse does not mount google storage bucket on startup, but does when called manually: GAE, flexible environment, custom runtime

2017-09-26 Thread gusev
1. I can run gcsfuse manually, without --privileged mode.
2. I am moving an existing application, which has a lot of disk access in 
various places. Moreover, it uses a number of third party modules that have 
their own disk io. Re-writing all that with client libraries is not 
feasible.

On Tuesday, September 26, 2017 at 7:32:17 PM UTC+3, Yannick (Cloud Platform 
Support) wrote:
>
> I believe that the docker image needs to be run at a higher level of 
> privilege to allow for that mounting, which is not possible using App 
> Engine Flex.
>
> Is there a specific reason you want to mount a GCS bucket onto an App 
> Engine instance? You should have no trouble accessing it using the client 
> libraries.
>
> On Tuesday, September 26, 2017 at 9:05:17 AM UTC-4, gu...@genotek.ru 
>  wrote:
>>
>> I am running a gcsfuse mount command in a startup script in my custom 
>> runtime docker, which fails with 
>>
>> Mounting file system...
>>
>> Using mount point: /var/www/html/mount-point
>> Opening GCS connection...
>> Opening bucket...
>>
>> daemonize.Run: readFromProcess: sub-process: mountWithArgs: mountWithConn: 
>> Mount: mount: running fusermount: exit status 1
>> stderr:
>> fusermount: failed to open /dev/fuse: Operation not permitted
>>
>>
>> however, ssh-ing into instance and executing the same script manually works. 
>> Manual startup is not acceptable since the instances are brought up and down 
>> by google at will.
>>
>>
>> Has anybody solved this problem?
>>
>>
>>
>>
>> This is my script:
>>
>>
>> export GOOGLE_APPLICATION_CREDENTIALS=/etc/gcloud/service-account.json
>> while :doFILE=""DIR="/var/www/html/mount-point"# init# look for 
>> empty dirif [ "$(ls -A $DIR)" ]; then echo "$DIR is mounted. Exit." 
>> breakelseecho "$DIR is not mounted. Trying to mount"gcsfuse -o rw -o 
>> allow_other --implicit-dirs --dir-mode 777 --file-mode 777 bucket_id 
>> /var/www/html/mount-pointweb/imgfisleep 10echo "Press [CTRL+C] 
>> to stop.."done
>>  Thanks.
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/c513a302-ad39-4711-bfa6-e7fb65f0e395%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: gcsfuse does not mount google storage bucket on startup, but does when called manually: GAE, flexible environment, custom runtime

2017-09-26 Thread 'Yannick (Cloud Platform Support)' via Google App Engine
I believe that the docker image needs to be run at a higher level of 
privilege to allow for that mounting, which is not possible using App 
Engine Flex.

Is there a specific reason you want to mount a GCS bucket onto an App 
Engine instance? You should have no trouble accessing it using the client 
libraries.

On Tuesday, September 26, 2017 at 9:05:17 AM UTC-4, gu...@genotek.ru wrote:
>
> I am running a gcsfuse mount command in a startup script in my custom 
> runtime docker, which fails with 
>
> Mounting file system...
>
> Using mount point: /var/www/html/mount-point
> Opening GCS connection...
> Opening bucket...
>
> daemonize.Run: readFromProcess: sub-process: mountWithArgs: mountWithConn: 
> Mount: mount: running fusermount: exit status 1
> stderr:
> fusermount: failed to open /dev/fuse: Operation not permitted
>
>
> however, ssh-ing into instance and executing the same script manually works. 
> Manual startup is not acceptable since the instances are brought up and down 
> by google at will.
>
>
> Has anybody solved this problem?
>
>
>
>
> This is my script:
>
>
> export GOOGLE_APPLICATION_CREDENTIALS=/etc/gcloud/service-account.json
> while :doFILE=""DIR="/var/www/html/mount-point"# init# look for empty 
> dirif [ "$(ls -A $DIR)" ]; then echo "$DIR is mounted. Exit." 
> breakelseecho "$DIR is not mounted. Trying to mount"gcsfuse -o rw -o 
> allow_other --implicit-dirs --dir-mode 777 --file-mode 777 bucket_id 
> /var/www/html/mount-pointweb/imgfisleep 10echo "Press [CTRL+C] to 
> stop.."done
>  Thanks.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/bbec9226-1015-431f-868d-e6ade54890d3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: Google App Engine, Nodejs, 502 Bad Gateway

2017-09-26 Thread 'Jordan (Cloud Platform Support)' via Google App Engine
You are very correct, as described in the previously linked Stack Exchange 
answer,  
nginx
 
health checks are indeed the same health checks that are configurable via 
your app.yaml file 
.
 
 

To clarify, each App Engine instance has its own nginx container running in 
it that monitors the health of its own instance. So starting more instances 
will not fix the issue for any single instance. As mentioned in the 
solutions provided in the previously linked Public Issue Tracker 
, you could instead try 
increasing your instances' Resource Settings 

 to 
make them more powerful. By increasing an instance's CPU, you are allowing 
your application code to finish faster, and in turn allow it to respond to 
nginx faster. 

Though as mentioned in the same Public Issue Tracker this is not the actual 
solution, and the solution is to code your application to handle async 
requests 
. By 
allowing a single instance to handle more than one request at a time, you 
are freeing up CPU time for health checks. Of course you can always 
completely turn off the nginx health checks 
,
 
but ideally you want to code your application for the Cloud to make it 
scalable and responsive. 

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/4ac15881-d3bd-49e3-a064-04be88bdc071%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] gcsfuse does not mount google storage bucket on startup, but does when called manually: GAE, flexible environment, custom runtime

2017-09-26 Thread gusev
I am running a gcsfuse mount command in a startup script in my custom 
runtime docker, which fails with 

Mounting file system...

Using mount point: /var/www/html/mount-point
Opening GCS connection...
Opening bucket...

daemonize.Run: readFromProcess: sub-process: mountWithArgs: mountWithConn: 
Mount: mount: running fusermount: exit status 1
stderr:
fusermount: failed to open /dev/fuse: Operation not permitted


however, ssh-ing into instance and executing the same script manually works. 
Manual startup is not acceptable since the instances are brought up and down by 
google at will.


Has anybody solved this problem?




This is my script:


export GOOGLE_APPLICATION_CREDENTIALS=/etc/gcloud/service-account.json
while :doFILE=""DIR="/var/www/html/mount-point"# init# look for empty 
dirif [ "$(ls -A $DIR)" ]; then echo "$DIR is mounted. Exit." breakelse 
   echo "$DIR is not mounted. Trying to mount"gcsfuse -o rw -o allow_other 
--implicit-dirs --dir-mode 777 --file-mode 777 bucket_id 
/var/www/html/mount-pointweb/imgfisleep 10echo "Press [CTRL+C] to 
stop.."done
 Thanks.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/068bfa73-544b-43fc-a175-3653b0e7b233%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: Google App Engine, Nodejs, 502 Bad Gateway

2017-09-26 Thread Marco Galassi
Attaching a graphic description or current backend.


On Monday, September 25, 2017 at 10:00:13 AM UTC+2, Marco Galassi wrote:
>
> We are performing a migration to a new backend hosted on Google App Engine 
> and based on Node.js.
>
> Before performing the switch from the old to the new backend, we need to 
> do tests and see if packets that the legacy server receives are correctly
> processed by the new backend.
>
> So, on the old backend, we have modified the handler to "duplicate the 
> request" and both proceed with the regular processing and forward to out 
> new backend.
> In this way, we are able to keep the legacy system up and at the same time 
> replicate the requests on our new backend.
>
> We want to slow down the legacy server as little as possible, so what we 
> do is we do not wait for a response on the legacy server.
>
> Instead, on Google App Engine, we have deployed  a second service (to 
> *[our-proxy-service]-dot-[our-project].appspot.com 
> *) in out project that acts as a proxy and forwards 
> the requests to the new backend. 
> We have use node-http-proxy  
> package 
> to implement the proxy, and we made it redirect to out backend URL: 
> *[our-backend-service]-dot-[our-project].appspot.com 
> *
>
> The proxy also gets the responses so we are able to track the process.
>
> *The first question we have is whether this is a good solution with GAE,*
> *and if it is a valid use case to redirect the requests from a service to 
> another service in that way, or if there is a better way.*
>
> Here is a MSPaint version of our backend structure:
>
>
> 
>
>
> This brings us to the second problem: this structure actually seems to 
> work, but every once in a while (no pattern discovered yet, seems random) 
> the proxy gets a 502 Bad Gateway response from the backend.
> We investigated a little on the Stackdriver Logs on the backend side, and 
> we ended up finding this log filtering for *nginx.error:*
>
> 07:11:15.000 [error] 32#32: *84209 upstream prematurely closed connection 
> while reading response header from upstream, client: 130.211.1.151, server: , 
> request: "POST /collect HTTP/1.1", upstream: 
> "http://172.17.0.1:8080/collect;, host: "[ourprojectid].appspot.com"
>
>
> We have also posted on Stackoverflow 
> ,
>  
> in case someone wants to read it.
>
> We have any other ideas where to go from here.
> Any help or hint or suggestion is very welcome.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/27288f13-c258-40c4-bb0c-c84ee9e7cc51%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.