Google app engine - Server response 503 code - google-app-engine

It worked well last week. But started from this week, some instance response 503 failure. Tried to deploy it again, sometimes fixed the issue but after 1 day broken again with 503 failure. Don't know how to debug the issue. The code is the same and it worked before.
It is running in GAE standard.
Update the log after changed the log permission:
2018-07-09 09:53:09.000 CDT
Info: Limiting Java heap size to: 2563M
2018-07-09 09:53:09.000 CDT
2018-07-09 14:53:09.670:INFO::main: Logging initialized #412ms
2018-07-09 09:53:11.000 CDT
2018-07-09 14:53:11.111:INFO:oejs.Server:main: jetty-9.3.5.v20151012
2018-07-09 09:53:11.000 CDT
2018-07-09 14:53:11.204:INFO:oejs.AbstractNCSARequestLog:main: Opened /var/log/app_engine/request.2018_07_09.log
2018-07-09 09:53:13.000 CDT
Warning: caught exception when reading logging properties.
2018-07-09 09:53:13.000 CDT
java.io.FileNotFoundException: WEB-INF/logging.properties (No such file or directory)
2018-07-09 09:53:26.000 CDT
2018-07-09 14:53:26.917:WARN:oeja.AnnotationConfiguration:main: ServletContainerInitializers: detected. Class hierarchy: empty
2018-07-09 09:53:27.000 CDT
2018-07-09 14:53:27.338:INFO:oejsh.ContextHandler:main: Started c.g.a.v.j.VmRuntimeWebAppContext#fad74ee{/,file:///var/lib/jetty/webapps/root/,AVAILABLE}
2018-07-09 09:53:27.000 CDT
2018-07-09 14:53:27.388:INFO:oejs.ServerConnector:main: Started ServerConnector#1697a57c{HTTP/1.1,[http/1.1]}{0.0.0.0:8080}
2018-07-09 09:53:27.000 CDT
2018-07-09 14:53:27.392:INFO:oejs.Server:main: Started #18134ms
2018-07-09 09:54:55.000 CDT
Jul 09, 2018 2:54:55 PM com.google.apphosting.vmruntime.jetty9.VmRuntimeWebAppContext doScope
2018-07-09 09:54:55.000 CDT
WARNING: Response for request to '/_ah/start' was already committed (code=302). This might result in lost log messages.'
2018-07-09 09:54:55.472 CDT
GET
302
0 B
67 ms
curl/7.52.1
/_ah/start
2018-07-09 09:55:59.000 CDT
Jul 09, 2018 2:55:59 PM com.google.apphosting.utils.servlet.VmStopFilter doFilter
2018-07-09 09:55:59.000 CDT
INFO: Running shutdown hook
2018-07-09 09:55:59.000 CDT
Jul 09, 2018 2:55:59 PM com.google.apphosting.vmruntime.VmAppLogsWriter waitForCurrentFlush
2018-07-09 09:55:59.000 CDT
INFO: End of request or previous flush has not yet completed, blocking.
2018-07-09 09:56:02.000 CDT
Jul 09, 2018 2:56:02 PM com.google.apphosting.vmruntime.VmApiProxyDelegate runSyncCall
2018-07-09 09:56:02.000 CDT
INFO: Error body: RPC Error: /StubbyService.Send to (unknown) : APP_ERROR(2)
2018-07-09 09:56:02.000 CDT
Jul 09, 2018 2:56:02 PM com.google.apphosting.vmruntime.VmAppLogsWriter waitForCurrentFlush
2018-07-09 09:56:02.000 CDT
WARNING: A log flush request failed. Log messages may have been lost!
2018-07-09 09:56:02.000 CDT
java.util.concurrent.ExecutionException: com.google.apphosting.api.ApiProxy$RPCFailedException: The remote RPC to the application server failed for the call logservice.Flush(). at java.util.concurrent.FutureTask.report(FutureTask.java:122) at java.util.concurrent.FutureTask.get(FutureTask.java:206) at com.google.apphosting.vmruntime.VmAppLogsWriter.waitForCurrentFlush(VmAppLogsWriter.java:226) at com.google.apphosting.vmruntime.VmAppLogsWriter.flushAndWait(VmAppLogsWriter.java:211) at com.google.apphosting.vmruntime.VmApiProxyEnvironment.flushLogs(VmApiProxyEnvironment.java:508) at com.google.apphosting.vmruntime.VmRuntimeUtils.flushLogsAndAddHeader(VmRuntimeUtils.java:109) at com.google.apphosting.vmruntime.jetty9.VmRuntimeWebAppContext.doScope(VmRuntimeWebAppContext.java:323) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213) at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:109) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:119) at org.eclipse.jetty.server.Server.handle(Server.java:517) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:306) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:242) at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:261) at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95) at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:75) at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceAndRun(ExecuteProduceConsume.java:213) at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:147) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:654) at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:572) at java.lang.Thread.run(Thread.java:745) Caused by: com.google.apphosting.api.ApiProxy$RPCFailedException: The remote RPC to the application server failed for the call logservice.Flush(). at com.google.apphosting.vmruntime.VmApiProxyDelegate.runSyncCall(VmApiProxyDelegate.java:175) at com.google.apphosting.vmruntime.VmApiProxyDelegate.makeApiCall(VmApiProxyDelegate.java:155) at com.google.apphosting.vmruntime.VmApiProxyDelegate.access$000(VmApiProxyDelegate.java:75) at com.google.apphosting.vmruntime.VmApiProxyDelegate$MakeSyncCall.call(VmApiProxyDelegate.java:434) at com.google.apphosting.vmruntime.VmApiProxyDelegate$MakeSyncCall.call(VmApiProxyDelegate.java:410) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ... 1 more
2018-07-09 09:56:02.000 CDT
2018-07-09 09:56:02.213 CDT
GET
200
2 B
2.4 s
curl/7.52.1
/_ah/stop
2018-07-09 09:56:03.000 CDT
2018-07-09 14:56:03.226:INFO:oejs.ServerConnector:Thread-1: Stopped ServerConnector#6ef8e973{HTTP/1.1,[http/1.1]}{0.0.0.0:8080}
2018-07-09 09:56:03.000 CDT
2018-07-09 14:56:03.258:INFO:oejsh.ContextHandler:Thread-1: Stopped c.g.a.v.j.VmRuntimeWebAppContext#fad74ee{/,file:///var/lib/jetty/webapps/root/,UNAVAILABLE}
The permission changed:
triage#appspot.gserviceaccount.com App Engine default service account
Editor
Logs Writer
Owner
The interesting thing is it worked well till last week.
503 error shows when I tried to access the website.
2018-07-11 11:16:26.296 CDT
GET
302
0 B
1 ms
Chrome 67
/
144.188.128.2 - - [11/Jul/2018:11:16:26 -0500] "GET / HTTP/1.1" 302 - - "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36" "jira-dot-triage-dash.appspot.com" ms=NaN cpu_ms=0 cpm_usd=0 loading_request=0 instance=- app_engine_release=1.9.54 trace_id=c5f3ef3880f528001e59cf18cd707937
2018-07-11 11:16:27.637 CDT
GET
503
0 B
7 ms
Chrome 67
/
144.188.128.2 - a2003 [11/Jul/2018:11:16:27 -0500] "GET / HTTP/1.1" 503 - - "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36" "triage.appspot.com" ms=NaN cpu_ms=0 cpm_usd=0 loading_request=0 instance=- app_engine_release=1.9.54 trace_id=1ce270202eb79067c9c6020089379b1b

Try giving the roles/logging.logWriter role to your App Engine service account. It seems it can't call logservice.Flush() and it may be because of missing permissions.

Related

Apache2 Error AH00072 Reliably determine the server

i want to create a DB, and i'm used to PHPMYADMIN. I wanted to use PHPMYADMIN
for it, but after i install php, i got this error, any clues?
● apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sun 2023-01-29 00:16:49 UTC; 6min ago
Docs: https://httpd.apache.org/docs/2.4/
Jan 29 00:16:49 ubuntu-4gb-hel1-2 apachectl[260775]: AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
Jan 29 00:16:49 ubuntu-4gb-hel1-2 apachectl[260775]: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80
Jan 29 00:16:49 ubuntu-4gb-hel1-2 apachectl[260775]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
Jan 29 00:16:49 ubuntu-4gb-hel1-2 apachectl[260775]: no listening sockets available, shutting down
Jan 29 00:16:49 ubuntu-4gb-hel1-2 apachectl[260775]: AH00015: Unable to open logs
Jan 29 00:16:49 ubuntu-4gb-hel1-2 apachectl[260772]: Action 'start' failed.
Jan 29 00:16:49 ubuntu-4gb-hel1-2 apachectl[260772]: The Apache error log may have more information.
Jan 29 00:16:49 ubuntu-4gb-hel1-2 systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
Jan 29 00:16:49 ubuntu-4gb-hel1-2 systemd[1]: apache2.service: Failed with result 'exit-code'.
Jan 29 00:16:49 ubuntu-4gb-hel1-2 systemd[1]: Failed to start The Apache HTTP Server.

java.lang.NoSuchMethodError: javax.el.ELContext.notifyBeforeEvaluation(Ljava/lang/String;)V

I'm trying to get JSF 2.2 to run on GAE 1.8.7. I'm following this tutorial: http://java.wildstartech.com/Java-Platform-Enterprise-Edition/JavaServer-Faces/javaserver-faces-22/configuring-jsf-22-to-run-on-the-google-app-engine-using-eclipse
When I run it locally, then the index.jsf page renders well.
However, when I deploy it to GAE, while normal servlets run well, the index.jsf shows a HTTP 505 error with the following in the GAE logs:
2013-11-15 11:23:42.578 /index.jsf 500 533ms 0kb Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.57 Safari/537.36 module=default version=1 W
2013-11-15 11:23:42.573 /index.jsf java.lang.NoSuchMethodError: javax.el.ELContext.notifyBeforeEvaluation(Ljava/lang/String;)V
at com.sun.el.lang.EvaluationContext.notifyBef
2013-11-15 11:23:42.577 Uncaught exception from servlet java.lang.NoSuchMethodError: javax.el.ELContext.notifyBeforeEvaluation(Ljava/lang/String;)V
at com.sun.el.lang.Evalua
I'm using javax-faces.2.2.0.jar and javax-el.3.0.0.jar from maven repository.
If you don't really need the EL 3.x features, then I would suggest moving to a 2.x version and then specifying it in your web.xml file as a context parameter:
<context-param>
<param-name>com.sun.faces.expressionFactory</param-name>
<param-value>com.sun.el.ExpressionFactoryImpl</param-value>
</context-param>
The above declaration will ensure that you are using the EL version that is shipped along with your code and not the one provided by the GAE/J container.
Don't forget to include the EL implementation jar as well in your libraries.
p.s.: If it is of any help, I have a starter template on GitHub that can help you get started.

404 Error while deploying mirror counter example

I am trying to modify the Counter Mirror Example and get it running from my computer.
Instead of just incrementing by 1, I'd like to increment by 10 (trivial, yes but the goal is to get it running) so I changed the the necessary line in handler.py (in /notify) to:
'increment': lambda num: num + 10,
As for the basic glassware setting up:
In the API console I added the counteraugmented.appspot dot com/oauthcallback and localhost/oauthcallback (i cant post localhost or >2 links, sorry)
Glass API is turned on.
Updated client_secret.json with the id, secret and redirect uri's. Triple checked spelling and all instances included https, not http
Updated app.yaml with application name.
ran:
./appcfg --oauth2 update counteraugmented/
output:
08:43 PM Host: appengine.google.com
08:43 PM Application: counteraugmented; version: 1
08:43 PM
Starting update of app: counteraugmented, version: 1
08:43 PM Getting current resource limits.
08:43 PM Scanning files on local disk.
08:43 PM Cloning 13 static files.
08:43 PM Cloning 60 application files.
08:43 PM Compilation starting.
08:43 PM Compilation completed.
08:43 PM Starting deployment.
08:43 PM Checking if deployment succeeded.
08:43 PM Deployment successful.
08:43 PM Checking if updated app version is serving.
08:44 PM Completed update of app: counteraugmented, version: 1
Went to https://counteraugmented.appspot.com/oauth2callback and got a 404 error.
In the API console log:
2013-08-06 20:53:50.500 /oauth2callback 404 14ms 0kb Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.71 Safari/537.36
70.166.86.68 - - [06/Aug/2013:20:53:50 -0700] "GET /oauth2callback HTTP/1.1" 404 188 - "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.71 Safari/537.36" "counteraugmented.appspot.com" ms=15 cpu_ms=0 cpm_usd=0.000021 app_engine_release=1.8.3 instance=00c61b117c0e4f53bedaf5e84288859a16dd0b9e
I successfully got the python quickstart example running, this is my next hurdle.
Any suggestions on how I can go about remedying this would be greatly appreciated. (Obviously new to oauth, stackoverflow and glassdev). Thanks!

404 on starting tomcat server and Tomcat Native Library not found on java library path

So i started a Tomcat webserver in Eclipse in win 32-bit environment. And i get a 404 webapp not found when pointing to localhost:8080/HippoWebApp. The page has some info:
The requested resource (/HippoWebApp/) is not available.
Eclipse console says:
Nov 30, 2012 10:56:49 AM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Java\jdk1.6.0_26-32\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32
What am i doing wrong? I read up on APR and it seems like its harmless warning
File where context path is set in .settings/org.eclipse.wst.common.component
<?xml version="1.0" encoding="UTF-8"?>
<project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="HippoWebApp">
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
<wb-resource deploy-path="/" source-path="/src/main/webapp"/>
<wb-resource deploy-path="/" source-path="/target/CalmsWebContent-war"/>
<dependent-module archiveName="VwCNConfigs-7.3.16.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/VwCNConfigs/VwCNConfigs">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="VwCNAPI-7.3.16.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/VwCNAPI/VwCNAPI">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="VwCNAjaxServices-7.3.16.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/VwCNAjaxServices/VwCNAjaxServices">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="VwCNServices-7.3.16.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/VwCNServices/VwCNServices">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="VwCNCRAReportService-7.3.16.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/VwCNCRAReportService/VwCNCRAReportService">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="Web2VwCN-7.3.16.war" deploy-path="/WEB-INF/lib" handle="module:/resource/Web2VwCN/Web2VwCN">
<dependency-type>uses</dependency-type>
</dependent-module>
<property name="context-root" value="HippoWebApp"/>
<property name="java-output-path" value="/HippoWebApp/target/classes"/>
</wb-module>
</project-modules>
Log when starting server:
Nov 30, 2012 10:56:49 AM org.apache.catalina.core.AprLifecycleListener init INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Java\jdk1.6.0_26-32\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\jrockit_150_12\bin;C:\Java\jdk1.6.0_26-32\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\CA\SharedComponents\ScanEngine;C:\Program Files\CA\SharedComponents\CAUpdate\;C:\Program Files\CA\SharedComponents\ThirdParty\;C:\Program Files\CA\SharedComponents\SubscriptionLicense\;C:\Program Files\CA\eTrustITM;C:\Program Files\TortoiseSVN\bin;C:\Program Files\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files\Perforce;C:\Program Files\Belgium Identity Card;C:\WINDOWS\system32\WindowsPowerShell\v1.0;c:\Program Files\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\;c:\Program Files\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Java\jdk1.6.0_26-23\bin;C:\maven\bin;C:\maven\bin;.
Nov 30, 2012 10:56:50 AM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Nov 30, 2012 10:56:50 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 794 ms
Nov 30, 2012 10:56:50 AM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Nov 30, 2012 10:56:50 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.33
Nov 30, 2012 10:56:50 AM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Nov 30, 2012 10:56:50 AM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Nov 30, 2012 10:56:50 AM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/31 config=null
Nov 30, 2012 10:56:50 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 409 ms
The APR warning is not the cause of the HTTP 404.
Could you post the entire Tomcat startup log? Is the application started correctly? Have you set the context path?
If I'm not mistaken the context path is set in the file org.eclipse.wst.common.component in the .settings folder.

glassfish + jk + large file/strange response

I use a Glassfish-ApplicationServer for a Webapplication. The Glassfish is connected with mod_jk to a Apache2-Server.
Now there is a really strange behavior: Some Parts of the received Files (html, css, js, ...) are missing and there are strange numbers in the Files... If I use the direct access to the Glassfish eth works.
I use Glassfish 3.1.2, mod_jk 1.2.33 and Apache2. The Webapplication uses jsf/Primefaces 3.2.
In the mod_jk log there are strange error Messages. The Messages apear only on the first access to the Webpage.
[Mon Mar 19 13:33:42 2012] [3763:2928831344] [error]ajp_connection_tcp_get_message::jk_ajp_common.c (1280): wrong message format 0x2020 from 127.0.0.1:9009
[Mon Mar 19 13:33:42 2012] [3763:2928831344] [error] ajp_get_reply::jk_ajp_common.c (2145): (ajp13_worker) Tomcat is down or network problems. Part of the response has already been sent to the client
[Mon Mar 19 13:33:42 2012] [3763:2928831344] [info] ajp_service::jk_ajp_common.c (2614): (ajp13_worker) sending request to tomcat failed (recoverable), because of protocol error (attempt=2)
[Mon Mar 19 13:33:42 2012] [3763:2928831344] [error] ajp_service::jk_ajp_common.c (2634): (ajp13_worker) connecting to tomcat failed.
[Mon Mar 19 13:33:42 2012] [3763:2928831344] [info] jk_handler::mod_jk.c (2788): Service error=-11 for worker=ajp13_worker
[Mon Mar 19 13:33:42 2012] ajp13_worker ores.pragma.biz 0.191397
[Mon Mar 19 13:33:42 2012] [3764:2903653232] [error] ajp_connection_tcp_get_message::jk_ajp_common.c (1280): wrong message format 0x6973 from 127.0.0.1:9009
[Mon Mar 19 13:33:42 2012] [3764:2903653232] [error] ajp_get_reply::jk_ajp_common.c (2145): (ajp13_worker) Tomcat is down or network problems. Part of the response has already been sent to the client
[Mon Mar 19 13:33:42 2012] [3764:2903653232] [info] ajp_service::jk_ajp_common.c (2614): (ajp13_worker) sending request to tomcat failed (recoverable), because of protocol error (attempt=2)
[Mon Mar 19 13:33:42 2012] [3764:2903653232] [error] ajp_service::jk_ajp_common.c (2634): (ajp13_worker) connecting to tomcat failed.
[Mon Mar 19 13:33:42 2012] [3764:2903653232] [info] jk_handler::mod_jk.c (2788): Service error=-11 for worker=ajp13_worker
Hope, that anybody can help me.
Try installing GF 3.1.1 and see if that fixes the problem. I read about this bug last week, which might be your problem: http://java.net/jira/browse/GLASSFISH-18446 Looks like there is a patch available on that bug.
This is not exactly an answer, but if by any chance you're using apache and mod_jk only as a proxy to GF (as we did for years) - install nginx, and forget about apache. It's like day and night.
http://wiki.nginx.org/HttpProxyModule

Resources