-
Notifications
You must be signed in to change notification settings - Fork 33
Custom runtime for GAE based on gcr.io/google-appengine/jetty #235
Comments
What happens when you access the application from an external browser? |
Hi Mike,
when I try to access from an external browser it start to load for an infinite time the page, and the loading phase will never finish.
I checked the logs of jetty and the war packages is successfully deployed without any errors.
I have already increased the memory, now the instance is : 4 vCPU and 8 GB.
My app.yaml files contains this:
resources:
cpu: 4
memory_gb: 8
disk_size_gb: 10
What do you suggest?
Thanks a lot in advance for your help,
Best Regards
riccardo
|
What does the request log / nginx log show? I would check all of the logs in the Log Viewer for the app. |
Hi,
I got this: (I’m not very expert about ngnix , are you able to understand some from the log below provided? )
37.186.209.186 - "GET /" 499 undefined "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.87 Safari/537.36"
Espandi tutto | Comprimi tutto
{
httpRequest: {
latency: "150.154s"
referer: "-"
remoteIp: "37.186.209.186"
requestMethod: "GET"
requestUrl: "/"
status: 499
userAgent: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.87 Safari/537.36"
}
insertId: "1qzqsj8g21rkgnq"
jsonPayload: {
appLatencySeconds: "-"
httpRequest: {
protocol: "HTTP/1.1"
}
latencySeconds: "150.154"
trace: "71d7c802d4966192fdef550b04a93f8a"
}
labels: {
appengine.googleapis.com/instance_name: "aef-wimem-1-jm88"
appengine.googleapis.com/trace_id: "71d7c802d4966192fdef550b04a93f8a"
compute.googleapis.com/resource_id: "7006002908047422042"
compute.googleapis.com/resource_name: "17917f325bb4"
compute.googleapis.com/zone: "europe-west3-a"
}
logName: "projects/rdolce-gcp-test/logs/appengine.googleapis.com%2Fnginx.request"
receiveTimestamp: "2018-06-19T14:27:13.285421512Z"
resource: {
labels: {
module_id: "wimem"
project_id: "rdolce-gcp-test"
version_id: "1"
}
type: "gae_app"
}
timestamp: "2018-06-19T14:27:10.320Z"
}
Thanks
riccardo
Da: Mike Eltsufin [mailto:notifications@github.com]
Inviato: martedì 19 giugno 2018 16:22
A: GoogleCloudPlatform/jetty-runtime
Cc: Riccardo Dolce; Author
Oggetto: Re: [GoogleCloudPlatform/jetty-runtime] Custom runtime for GAE based on gcr.io/google-appengine/jetty (#235)
What does the request log / nginx log show? I would check all of the logs in the Log Viewer for the app.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#235 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AmhiGBNkX44yXiS6QZd6FvMXgsDOPNsdks5t-QkBgaJpZM4UtlBa>.
…______________________________________________________________________________________________________________________
Questo messaggio ed i suoi allegati sono indirizzati esclusivamente alle persone indicate. La diffusione, copia o qualsiasi altra azione derivante dalla conoscenza di queste informazioni sono rigorosamente vietate. Qualora abbiate ricevuto questo documento per errore siete cortesemente pregati di darne immediata comunicazione al mittente e di provvedere alla sua distruzione, Grazie.
This e-mail and any attachment are confidential and may contain privileged information intended for the addressee(s) only. Dissemination, copying, printing or use by anybody else is unauthorized. If you are not the intended recipient, please delete this message and any attachment and notify the sender by returning it, Thanks.
|
According to my understanding ngnix is meeting the same issue I discovered while trying to connect on port 8080 from the instance to jetty ( that is inside the docker ). |
It looks like the application is not responding, and the browser closed the connection after 150.154s causing the 499 HTTP code. Since you also cannot connect to the app from inside the docker container, I suspect there's something wrong with the app container itself. Maybe some problem with Jetty + your code. |
I have already built my custom runtime.
The Dockerfile I have attached in the initial post is the one provided to appengine.
This is my yaml file:
########CUSTOM RUNTIME BASE ON JAVA8+JETTY9
service: wimem # Id of the service
env: flex # Flex environment
runtime: custom # Java runtime
#runtime_config:
# jdk: openjdk8 # use OpenJDK 8
# server: jetty9
#handlers:
#- url: /.*
# script: this field is required, but ignored
env_variables:
'SPRING_PROFILES_ACTIVE': 'common,cloud-gae'
network:
name: default
manual_scaling:
instances: 1
resources:
cpu: 4
memory_gb: 8
disk_size_gb: 10
volumes:
- name: ramdisk1
volume_type: tmpfs
size_gb: 0.5
While the custom dockerfile used is:
FROM gcr.io/google-appengine/jetty
ADD wimem-0.0.1-SNAPSHOT.war $JETTY_BASE/webapps/root.war
# Versions
ADD sources.list /etc/apt/sources.list
RUN apt-get update
RUN apt-get -y install curl gnupg
#RUN export CHROME_DRIVER_VERSION=`curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE`
ENV CHROME_DRIVER_VERSION 2.40
ENV SELENIUM_STANDALONE_VERSION 3.4.0
#RUN SELENIUM_SUBDIR=$(echo "$SELENIUM_STANDALONE_VERSION" | cut -d"." -f-2)
ENV SELENIUM_SUBDIR 3.4
# Remove existing downloads and binaries so we can start from scratch.
RUN apt-get remove google-chrome-stable
RUN rm -f ~/selenium-server-standalone-*.jar
RUN rm -f ~/chromedriver_linux64.zip
RUN rm -f /usr/local/bin/chromedriver
RUN rm -f /usr/local/bin/selenium-server-standalone.jar
# Install dependencies.
RUN apt-get update
RUN apt-get install -y unzip openjdk-8-jre-headless xvfb libxi6 libgconf-2-4
# Install Chrome.
RUN curl -sS -o - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add
RUN echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list
RUN apt-get -y update
RUN apt-get -y install google-chrome-stable
# Install ChromeDriver.
RUN wget -N http://chromedriver.storage.googleapis.com/$CHROME_DRIVER_VERSION/chromedriver_linux64.zip -P ~/
RUN unzip ~/chromedriver_linux64.zip -d ~/
RUN rm ~/chromedriver_linux64.zip
RUN mv -f ~/chromedriver /usr/local/bin/chromedriver
RUN chown root:root /usr/local/bin/chromedriver
RUN chmod 0755 /usr/local/bin/chromedriver
# Install Selenium.
RUN wget -N http://selenium-release.storage.googleapis.com/$SELENIUM_SUBDIR/selenium-server-standalone-$SELENIUM_STANDALONE_VERSION.jar -P ~/
RUN mv -f ~/selenium-server-standalone-$SELENIUM_STANDALONE_VERSION.jar /usr/local/bin/selenium-server-standalone.jar
RUN chown root:root /usr/local/bin/selenium-server-standalone.jar
RUN chmod 0755 /usr/local/bin/selenium-server-standalone.jar
Da: Mike Eltsufin [mailto:notifications@github.com]
Inviato: martedì 19 giugno 2018 16:39
A: GoogleCloudPlatform/jetty-runtime
Cc: Riccardo Dolce; Author
Oggetto: Re: [GoogleCloudPlatform/jetty-runtime] Custom runtime for GAE based on gcr.io/google-appengine/jetty (#235)
It looks like the application is not responding, and the browser closed the connection after 150.154s causing the 499 HTTP code. Since you also cannot connect to the app from inside the docker container, I suspect there's something wrong with the app container itself. Maybe some problem with Jetty + your code.
Maybe try runtime: custom and build your own app container, and test it locally.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#235 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AmhiGNZc6AOUHlP2hCJP-Q7ZU1qXGpNRks5t-Q0YgaJpZM4UtlBa>.
…______________________________________________________________________________________________________________________
Questo messaggio ed i suoi allegati sono indirizzati esclusivamente alle persone indicate. La diffusione, copia o qualsiasi altra azione derivante dalla conoscenza di queste informazioni sono rigorosamente vietate. Qualora abbiate ricevuto questo documento per errore siete cortesemente pregati di darne immediata comunicazione al mittente e di provvedere alla sua distruzione, Grazie.
This e-mail and any attachment are confidential and may contain privileged information intended for the addressee(s) only. Dissemination, copying, printing or use by anybody else is unauthorized. If you are not the intended recipient, please delete this message and any attachment and notify the sender by returning it, Thanks.
|
Please consider that I have also tried to build locally the docker in the cloudshell, I run the docker from cloudshell and it works, if I run a simple wget , it works , jetty is managing the request. |
In that case, it doesn't look like a problem with the runtime. As far as the application container is concerned, the requirement is that it exposes port 8080, and the rest is taken care of by the App Engine Flex environment. I would suggest reaching out the Google Cloud support. |
If I build the Docker as a standalone Docker from cloudshel jetty is started and it works, while if I deploy the same Dockerfile in a GAE felxible service jetty is not working and any attempt to establish a connection from inside the docker to localhost 8080 result in a connection that will remain stuck.
Can you please check?
Please find attached the Dockerfile.
`FROM gcr.io/google-appengine/jetty
ADD wimem-0.0.1-SNAPSHOT.war $JETTY_BASE/webapps/root.war
Versions
ADD sources.list /etc/apt/sources.list
RUN apt-get update
RUN apt-get -y install curl gnupg
#RUN export CHROME_DRIVER_VERSION=
curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE
ENV CHROME_DRIVER_VERSION 2.40
ENV SELENIUM_STANDALONE_VERSION 3.4.0
#RUN SELENIUM_SUBDIR=$(echo "$SELENIUM_STANDALONE_VERSION" | cut -d"." -f-2)
ENV SELENIUM_SUBDIR 3.4
Remove existing downloads and binaries so we can start from scratch.
RUN apt-get remove google-chrome-stable
RUN rm -f ~/selenium-server-standalone-*.jar
RUN rm -f ~/chromedriver_linux64.zip
RUN rm -f /usr/local/bin/chromedriver
RUN rm -f /usr/local/bin/selenium-server-standalone.jar
Install dependencies.
RUN apt-get update
RUN apt-get install -y unzip openjdk-8-jre-headless xvfb libxi6 libgconf-2-4
Install Chrome.
RUN curl -sS -o - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add
RUN echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list
RUN apt-get -y update
RUN apt-get -y install google-chrome-stable
Install ChromeDriver.
RUN wget -N http://chromedriver.storage.googleapis.com/$CHROME_DRIVER_VERSION/chromedriver_linux64.zip -P ~/
RUN unzip ~/chromedriver_linux64.zip -d ~/
RUN rm ~/chromedriver_linux64.zip
RUN mv -f ~/chromedriver /usr/local/bin/chromedriver
RUN chown root:root /usr/local/bin/chromedriver
RUN chmod 0755 /usr/local/bin/chromedriver
Install Selenium.
RUN wget -N http://selenium-release.storage.googleapis.com/$SELENIUM_SUBDIR/selenium-server-standalone-$SELENIUM_STANDALONE_VERSION.jar -P ~/
RUN mv -f ~/selenium-server-standalone-$SELENIUM_STANDALONE_VERSION.jar /usr/local/bin/selenium-server-standalone.jar
RUN chown root:root /usr/local/bin/selenium-server-standalone.jar
RUN chmod 0755 /usr/local/bin/selenium-server-standalone.jar
`
The text was updated successfully, but these errors were encountered: