Skip to content
This repository has been archived by the owner on Dec 12, 2024. It is now read-only.

Custom runtime for GAE based on gcr.io/google-appengine/jetty #235

Open
rdolce opened this issue Jun 19, 2018 · 9 comments
Open

Custom runtime for GAE based on gcr.io/google-appengine/jetty #235

rdolce opened this issue Jun 19, 2018 · 9 comments

Comments

@rdolce
Copy link

rdolce commented Jun 19, 2018

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
`

@meltsufin
Copy link
Member

What happens when you access the application from an external browser?
One thing to check is whether you have enough memory on the VM.

@rdolce
Copy link
Author

rdolce commented Jun 19, 2018 via email

@meltsufin
Copy link
Member

What does the request log / nginx log show? I would check all of the logs in the Log Viewer for the app.

@rdolce
Copy link
Author

rdolce commented Jun 19, 2018 via email

@rdolce
Copy link
Author

rdolce commented Jun 19, 2018

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 ).
Jetty inside the docker is not responding.

@meltsufin
Copy link
Member

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.

@rdolce
Copy link
Author

rdolce commented Jun 19, 2018 via email

@rdolce
Copy link
Author

rdolce commented Jun 19, 2018

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.

@meltsufin
Copy link
Member

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants