Google AppEngine application 502 Server error - google-app-engine

I created a sample Spring Boot Java application to deploy on Google App Engine flexible environment.
I used ./gradlew jettyrun to run locally and it works.
I was able to deploy to App Engine using ./gradlew appenginedeploy successfully
However, I get an HTTP 502 error when I try to test the REST call.

Related

Swagger plugin issue on GCP - Strapi

I'm using the Swagger plugin for Strapi. It works fine on localhost, but when I deploy to App Engine it fails.
When accessing the /documentation page from the Strapi admin panel on a GCP App Engine (Standard) instance, I am seeing the below errors in GCP logs and Page not found with a 404 error.
error Error: EROFS: read-only file system, open '/workspace/extensions/documentation/public/index.html'
The documentation plugin was installed in my LOCAL development environment and docs compiled before deploying to GCP App Engine. Locally it works fine.
Steps to reproduce the behavior
launch your Strapi project
active the Swagger documentation plugin
request the documentation locally (it will work)
upload the Strapi project to Google App Engine (gcloud command or whatever)
visit the documentation (https://YourGoogleProject.appspot.com/documentation/v1.0.0)
System
Node.js version: v14.17.6
NPM version: 8.1.2
Strapi version: v3.6.8
Database: MongoDB

Firebase Cloud Messaging Can't register service worker when deploy angularjs app war in tomcat 8.0

Hope you can help me, I'm using Firebase Cloud Messaging in my AngularJs app in local enviroment all is ok, but when I generate a war with Gradle (gradle copyTask) and deploy on tomcat 8.0 just get:
"FirebaseError: Messaging: We are unable to register the default service worker. Failed to register a ServiceWorker: A bad HTTP response code (404) was received when fetching the script. (messaging/failed-serviceworker-registration). at http://localhost:8090/test/scripts/vendor.49aa6ce4.js:89:9150"

Google App Engine deploy error: Error scanning entry module-info.class

I'm developing an application and I would like to deploy in Google app engine.
I'm using Eclipse with google cloud plug in.
I'm using JDK 1.8.
When I deploy the application I receive this error:
java.lang.RuntimeException: Error scanning entry module-info.class
from jar
file:///var/lib/jetty/webapps/root/WEB-INF/lib/yasson-1.0.jar

Google App Engine Flex Throws 502 After adding Cloud Endpoints

I have an app running on App Engine Flex (Google Go Runtime with a couple extra file in the docker runtime). It was working fine, with no issues.
I then added Google Cloud Endpoints and all of a sudden I was getting 502s for every request, both going directly to the app & going through Cloud Endpoints.
Logging into the instance, it looks like the nginx-proxy itself is throwing errors.
Downloading Endpoints Service Configuration to /etc/nginx/endpoints/service.json
curl: (22) The requested URL returned error: 403 Forbidden
Failed to obtain Endpoints Service Configuration from Service Management API
/sbin/start-stop-daemon: warning: failed to kill 26: No such process
The only addition to the app.yaml is
endpoints_api_service:
name: "redacted.appspot.com"
config_id: "2017-06-01r0"
I'm running the latest version of gcloud. I was getting 403 forbidden when deploying the openapi.yaml file, and then I updated to the latest gcloud which fixed that issue. Not sure if that's related or not.
Has anyone even encountered this before?
From Cloud Console UI, could you double check if your project has "Google Service Management API" enabled?
If already enabled, you can SSH into your Flex vm, and fetch the access token by:
curl -H "Metadata-Flavor: Google" http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/default/token
Then you can use this URL to check its scopes
https://www.googleapis.com/oauth2/v3/tokeninfo?access_token=
Turns out the core issue was that the version of gcloud I first used to upload google cloud endpoints allowed me to use an unsupported parameter (File). After switching to a wildcard, everything worked.

Can't get the Go Guestbook demo for Google App Engine Managed VM to run locally

I'm following the instructions on this page: https://cloud.google.com/appengine/docs/go/managed-vms/ trying to get the example guestbook demo shown here to work: https://github.com/golang/appengine/tree/master/demos/guestbook
The demo works when deployed, but not when run locally. Running locally gives following error in the browser when hitting localhost:8080: service bridge HTTP failed: Post http://10.0.2.2:41019/rpc_http: dial tcp 10.0.2.2:41019: i/o timeout
The error occurs when trying to access the datastore. The debug statement is DEBUG: Container: f18ca4d19536: 2014/12/31 03:08:22 ERROR: GetAll: service bridge HTTP failed: Post http://10.0.2.2:36788/rpc_http: dial tcp 10.0.2.2:36788: i/o timeout which is generated when the query.GetAll function fails.
Here are the statements I used to prepare to run the guestbook demo:
gcloud config set project <project name>
gcloud components update app
gcloud components update gae-go
goapp get google.golang.org/appengine
gcloud preview app setup-managed-vms
remove the "application: vm-guestbook" line from app.yaml
add "apt-get update" to the generated Dockerfile
gcloud preview app run app.yaml
Any ideas what's wrong? If I deploy the app using gcloud preview app deploy app.yaml it works fine. But I'd really like to figure out how to run Managed VM apps locally.
I should mention that I'm able to run the helloworld demo locally. The difference is the helloworld demo doesn't access the datastore. Also, I'm running on Ubuntu 14.04.
It turns out that your configuration is not currently supported.
We currently require the use of boot2docker and VirtualBox even on Linux.

Resources