Развертывание приложения flask на Elasti c Beanstalk - ошибка ненулевого состояния - PullRequest
0 голосов
/ 25 апреля 2020

Первый раз пытаюсь развернуть сайт на AWS, поэтому я довольно новичок в этом приключении. Я не могу развернуть свое приложение Flask и веб-страницы. Я пробовал на разных платформах: Python 3,6 работает на 64-битной Amazon Linux успешно собирает. Однако при попытке перейти на страницу с сообщением о root@localhost. возникает внутренняя ошибка сервера. На самом деле я запускаю Python 3.5.3 в виртуальном окружении, где он успешно строится. Когда я пытаюсь развернуть на платформе Python 3.4, работающей на 64-битной Amazon Linux / 2.9.7, я получаю ошибку развертывания, см. Последние 100 строк ниже. Похоже, что-то касается файла require.txt, возвращающего ошибку?

Спасибо за любую помощь, предложенную ... проект колледжа, который должен быть выполнен в течение 24 часов !!! :-) Это будет все!


-------------------------------------
/var/log/httpd/error_log
-------------------------------------
[Sat Apr 25 20:06:42.199402 2020] [suexec:notice] [pid 3137] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Sat Apr 25 20:06:42.216462 2020] [http2:warn] [pid 3137] AH10034: The mpm module (prefork.c) is not supported by mod_http2. The mpm determines how things are processed in your server. HTTP/2 has more demands in this regard and the currently selected mpm will just not do. This is an advisory warning. Your server will continue to work, but the HTTP/2 protocol will be inactive.
[Sat Apr 25 20:06:42.216482 2020] [http2:warn] [pid 3137] AH02951: mod_ssl does not seem to be enabled
[Sat Apr 25 20:06:42.216953 2020] [lbmethod_heartbeat:notice] [pid 3137] AH02282: No slotmem from mod_heartmonitor
[Sat Apr 25 20:06:42.217010 2020] [:warn] [pid 3137] mod_wsgi: Compiled for Python/3.4.7.
[Sat Apr 25 20:06:42.217014 2020] [:warn] [pid 3137] mod_wsgi: Runtime using Python/3.4.10.
[Sat Apr 25 20:06:42.219194 2020] [mpm_prefork:notice] [pid 3137] AH00163: Apache/2.4.41 (Amazon) mod_wsgi/3.5 Python/3.4.10 configured -- resuming normal operations
[Sat Apr 25 20:06:42.219210 2020] [core:notice] [pid 3137] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'



-------------------------------------
/opt/python/log/supervisord.log
-------------------------------------
2020-04-25 20:06:40,360 CRIT Supervisor running as root (no user in config file)
2020-04-25 20:06:40,376 INFO RPC interface 'supervisor' initialized
2020-04-25 20:06:40,376 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2020-04-25 20:06:40,377 INFO supervisord started with pid 3051
2020-04-25 20:06:41,383 INFO spawned: 'httpd' with pid 3137
2020-04-25 20:06:43,199 INFO success: httpd entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)



-------------------------------------
/var/log/httpd/access_log
-------------------------------------
172.31.6.232 - - [25/Apr/2020:20:09:02 +0000] "GET / HTTP/1.1" 200 161 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36"
172.31.6.232 - - [25/Apr/2020:20:09:03 +0000] "GET /favicon.ico HTTP/1.1" 404 196 "http://testingnew4.eba-5cpsrvmz.eu-west-1.elasticbeanstalk.com/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36"
::1 - - [25/Apr/2020:20:10:07 +0000] "OPTIONS * HTTP/1.0" 200 - "-" "Apache/2.4.41 (Amazon) mod_wsgi/3.5 Python/3.4.10 (internal dummy connection)"
::1 - - [25/Apr/2020:20:10:17 +0000] "OPTIONS * HTTP/1.0" 200 - "-" "Apache/2.4.41 (Amazon) mod_wsgi/3.5 Python/3.4.10 (internal dummy connection)"



-------------------------------------
/var/log/eb-activity.log
-------------------------------------
    inflating: /opt/python/ondeck/app/virt/bin/activate_this.py  
    inflating: /opt/python/ondeck/app/virt/bin/rst2html5.py  
    inflating: /opt/python/ondeck/app/virt/bin/aws  
    inflating: /opt/python/ondeck/app/virt/bin/aws_completer  
    inflating: /opt/python/ondeck/app/virt/bin/rst2xml.py  
    inflating: /opt/python/ondeck/app/virt/bin/rst2pseudoxml.py  
    inflating: /opt/python/ondeck/app/virt/bin/aws_zsh_completer.sh  
    inflating: /opt/python/ondeck/app/virt/bin/miniterm.pyc  
    inflating: /opt/python/ondeck/app/virt/bin/pyrsa-encrypt  
    inflating: /opt/python/ondeck/app/virt/bin/aws.cmd  
    inflating: /opt/python/ondeck/app/virt/bin/pyrsa-decrypt  
    inflating: /opt/python/ondeck/app/virt/bin/easy_install-3.5  
    inflating: /opt/python/ondeck/app/virt/bin/rst2odt_prepstyles.py  
    inflating: /opt/python/ondeck/app/virt/bin/flask  
    inflating: /opt/python/ondeck/app/virt/bin/rst2latex.py  
    inflating: /opt/python/ondeck/app/virt/bin/activate.fish  
    inflating: /opt/python/ondeck/app/virt/bin/docker-compose  
    inflating: /opt/python/ondeck/app/virt/bin/rst2html4.py  
    inflating: /opt/python/ondeck/app/virt/bin/pasteurize  
    inflating: /opt/python/ondeck/app/virt/bin/eb  
    inflating: /opt/python/ondeck/app/virt/bin/wheel-3.5  
    inflating: /opt/python/ondeck/app/virt/bin/activate.xsh  
    inflating: /opt/python/ondeck/app/virt/bin/pip3  
    inflating: /opt/python/ondeck/app/virt/bin/pyrsa-sign  
     creating: /opt/python/ondeck/app/virt/bin/__pycache__/
    inflating: /opt/python/ondeck/app/virt/bin/__pycache__/rst2latex.cpython-35.pyc  
    inflating: /opt/python/ondeck/app/virt/bin/__pycache__/rst2html4.cpython-35.pyc  
    inflating: /opt/python/ondeck/app/virt/bin/__pycache__/rst2html5.cpython-35.pyc  
    inflating: /opt/python/ondeck/app/virt/bin/__pycache__/rst2odt.cpython-35.pyc  
    inflating: /opt/python/ondeck/app/virt/bin/__pycache__/jp.cpython-35.pyc  
    inflating: /opt/python/ondeck/app/virt/bin/__pycache__/rst2pseudoxml.cpython-35.pyc  
    inflating: /opt/python/ondeck/app/virt/bin/__pycache__/rst2man.cpython-35.pyc  
    inflating: /opt/python/ondeck/app/virt/bin/__pycache__/rstpep2html.cpython-35.pyc  
    inflating: /opt/python/ondeck/app/virt/bin/__pycache__/rst2html.cpython-35.pyc  
    inflating: /opt/python/ondeck/app/virt/bin/__pycache__/rst2s5.cpython-35.pyc  
    inflating: /opt/python/ondeck/app/virt/bin/__pycache__/rst2odt_prepstyles.cpython-35.pyc  
    inflating: /opt/python/ondeck/app/virt/bin/__pycache__/rst2xetex.cpython-35.pyc  
    inflating: /opt/python/ondeck/app/virt/bin/__pycache__/miniterm.cpython-35.pyc  
    inflating: /opt/python/ondeck/app/virt/bin/__pycache__/rst2xml.cpython-35.pyc  
    inflating: /opt/python/ondeck/app/virt/bin/__pycache__/wsdump.cpython-35.pyc  
  finishing deferred symbolic links:
    /opt/python/ondeck/app/virt1/bin/python3.5 -> python
    /opt/python/ondeck/app/virt1/bin/python -> /usr/bin/python3
    /opt/python/ondeck/app/virt1/bin/python3 -> python
    /opt/python/ondeck/app/virt/bin/python3.5 -> python
    /opt/python/ondeck/app/virt/bin/python -> /usr/bin/python3
    /opt/python/ondeck/app/virt/bin/python3 -> python
[2020-04-25T20:07:02.850Z] INFO  [3191]  - [Application deployment app-200425_210437@1/StartupStage0/AppDeployPreHook/03deploy.py] : Starting activity...
[2020-04-25T20:07:06.899Z] INFO  [3191]  - [Application deployment app-200425_210437@1/StartupStage0/AppDeployPreHook/03deploy.py] : Activity execution failed, because: Collecting AWSIoTPythonSDK==1.4.8 (from -r /opt/python/ondeck/app/requirements.txt (line 1))
    Downloading https://files.pythonhosted.org/packages/79/f4/a8e386cad19edd0de41326c71e5d9d47c32ee0f3efe615fbd9c5c9197c8f/AWSIoTPythonSDK-1.4.8.tar.gz (80kB)
  Collecting boto3==1.12.46 (from -r /opt/python/ondeck/app/requirements.txt (line 2))
    Downloading https://files.pythonhosted.org/packages/8c/b9/d9da1f57c0535afacbdf20f3f0ce0c6cdae1b8adab0fd48459c6d72222e5/boto3-1.12.46-py2.py3-none-any.whl (128kB)
  Collecting botocore==1.15.46 (from -r /opt/python/ondeck/app/requirements.txt (line 3))
    Downloading https://files.pythonhosted.org/packages/6c/21/d015b86c8fa291f78e8fe7d7cf0a60645989efa5db5e8302e2b7ccf9539a/botocore-1.15.46-py2.py3-none-any.whl (6.1MB)
  Collecting click==7.1.1 (from -r /opt/python/ondeck/app/requirements.txt (line 4))
    Could not find a version that satisfies the requirement click==7.1.1 (from -r /opt/python/ondeck/app/requirements.txt (line 4)) (from versions: 0.1, 0.2, 0.3, 0.4, 0.5, 0.5.1, 0.6, 0.7, 1.0, 1.1, 2.0, 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 3.0, 3.1, 3.2, 3.3, 4.0, 4.1, 5.0, 5.1, 6.0, 6.1, 6.2, 6.3, 6.4, 6.5, 6.6, 6.7.dev0, 6.7, 7.0)
  No matching distribution found for click==7.1.1 (from -r /opt/python/ondeck/app/requirements.txt (line 4))
  You are using pip version 9.0.1, however version 20.0.2 is available.
  You should consider upgrading via the 'pip install --upgrade pip' command.
  2020-04-25 20:07:06,891 ERROR    Error installing dependencies: Command '/opt/python/run/venv/bin/pip install -r /opt/python/ondeck/app/requirements.txt' returned non-zero exit status 1
  Traceback (most recent call last):
    File "/opt/elasticbeanstalk/hooks/appdeploy/pre/03deploy.py", line 22, in main
      install_dependencies()
    File "/opt/elasticbeanstalk/hooks/appdeploy/pre/03deploy.py", line 18, in install_dependencies
      check_call('%s install -r %s' % (os.path.join(APP_VIRTUAL_ENV, 'bin', 'pip'), requirements_file), shell=True)
    File "/usr/lib64/python2.7/subprocess.py", line 190, in check_call
      raise CalledProcessError(retcode, cmd)
  CalledProcessError: Command '/opt/python/run/venv/bin/pip install -r /opt/python/ondeck/app/requirements.txt' returned non-zero exit status 1 (ElasticBeanstalk::ExternalInvocationError)
caused by: Collecting AWSIoTPythonSDK==1.4.8 (from -r /opt/python/ondeck/app/requirements.txt (line 1))
    Downloading https://files.pythonhosted.org/packages/79/f4/a8e386cad19edd0de41326c71e5d9d47c32ee0f3efe615fbd9c5c9197c8f/AWSIoTPythonSDK-1.4.8.tar.gz (80kB)
  Collecting boto3==1.12.46 (from -r /opt/python/ondeck/app/requirements.txt (line 2))
    Downloading https://files.pythonhosted.org/packages/8c/b9/d9da1f57c0535afacbdf20f3f0ce0c6cdae1b8adab0fd48459c6d72222e5/boto3-1.12.46-py2.py3-none-any.whl (128kB)
  Collecting botocore==1.15.46 (from -r /opt/python/ondeck/app/requirements.txt (line 3))
    Downloading https://files.pythonhosted.org/packages/6c/21/d015b86c8fa291f78e8fe7d7cf0a60645989efa5db5e8302e2b7ccf9539a/botocore-1.15.46-py2.py3-none-any.whl (6.1MB)
  Collecting click==7.1.1 (from -r /opt/python/ondeck/app/requirements.txt (line 4))
    Could not find a version that satisfies the requirement click==7.1.1 (from -r /opt/python/ondeck/app/requirements.txt (line 4)) (from versions: 0.1, 0.2, 0.3, 0.4, 0.5, 0.5.1, 0.6, 0.7, 1.0, 1.1, 2.0, 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 3.0, 3.1, 3.2, 3.3, 4.0, 4.1, 5.0, 5.1, 6.0, 6.1, 6.2, 6.3, 6.4, 6.5, 6.6, 6.7.dev0, 6.7, 7.0)
  No matching distribution found for click==7.1.1 (from -r /opt/python/ondeck/app/requirements.txt (line 4))
  You are using pip version 9.0.1, however version 20.0.2 is available.
  You should consider upgrading via the 'pip install --upgrade pip' command.
  2020-04-25 20:07:06,891 ERROR    Error installing dependencies: Command '/opt/python/run/venv/bin/pip install -r /opt/python/ondeck/app/requirements.txt' returned non-zero exit status 1
  Traceback (most recent call last):
    File "/opt/elasticbeanstalk/hooks/appdeploy/pre/03deploy.py", line 22, in main
      install_dependencies()
    File "/opt/elasticbeanstalk/hooks/appdeploy/pre/03deploy.py", line 18, in install_dependencies
      check_call('%s install -r %s' % (os.path.join(APP_VIRTUAL_ENV, 'bin', 'pip'), requirements_file), shell=True)
    File "/usr/lib64/python2.7/subprocess.py", line 190, in check_call
      raise CalledProcessError(retcode, cmd)
  CalledProcessError: Command '/opt/python/run/venv/bin/pip install -r /opt/python/ondeck/app/requirements.txt' returned non-zero exit status 1 (Executor::NonZeroExitStatus)


[2020-04-25T20:07:06.899Z] INFO  [3191]  - [Application deployment app-200425_210437@1/StartupStage0/AppDeployPreHook/03deploy.py] : Activity failed.
[2020-04-25T20:07:06.899Z] INFO  [3191]  - [Application deployment app-200425_210437@1/StartupStage0/AppDeployPreHook] : Activity failed.
[2020-04-25T20:07:06.899Z] INFO  [3191]  - [Application deployment app-200425_210437@1/StartupStage0] : Activity failed.
[2020-04-25T20:07:06.899Z] INFO  [3191]  - [Application deployment app-200425_210437@1] : Completed activity. Result:
  Application deployment - Command CMD-Startup failed
[2020-04-25T20:15:25.272Z] INFO  [3578]  - [CMD-TailLogs] : Starting activity...
[2020-04-25T20:15:25.272Z] INFO  [3578]  - [CMD-TailLogs/AddonsBefore] : Starting activity...
[2020-04-25T20:15:25.272Z] INFO  [3578]  - [CMD-TailLogs/AddonsBefore] : Completed activity.
[2020-04-25T20:15:25.272Z] INFO  [3578]  - [CMD-TailLogs/TailLogs] : Starting activity...
[2020-04-25T20:15:25.272Z] INFO  [3578]  - [CMD-TailLogs/TailLogs/TailLogs] : Starting activity...



-------------------------------------
/var/log/eb-commandprocessor.log
-------------------------------------
[2020-04-25T20:06:58.964Z] DEBUG [3191]  : Refreshing metadata...
[2020-04-25T20:06:59.325Z] DEBUG [3191]  : Refreshed environment metadata.
[2020-04-25T20:06:59.326Z] INFO  [3191]  : Recreated directory /opt/elasticbeanstalk/deploy/configuration/.
[2020-04-25T20:06:59.326Z] DEBUG [3191]  : Retrieving metadata for key: AWS::ElasticBeanstalk::Ext||_AppSourceUrlFileContent||url..
[2020-04-25T20:06:59.327Z] INFO  [3191]  : Created appsource url file at /opt/elasticbeanstalk/deploy/configuration/appsourceurl.
[2020-04-25T20:06:59.327Z] DEBUG [3191]  : Retrieving metadata for key: AWS::ElasticBeanstalk::Ext||_ContainerConfigFileContent..
[2020-04-25T20:06:59.328Z] INFO  [3191]  : Created container config file at /opt/elasticbeanstalk/deploy/configuration/containerconfiguration.
[2020-04-25T20:06:59.328Z] DEBUG [3191]  : Retrieving metadata for key: AWS::ElasticBeanstalk::Ext||_ContainerConfigFileContent||commands..
[2020-04-25T20:06:59.329Z] DEBUG [3191]  : Retrieving metadata for key: AWS::ElasticBeanstalk::Ext||_API||_Commands..
[2020-04-25T20:06:59.330Z] INFO  [3191]  : Found enabled addons: ["logpublish", "logstreaming"].
[2020-04-25T20:06:59.331Z] INFO  [3191]  : Updating Command definition of addon logpublish.
[2020-04-25T20:06:59.331Z] INFO  [3191]  : Updating Command definition of addon logstreaming.
[2020-04-25T20:06:59.331Z] DEBUG [3191]  : Loaded definition of Command CMD-Startup.
[2020-04-25T20:06:59.331Z] INFO  [3191]  : Executing Application deployment
[2020-04-25T20:06:59.332Z] INFO  [3191]  : Executing command: CMD-Startup...
[2020-04-25T20:06:59.332Z] INFO  [3191]  : Executing command CMD-Startup activities...
[2020-04-25T20:06:59.332Z] DEBUG [3191]  : Setting environment variables..
[2020-04-25T20:06:59.332Z] INFO  [3191]  : Running AddonsBefore for command CMD-Startup...
[2020-04-25T20:06:59.464Z] DEBUG [3191]  : Running stages of Command CMD-Startup from stage 0 to stage 1...
[2020-04-25T20:06:59.464Z] INFO  [3191]  : Running stage 0 of command CMD-Startup...
[2020-04-25T20:06:59.464Z] INFO  [3191]  : Running leader election...
[2020-04-25T20:06:59.872Z] INFO  [3191]  : Instance is Leader.
[2020-04-25T20:06:59.873Z] DEBUG [3191]  : Loaded 7 actions for stage 0.
[2020-04-25T20:06:59.873Z] INFO  [3191]  : Running 1 of 7 actions: HealthdLogRotation...
[2020-04-25T20:06:59.879Z] INFO  [3191]  : Running 2 of 7 actions: HealthdHTTPDLogging...
[2020-04-25T20:06:59.880Z] INFO  [3191]  : Running 3 of 7 actions: HealthdNginxLogging...
[2020-04-25T20:06:59.880Z] INFO  [3191]  : Running 4 of 7 actions: EbExtensionPreBuild...
[2020-04-25T20:07:00.265Z] INFO  [3191]  : Running 5 of 7 actions: AppDeployPreHook...
[2020-04-25T20:07:06.899Z] ERROR [3191]  : Command execution failed: Activity failed. (ElasticBeanstalk::ActivityFatalError)
caused by: Collecting AWSIoTPythonSDK==1.4.8 (from -r /opt/python/ondeck/app/requirements.txt (line 1))
    Downloading https://files.pythonhosted.org/packages/79/f4/a8e386cad19edd0de41326c71e5d9d47c32ee0f3efe615fbd9c5c9197c8f/AWSIoTPythonSDK-1.4.8.tar.gz (80kB)
  Collecting boto3==1.12.46 (from -r /opt/python/ondeck/app/requirements.txt (line 2))
    Downloading https://files.pythonhosted.org/packages/8c/b9/d9da1f57c0535afacbdf20f3f0ce0c6cdae1b8adab0fd48459c6d72222e5/boto3-1.12.46-py2.py3-none-any.whl (128kB)
  Collecting botocore==1.15.46 (from -r /opt/python/ondeck/app/requirements.txt (line 3))
    Downloading https://files.pythonhosted.org/packages/6c/21/d015b86c8fa291f78e8fe7d7cf0a60645989efa5db5e8302e2b7ccf9539a/botocore-1.15.46-py2.py3-none-any.whl (6.1MB)
  Collecting click==7.1.1 (from -r /opt/python/ondeck/app/requirements.txt (line 4))
    Could not find a version that satisfies the requirement click==7.1.1 (from -r /opt/python/ondeck/app/requirements.txt (line 4)) (from versions: 0.1, 0.2, 0.3, 0.4, 0.5, 0.5.1, 0.6, 0.7, 1.0, 1.1, 2.0, 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 3.0, 3.1, 3.2, 3.3, 4.0, 4.1, 5.0, 5.1, 6.0, 6.1, 6.2, 6.3, 6.4, 6.5, 6.6, 6.7.dev0, 6.7, 7.0)
  No matching distribution found for click==7.1.1 (from -r /opt/python/ondeck/app/requirements.txt (line 4))
  You are using pip version 9.0.1, however version 20.0.2 is available.
  You should consider upgrading via the 'pip install --upgrade pip' command.
  2020-04-25 20:07:06,891 ERROR    Error installing dependencies: Command '/opt/python/run/venv/bin/pip install -r /opt/python/ondeck/app/requirements.txt' returned non-zero exit status 1
  Traceback (most recent call last):
    File "/opt/elasticbeanstalk/hooks/appdeploy/pre/03deploy.py", line 22, in main
      install_dependencies()
    File "/opt/elasticbeanstalk/hooks/appdeploy/pre/03deploy.py", line 18, in install_dependencies
      check_call('%s install -r %s' % (os.path.join(APP_VIRTUAL_ENV, 'bin', 'pip'), requirements_file), shell=True)
    File "/usr/lib64/python2.7/subprocess.py", line 190, in check_call
      raise CalledProcessError(retcode, cmd)
  CalledProcessError: Command '/opt/python/run/venv/bin/pip install -r /opt/python/ondeck/app/requirements.txt' returned non-zero exit status 1 (ElasticBeanstalk::ExternalInvocationError)
caused by: Collecting AWSIoTPythonSDK==1.4.8 (from -r /opt/python/ondeck/app/requirements.txt (line 1))
    Downloading https://files.pythonhosted.org/packages/79/f4/a8e386cad19edd0de41326c71e5d9d47c32ee0f3efe615fbd9c5c9197c8f/AWSIoTPythonSDK-1.4.8.tar.gz (80kB)
  Collecting boto3==1.12.46 (from -r /opt/python/ondeck/app/requirements.txt (line 2))
    Downloading https://files.pythonhosted.org/packages/8c/b9/d9da1f57c0535afacbdf20f3f0ce0c6cdae1b8adab0fd48459c6d72222e5/boto3-1.12.46-py2.py3-none-any.whl (128kB)
  Collecting botocore==1.15.46 (from -r /opt/python/ondeck/app/requirements.txt (line 3))
    Downloading https://files.pythonhosted.org/packages/6c/21/d015b86c8fa291f78e8fe7d7cf0a60645989efa5db5e8302e2b7ccf9539a/botocore-1.15.46-py2.py3-none-any.whl (6.1MB)
  Collecting click==7.1.1 (from -r /opt/python/ondeck/app/requirements.txt (line 4))
    Could not find a version that satisfies the requirement click==7.1.1 (from -r /opt/python/ondeck/app/requirements.txt (line 4)) (from versions: 0.1, 0.2, 0.3, 0.4, 0.5, 0.5.1, 0.6, 0.7, 1.0, 1.1, 2.0, 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 3.0, 3.1, 3.2, 3.3, 4.0, 4.1, 5.0, 5.1, 6.0, 6.1, 6.2, 6.3, 6.4, 6.5, 6.6, 6.7.dev0, 6.7, 7.0)
  No matching distribution found for click==7.1.1 (from -r /opt/python/ondeck/app/requirements.txt (line 4))
  You are using pip version 9.0.1, however version 20.0.2 is available.
  You should consider upgrading via the 'pip install --upgrade pip' command.
  2020-04-25 20:07:06,891 ERROR    Error installing dependencies: Command '/opt/python/run/venv/bin/pip install -r /opt/python/ondeck/app/requirements.txt' returned non-zero exit status 1
  Traceback (most recent call last):
    File "/opt/elasticbeanstalk/hooks/appdeploy/pre/03deploy.py", line 22, in main
      install_dependencies()
    File "/opt/elasticbeanstalk/hooks/appdeploy/pre/03deploy.py", line 18, in install_dependencies
      check_call('%s install -r %s' % (os.path.join(APP_VIRTUAL_ENV, 'bin', 'pip'), requirements_file), shell=True)
    File "/usr/lib64/python2.7/subprocess.py", line 190, in check_call
      raise CalledProcessError(retcode, cmd)
  CalledProcessError: Command '/opt/python/run/venv/bin/pip install -r /opt/python/ondeck/app/requirements.txt' returned non-zero exit status 1 (Executor::NonZeroExitStatus)


[2020-04-25T20:07:06.899Z] ERROR [3191]  : Command CMD-Startup failed!
[2020-04-25T20:07:06.900Z] INFO  [3191]  : Command processor returning results: 
{"status":"FAILURE","api_version":"1.0","results":[{"status":"FAILURE","msg":"(TRUNCATED)...)\n  File \"/usr/lib64/python2.7/subprocess.py\", line 190, in check_call\n    raise CalledProcessError(retcode, cmd)\nCalledProcessError: Command '/opt/python/run/venv/bin/pip install -r /opt/python/ondeck/app/requirements.txt' returned non-zero exit status 1. \nHook /opt/elasticbeanstalk/hooks/appdeploy/pre/03deploy.py failed. For more detail, check /var/log/eb-activity.log using console or EB CLI","returncode":1,"events":[{"msg":"Your requirements.txt is invalid. Snapshot your logs for details.","severity":"ERROR","timestamp":1587845226},{"msg":"Error installing dependencies: Command '/opt/python/run/venv/bin/pip install -r /opt/python/ondeck/app/requirements.txt' returned non-zero exit status 1","severity":"SYSTEM","timestamp":1587845226}]}],"truncated":"true"}
[2020-04-25T20:15:25.264Z] DEBUG [3578]  : Reading config file: /etc/elasticbeanstalk/.aws-eb-stack.properties
[2020-04-25T20:15:25.266Z] DEBUG [3578]  : Checking if the command processor should execute...
[2020-04-25T20:15:25.268Z] DEBUG [3578]  : Checking whether the command is applicable to instance (i-033d34238ff1adc4f)..
[2020-04-25T20:15:25.268Z] INFO  [3578]  : Command is applicable to this instance (i-033d34238ff1adc4f)..
[2020-04-25T20:15:25.268Z] DEBUG [3578]  : Checking if the received command stage is valid..
[2020-04-25T20:15:25.269Z] INFO  [3578]  : No stage_num in command. Valid stage..
[2020-04-25T20:15:25.269Z] INFO  [3578]  : Received command CMD-TailLogs: {"execution_data"=>"*", "instance_ids"=>["i-033d34238ff1adc4f"], "data"=>"05eb168b-58a9-4a0b-b53a-f725f07dc026", "command_name"=>"CMD-TailLogs", "api_version"=>"1.0", "resource_name"=>"AWSEBAutoScalingGroup", "request_id"=>"05eb168b-58a9-4a0b-b53a-f725f07dc026"}
[2020-04-25T20:15:25.269Z] INFO  [3578]  : Command processor should execute command.
[2020-04-25T20:15:25.269Z] DEBUG [3578]  : Storing current stage..
[2020-04-25T20:15:25.269Z] DEBUG [3578]  : Stage_num does not exist. Not saving null stage. Returning..
[2020-04-25T20:15:25.269Z] DEBUG [3578]  : Reading config file: /etc/elasticbeanstalk/.aws-eb-stack.properties
[2020-04-25T20:15:25.269Z] DEBUG [3578]  : Retrieving metadata for key: AWS::ElasticBeanstalk::Ext||_ContainerConfigFileContent||commands..
[2020-04-25T20:15:25.270Z] DEBUG [3578]  : Retrieving metadata for key: AWS::ElasticBeanstalk::Ext||_API||_Commands..
[2020-04-25T20:15:25.270Z] INFO  [3578]  : Found enabled addons: ["logpublish", "logstreaming"].
[2020-04-25T20:15:25.271Z] INFO  [3578]  : Updating Command definition of addon logpublish.
[2020-04-25T20:15:25.271Z] INFO  [3578]  : Updating Command definition of addon logstreaming.
[2020-04-25T20:15:25.271Z] DEBUG [3578]  : Loaded definition of Command CMD-TailLogs.
[2020-04-25T20:15:25.272Z] INFO  [3578]  : Executing CMD-TailLogs
[2020-04-25T20:15:25.272Z] INFO  [3578]  : Executing command: CMD-TailLogs...
[2020-04-25T20:15:25.272Z] INFO  [3578]  : Executing command CMD-TailLogs activities...
[2020-04-25T20:15:25.272Z] DEBUG [3578]  : Setting environment variables..
[2020-04-25T20:15:25.272Z] INFO  [3578]  : Running AddonsBefore for command CMD-TailLogs...
[2020-04-25T20:15:25.272Z] DEBUG [3578]  : Running stages of Command CMD-TailLogs from stage 0 to stage 0...
[2020-04-25T20:15:25.272Z] INFO  [3578]  : Running stage 0 of command CMD-TailLogs...
[2020-04-25T20:15:25.272Z] DEBUG [3578]  : Loaded 1 actions for stage 0.
[2020-04-25T20:15:25.272Z] INFO  [3578]  : Running 1 of 1 actions: TailLogs...

Также мои требования.txt:

AWSIoTPythonSDK == 1.4.8

boto3 == 1.12.46

botocore == 1.15.46

click == 7.1.1

documenttils == 0.15.2

Настой == 1.1.2

Flask -Cors == 3.0.8

isdangerous == 1.1.0

Jinja2 == 2.11.2

jmespath == 0.9.5

MarkupSafe == 1.1.1

pyserial == 3.4

python -dateutil == 2.8.1

s3transfer == 0.3.3

шесть == 1.14.0

urllib3 == 1.25.9

Werkzeug == 1.0.1

...