dsunj08246 2019-02-02 04:57
浏览 553
已采纳

AppEngine - 客户端关闭keepalive连接

I have deployed my Symfony 4 app to Google App Engine (Flexible environment).

The build seems to have worked, but loading the app on in Chrome results in error:

Oops! An Error Occurred
The server returned a "500 Internal Server Error".
Something is broken. Please let us know what you were doing when this error occurred. We will fix it as soon as possible. Sorry for any inconvenience caused.

The app engine log is here:

 2019/02/02 04:33:13 [info] 9#9: *6 client 172.17.0.4 closed keepalive connection
 A 
 GET 404 191 B 0 ms Chrome 71 /favicon.ico A  GET 404 191 B 0 ms Chrome 71
 GET 500 930 B 6 ms Chrome 71 /connect/google A  GET 500 930 B 6 ms Chrome 71
 GET 307 316 B 6 ms Chrome 71 / A  GET 307 316 B 6 ms Chrome 71
 172.17.0.4 - - [02/Feb/2019:04:32:13 +0000] "GET /connect/google HTTP/1.1" 500 930 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36"
 A 
 172.17.0.4 - - [02/Feb/2019:04:32:13 +0000] "GET / HTTP/1.1" 307 316 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36"
 A 
 2019/02/02 04:29:08 [info] 9#9: *1 client 172.17.0.4 closed keepalive connection
 A 
 GET 500 930 B 6 ms Chrome 71 /connect/google A  GET 500 930 B 6 ms Chrome 71
 GET 307 316 B 5 ms Chrome 71 / A  GET 307 316 B 5 ms Chrome 71
 172.17.0.4 - - [02/Feb/2019:04:28:08 +0000] "GET /connect/google HTTP/1.1" 500 930 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36"
 A 
 172.17.0.4 - - [02/Feb/2019:04:28:08 +0000] "GET / HTTP/1.1" 307 316 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36"
 A 
 GET 404 191 B 10 ms Chrome 71 /favicon.ico A  GET 404 191 B 10 ms Chrome 71
 GET 500 930 B 207 ms Chrome 71 /connect/google A  GET 500 930 B 207 ms Chrome 71
 172.17.0.4 - - [02/Feb/2019:04:27:50 +0000] "GET /connect/google HTTP/1.1" 500 930 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36"
 A 
 GET 307 316 B 271 ms Chrome 71 / A  GET 307 316 B 271 ms Chrome 71
 172.17.0.4 - - [02/Feb/2019:04:27:49 +0000] "GET / HTTP/1.1" 307 316 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36"
 A 
A  2019-02-02 03:22:43,817 INFO success: nginx entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)

A  2019-02-02 03:22:43,817 INFO success: php-fpm entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)

A  [02-Feb-2019 03:22:42] NOTICE: ready to handle connections

A  [02-Feb-2019 03:22:42] NOTICE: fpm is running, pid 7

A  2019/02/02 03:22:42 [notice] 8#8: start worker process 9

A  2019/02/02 03:22:42 [notice] 8#8: start worker processes

A  2019/02/02 03:22:42 [notice] 8#8: getrlimit(RLIMIT_NOFILE): 65536:65536

A  2019/02/02 03:22:42 [notice] 8#8: OS: Linux 4.9.0-8-amd64

A  2019/02/02 03:22:42 [notice] 8#8: nginx/1.10.3 (Ubuntu)

A  2019/02/02 03:22:42 [notice] 8#8: using the "epoll" event method

A  2019-02-02 03:22:42,339 INFO spawned: 'nginx' with pid 8

A  2019-02-02 03:22:42,338 INFO spawned: 'php-fpm' with pid 7

A  2019-02-02 03:22:41,335 INFO supervisord started with pid 1

A  2019-02-02 03:22:41,329 WARN No file matches via include "/etc/supervisor/conf.d/*.conf"

A  2019-02-02 03:22:41,329 CRIT Supervisor running as root (no user in config file)

I don't understand this error. How can I resolve?

  • 写回答

1条回答 默认 最新

  • dounao5856 2019-02-08 11:44
    关注

    Symfony writes its errors to var/log as opposed to stdout (you can configure this), but it means you need to ssh into the instance and read the var/log/prod.log to get more detailed information out about what caused the 500 error. This doc explains how:

    https://cloud.google.com/appengine/docs/flexible/php/debugging-an-instance

    In this case the log was:

    [2019-02-03 09:23:41] request.CRITICAL: Uncaught PHP Exception Symfony\Component\DependencyInjection\Exception\EnvNotFoundException: "Environment variable not found: "OAUTH_GOOGLE_CLIENT_ID"." at /app/vendor/symfony/dependency-injection/EnvVarPr
    ocessor.php line 96 {"exception":"[object] (Symfony\\Component\\DependencyInjection\\Exception\\EnvNotFoundException(code: 0): Environment variable not found: \"OAUTH_GOOGLE_CLIENT_ID\". at /app/vendor/symfony/dependency-injection/EnvVarProcesso
    r.php:96)"} []
    

    Once you get the error message its easy to see what went wrong, it looks like the OAUTH_GOOGLE_CLIENT_ID environmental has not been configured.

    env_variables:
        APP_ENV: "prod"
        APP_SECRET: 
        OAUTH_GOOGLE_CLIENT_ID: 
        OAUTH_GOOGLE_CLIENT_SECRET: 
    

    Make sure these are set in the app.yaml (don't commit to git though for security/best practice, you could commit them blank though for information)

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 基于卷积神经网络的声纹识别
  • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
  • ¥100 为什么这个恒流源电路不能恒流?
  • ¥15 有偿求跨组件数据流路径图
  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP
  • ¥15 Python turtle 画图
  • ¥15 stm32开发clion时遇到的编译问题