Im deploying the a python server but im not able see what is going wrong.
When I use eb deploy
this error message appears.
INFO: Environment update is starting.
INFO: Deploying new version to instance(s).
ERROR: Your requirements.txt is invalid. Snapshot your logs for details.
ERROR: [Instance: i-ed140a66] Command failed on instance. Return code: 1 Output: (TRUNCATED)...)
File "/usr/lib64/python2.7/subprocess.py", line 540, 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.
Hook /opt/elasticbeanstalk/hooks/appdeploy/pre/03deploy.py failed. For more detail, check /var/log/eb-activity.log using console or EB CLI.
INFO: Command execution completed on all instances. Summary: [Successful: 0, Failed: 1].
ERROR: Unsuccessful command execution on instance id(s) 'i-ed140a66'. Aborting the operation.
Logs
-------------------------------------
/var/log/eb-version-deployment.log
-------------------------------------
2016-02-02 06:07:46,922 [INFO] Found the latest version manifest file <Key: elasticbeanstalk-eu-west-1-371406371448,resources/environments/e-q8xgqmybdp/_runtime/versions/manifest_1454393068374> from bucket elasticbeanstalk-eu-west-1-371406371448 and prefix resources/environments/e-q8xgqmybdp/_runtime/versions/
2016-02-02 06:07:47,024 [INFO] Downloaded the manifest file to /tmp/version_file_manifest
2016-02-02 06:07:47,116 [INFO] Downloaded version label app-b066-160202_013329 from s3 key <Key: elasticbeanstalk-eu-west-1-371406371448,resources/environments/e-q8xgqmybdp/_runtime/_versions/qr/app-b066-160202_013329>
2016-02-02 06:11:11,362 [INFO] Version manifest file name already known. The latest version manifest file key is resources/environments/e-q8xgqmybdp/_runtime/versions/manifest_1454393466996
2016-02-02 06:11:11,417 [INFO] Downloaded the manifest file to /tmp/version_file_manifest
2016-02-02 06:11:11,484 [INFO] Downloaded version label app-e9f9-160202_071101 from s3 key <Key: elasticbeanstalk-eu-west-1-371406371448,resources/environments/e-q8xgqmybdp/_runtime/_versions/qr/app-e9f9-160202_071101>
2016-02-02 06:26:32,642 [INFO] Version manifest file name already known. The latest version manifest file key is resources/environments/e-q8xgqmybdp/_runtime/versions/manifest_1454394388223
2016-02-02 06:26:32,695 [INFO] Downloaded the manifest file to /tmp/version_file_manifest
2016-02-02 06:26:32,858 [INFO] Downloaded version label app-3e2d-160202_072623 from s3 key <Key: elasticbeanstalk-eu-west-1-371406371448,resources/environments/e-q8xgqmybdp/_runtime/_versions/qr/app-3e2d-160202_072623>
2016-02-02 06:31:53,735 [INFO] Version manifest file name already known. The latest version manifest file key is resources/environments/e-q8xgqmybdp/_runtime/versions/manifest_1454394707970
2016-02-02 06:31:53,791 [INFO] Downloaded the manifest file to /tmp/version_file_manifest
2016-02-02 06:31:53,852 [INFO] Downloaded version label app-c875-160202_073142 from s3 key <Key: elasticbeanstalk-eu-west-1-371406371448,resources/environments/e-q8xgqmybdp/_runtime/_versions/qr/app-c875-160202_073142>
-------------------------------------
/var/log/httpd/error_log
-------------------------------------
[Tue Feb 02 06:08:02.456849 2016] [suexec:notice] [pid 2707] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Tue Feb 02 06:08:02.469003 2016] [auth_digest:notice] [pid 2707] AH01757: generating secret for digest authentication ...
[Tue Feb 02 06:08:02.469549 2016] [lbmethod_heartbeat:notice] [pid 2707] AH02282: No slotmem from mod_heartmonitor
[Tue Feb 02 06:08:02.471143 2016] [mpm_prefork:notice] [pid 2707] AH00163: Apache/2.4.16 (Amazon) mod_wsgi/3.5 Python/3.4.3 configured -- resuming normal operations
[Tue Feb 02 06:08:02.471157 2016] [core:notice] [pid 2707] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
-------------------------------------
/opt/python/log/supervisord.log
-------------------------------------
2016-02-02 06:08:00,596 CRIT Supervisor running as root (no user in config file)
2016-02-02 06:08:00,730 INFO RPC interface 'supervisor' initialized
2016-02-02 06:08:00,731 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2016-02-02 06:08:00,731 INFO supervisord started with pid 2625
2016-02-02 06:08:01,733 INFO spawned: 'httpd' with pid 2707
2016-02-02 06:08:03,318 INFO success: httpd entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
-------------------------------------
/var/log/httpd/access_log
-------------------------------------
172.31.21.42 - - [02/Feb/2016:06:11:36 +0000] "GET / HTTP/1.1" 200 161 "-" "TwengaBot-2.0 (http://www.twenga.com/bot.html)"
172.31.37.121 - - [02/Feb/2016:06:14:17 +0000] "GET /sqlmanager/scripts/setup.php HTTP/1.1" 404 226 "-" "-"
172.31.21.42 - - [02/Feb/2016:06:24:50 +0000] "GET /sqlmanager/scripts/setup.php HTTP/1.1" 404 226 "-" "-"
-------------------------------------
/var/log/eb-activity.log
-------------------------------------
copying PIL/EpsImagePlugin.py -> build/lib.linux-x86_64-3.4/PIL
copying PIL/JpegPresets.py -> build/lib.linux-x86_64-3.4/PIL
copying PIL/GimpPaletteFile.py -> build/lib.linux-x86_64-3.4/PIL
copying PIL/TiffTags.py -> build/lib.linux-x86_64-3.4/PIL
copying PIL/Image.py -> build/lib.linux-x86_64-3.4/PIL
copying PIL/XpmImagePlugin.py -> build/lib.linux-x86_64-3.4/PIL
copying PIL/ImageEnhance.py -> build/lib.linux-x86_64-3.4/PIL
copying PIL/ImageTransform.py -> build/lib.linux-x86_64-3.4/PIL
copying PIL/IcnsImagePlugin.py -> build/lib.linux-x86_64-3.4/PIL
copying PIL/XVThumbImagePlugin.py -> build/lib.linux-x86_64-3.4/PIL
copying PIL/ImImagePlugin.py -> build/lib.linux-x86_64-3.4/PIL
copying PIL/PdfImagePlugin.py -> build/lib.linux-x86_64-3.4/PIL
copying PIL/WebPImagePlugin.py -> build/lib.linux-x86_64-3.4/PIL
copying PIL/ImageFile.py -> build/lib.linux-x86_64-3.4/PIL
copying PIL/XbmImagePlugin.py -> build/lib.linux-x86_64-3.4/PIL
copying PIL/FpxImagePlugin.py -> build/lib.linux-x86_64-3.4/PIL
copying PIL/ImageWin.py -> build/lib.linux-x86_64-3.4/PIL
copying PIL/BmpImagePlugin.py -> build/lib.linux-x86_64-3.4/PIL
copying PIL/PcdImagePlugin.py -> build/lib.linux-x86_64-3.4/PIL
copying PIL/__init__.py -> build/lib.linux-x86_64-3.4/PIL
copying PIL/Hdf5StubImagePlugin.py -> build/lib.linux-x86_64-3.4/PIL
copying PIL/PyAccess.py -> build/lib.linux-x86_64-3.4/PIL
copying PIL/SgiImagePlugin.py -> build/lib.linux-x86_64-3.4/PIL
copying PIL/PngImagePlugin.py -> build/lib.linux-x86_64-3.4/PIL
copying PIL/PcfFontFile.py -> build/lib.linux-x86_64-3.4/PIL
copying PIL/GribStubImagePlugin.py -> build/lib.linux-x86_64-3.4/PIL
copying PIL/ImagePalette.py -> build/lib.linux-x86_64-3.4/PIL
copying PIL/JpegImagePlugin.py -> build/lib.linux-x86_64-3.4/PIL
copying PIL/CurImagePlugin.py -> build/lib.linux-x86_64-3.4/PIL
copying PIL/FliImagePlugin.py -> build/lib.linux-x86_64-3.4/PIL
copying PIL/PSDraw.py -> build/lib.linux-x86_64-3.4/PIL
copying PIL/ContainerIO.py -> build/lib.linux-x86_64-3.4/PIL
copying PIL/Jpeg2KImagePlugin.py -> build/lib.linux-x86_64-3.4/PIL
copying PIL/SunImagePlugin.py -> build/lib.linux-x86_64-3.4/PIL
running egg_info
writing dependency_links to Pillow.egg-info/dependency_links.txt
writing top-level names to Pillow.egg-info/top_level.txt
writing Pillow.egg-info/PKG-INFO
warning: manifest_maker: standard file '-c' not found
reading manifest file 'Pillow.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'Pillow.egg-info/SOURCES.txt'
copying PIL/OleFileIO-README.md -> build/lib.linux-x86_64-3.4/PIL
running build_ext
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-bzg43p3a/Pillow/setup.py", line 767, in <module>
zip_safe=not debug_build(),
File "/usr/lib64/python3.4/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib64/python3.4/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/usr/lib64/python3.4/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/opt/python/run/venv/local/lib/python3.4/site-packages/setuptools/command/install.py", line 61, in run
return orig.install.run(self)
File "/usr/lib64/python3.4/distutils/command/install.py", line 587, in run
self.run_command('build')
File "/usr/lib64/python3.4/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib64/python3.4/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/lib64/python3.4/distutils/command/build.py", line 126, in run
self.run_command(cmd_name)
File "/usr/lib64/python3.4/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib64/python3.4/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/lib64/python3.4/distutils/command/build_ext.py", line 339, in run
self.build_extensions()
File "/tmp/pip-build-bzg43p3a/Pillow/setup.py", line 515, in build_extensions
% (f, f))
ValueError: --enable-jpeg requested but jpeg not found, aborting.
----------------------------------------
Command "/opt/python/run/venv/bin/python3.4 -c "import setuptools, tokenize;__file__='/tmp/pip-build-bzg43p3a/Pillow/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-zphh_gpq-record/install-record.txt --single-version-externally-managed --compile --install-headers /opt/python/run/venv/include/site/python3.4/Pillow" failed with error code 1 in /tmp/pip-build-bzg43p3a/Pillow
You are using pip version 7.1.2, however version 8.0.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
2016-02-02 06:32:00,463 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 540, 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)
[2016-02-02T06:32:00.470Z] INFO [3417] - [Application update/AppDeployStage0/AppDeployPreHook/03deploy.py] : Activity failed.
[2016-02-02T06:32:00.470Z] INFO [3417] - [Application update/AppDeployStage0/AppDeployPreHook] : Activity failed.
[2016-02-02T06:32:00.470Z] INFO [3417] - [Application update/AppDeployStage0] : Activity failed.
[2016-02-02T06:32:00.470Z] INFO [3417] - [Application update] : Completed activity. Result:
Application update - Command CMD-AppDeploy failed
[2016-02-02T06:34:46.145Z] INFO [3559] - [CMD-TailLogs - stage ] : Starting activity...
[2016-02-02T06:34:46.403Z] INFO [3559] - [CMD-TailLogs - stage /AddonsBefore] : Starting activity...
[2016-02-02T06:34:46.403Z] INFO [3559] - [CMD-TailLogs - stage /AddonsBefore] : Completed activity.
[2016-02-02T06:34:46.403Z] INFO [3559] - [CMD-TailLogs - stage /TailLogs] : Starting activity...
[2016-02-02T06:34:46.403Z] INFO [3559] - [CMD-TailLogs - stage /TailLogs/TailLogs] : Starting activity...
-------------------------------------
/var/log/eb-commandprocessor.log
-------------------------------------
copying PIL/Hdf5StubImagePlugin.py -> build/lib.linux-x86_64-3.4/PIL
copying PIL/PyAccess.py -> build/lib.linux-x86_64-3.4/PIL
copying PIL/SgiImagePlugin.py -> build/lib.linux-x86_64-3.4/PIL
copying PIL/PngImagePlugin.py -> build/lib.linux-x86_64-3.4/PIL
copying PIL/PcfFontFile.py -> build/lib.linux-x86_64-3.4/PIL
copying PIL/GribStubImagePlugin.py -> build/lib.linux-x86_64-3.4/PIL
copying PIL/ImagePalette.py -> build/lib.linux-x86_64-3.4/PIL
copying PIL/JpegImagePlugin.py -> build/lib.linux-x86_64-3.4/PIL
copying PIL/CurImagePlugin.py -> build/lib.linux-x86_64-3.4/PIL
copying PIL/FliImagePlugin.py -> build/lib.linux-x86_64-3.4/PIL
copying PIL/PSDraw.py -> build/lib.linux-x86_64-3.4/PIL
copying PIL/ContainerIO.py -> build/lib.linux-x86_64-3.4/PIL
copying PIL/Jpeg2KImagePlugin.py -> build/lib.linux-x86_64-3.4/PIL
copying PIL/SunImagePlugin.py -> build/lib.linux-x86_64-3.4/PIL
running egg_info
writing dependency_links to Pillow.egg-info/dependency_links.txt
writing top-level names to Pillow.egg-info/top_level.txt
writing Pillow.egg-info/PKG-INFO
warning: manifest_maker: standard file '-c' not found
reading manifest file 'Pillow.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'Pillow.egg-info/SOURCES.txt'
copying PIL/OleFileIO-README.md -> build/lib.linux-x86_64-3.4/PIL
running build_ext
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-bzg43p3a/Pillow/setup.py", line 767, in <module>
zip_safe=not debug_build(),
File "/usr/lib64/python3.4/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib64/python3.4/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/usr/lib64/python3.4/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/opt/python/run/venv/local/lib/python3.4/site-packages/setuptools/command/install.py", line 61, in run
return orig.install.run(self)
File "/usr/lib64/python3.4/distutils/command/install.py", line 587, in run
self.run_command('build')
File "/usr/lib64/python3.4/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib64/python3.4/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/lib64/python3.4/distutils/command/build.py", line 126, in run
self.run_command(cmd_name)
File "/usr/lib64/python3.4/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib64/python3.4/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/lib64/python3.4/distutils/command/build_ext.py", line 339, in run
self.build_extensions()
File "/tmp/pip-build-bzg43p3a/Pillow/setup.py", line 515, in build_extensions
% (f, f))
ValueError: --enable-jpeg requested but jpeg not found, aborting.
----------------------------------------
Command "/opt/python/run/venv/bin/python3.4 -c "import setuptools, tokenize;__file__='/tmp/pip-build-bzg43p3a/Pillow/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-zphh_gpq-record/install-record.txt --single-version-externally-managed --compile --install-headers /opt/python/run/venv/include/site/python3.4/Pillow" failed with error code 1 in /tmp/pip-build-bzg43p3a/Pillow
You are using pip version 7.1.2, however version 8.0.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
2016-02-02 06:32:00,463 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 540, 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)
[2016-02-02T06:32:00.470Z] ERROR [3417] : Command CMD-AppDeploy failed!
[2016-02-02T06:32:00.471Z] INFO [3417] : Command processor returning results:
{"status":"FAILURE","api_version":"1.0","results":[{"status":"FAILURE","msg":"(TRUNCATED)...)\n File \"/usr/lib64/python2.7/subprocess.py\", line 540, 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":1454394720},{"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":1454394720}]}],"truncated":"true"}
[2016-02-02T06:34:46.142Z] DEBUG [3559] : Reading config file: /etc/elasticbeanstalk/.aws-eb-stack.properties
[2016-02-02T06:34:46.142Z] DEBUG [3559] : Checking if the command processor should execute...
[2016-02-02T06:34:46.145Z] DEBUG [3559] : Checking whether the command is applicable to instance (i-ed140a66)..
[2016-02-02T06:34:46.145Z] INFO [3559] : Command is applicable to this instance (i-ed140a66)..
[2016-02-02T06:34:46.145Z] DEBUG [3559] : Checking if the received command stage is valid..
[2016-02-02T06:34:46.145Z] INFO [3559] : No stage_num in command. Valid stage..
[2016-02-02T06:34:46.145Z] INFO [3559] : Received command CMD-TailLogs: {"execution_data":"{\"aws_access_key_id\":\"...\",\"signature\":\"rIMbEr\\\/...=\",\"security_token\":\".....\\\/....+b3S5CX+.....\\\/....\\\/nscmn0jTvFj9cocEadX8iyAfu0etyj8ZGZCY7G5fm2n+...+niq2RrG\\\/....\\\/uc\\\/qIU7S+....+.....+....+yWwVscgRN\\\/yGkOcnVSgod+nLGjQaP3FKR2f73fnb59pwidw6\\\/8bS+wWc2ViDI1b+1BQ==\",\"policy\":\".....==\"}","instance_ids":["i-ed140a66"],"data":"0bd2befc-c977-11e5-9d27-d5f6a3459bef","command_name":"CMD-TailLogs","api_version":"1.0","resource_name":"AWSEBAutoScalingGroup","request_id":"....-....-.....","command_timeout":"600"}
[2016-02-02T06:34:46.145Z] INFO [3559] : Command processor should execute command.
[2016-02-02T06:34:46.145Z] DEBUG [3559] : Storing current stage..
[2016-02-02T06:34:46.145Z] DEBUG [3559] : Stage_num does not exist. Not saving null stage. Returning..
[2016-02-02T06:34:46.145Z] INFO [3559] : Executing CMD-TailLogs - stage
[2016-02-02T06:34:46.145Z] INFO [3559] : Executing command: CMD-TailLogs...
[2016-02-02T06:34:46.145Z] DEBUG [3559] : Reading config file: /etc/elasticbeanstalk/.aws-eb-stack.properties
[2016-02-02T06:34:46.146Z] DEBUG [3559] : Refreshing metadata..
[2016-02-02T06:34:46.401Z] DEBUG [3559] : Refreshed environment metadata.
[2016-02-02T06:34:46.401Z] DEBUG [3559] : Retrieving metadata for key: AWS::ElasticBeanstalk::Ext||_ContainerConfigFileContent||commands..
[2016-02-02T06:34:46.401Z] DEBUG [3559] : Retrieving metadata for key: AWS::ElasticBeanstalk::Ext||_API||_Commands..
[2016-02-02T06:34:46.402Z] INFO [3559] : Found enabled addons: ["logpublish"].
[2016-02-02T06:34:46.403Z] INFO [3559] : Updating Command definition of addon logpublish.
[2016-02-02T06:34:46.403Z] DEBUG [3559] : Loaded definition of Command CMD-TailLogs.
[2016-02-02T06:34:46.403Z] INFO [3559] : Executing command CMD-TailLogs activities...
[2016-02-02T06:34:46.403Z] DEBUG [3559] : Setting environment variables..
[2016-02-02T06:34:46.403Z] INFO [3559] : Running AddonsBefore for command CMD-TailLogs...
[2016-02-02T06:34:46.403Z] DEBUG [3559] : Running stages of Command CMD-TailLogs from stage 0 to stage 0...
[2016-02-02T06:34:46.403Z] INFO [3559] : Running stage 0 of command CMD-TailLogs...
[2016-02-02T06:34:46.403Z] DEBUG [3559] : Loaded 1 actions for stage 0.
[2016-02-02T06:34:46.403Z] INFO [3559] : Running 1 of 1 actions: TailLogs...
requirements.txt
Flask==0.10.1
Flask-QRcode==0.6.0
Flask-RESTful==0.3.4
Flask-SQLAlchemy==2.1
Jinja2==2.8
MarkupSafe==0.23
Pillow==3.0.0
PyMySQL==0.6.7
SQLAlchemy==1.0.9
Werkzeug==0.11.2
aniso8601==1.1.0
cffi==1.3.0
idna==2.0
itsdangerous==0.24
pyasn1==0.1.9
pycparser==2.14
python-dateutil==2.4.2
pytz==2015.7
qrcode==5.1
requests==2.8.1
six==1.10.0
urllib3==1.12