Я работал над проектом Python, и у меня есть настройка сервера, я должен получать и отправлять данные на двух сокетах, для этого в настоящее время код работает нормально на localhost.Но я не могу запустить его через онлайн-сервис Amazon EBS.
Вот код:
import socket
from threading import Thread
def client_1(a):
global conn1
global conn2
while True:
if conn1 in vr1:
incomingStream_vr1 = conn1.recv(65535)
for conn in vr2:
conn.send(incomingStream_vr1)
if conn2 in vr2:
incomingStream_vr2 = conn2.recv(65535)
for conn in vr1:
conn.send(incomingStream_vr2)
TCP_IP = 'localhost'
TCP_PORT = 1234
TCP_PORT2 = 4321
# First Virtual Room
vr1 = []
tcpServer = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
tcpServer.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
tcpServer.bind(('', TCP_PORT))
#Second Virtual Room
vr2 = []
tcpServer2 = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
tcpServer2.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
tcpServer2.bind(('', TCP_PORT2))
threads = []
tcpServer.listen(1)
print("Virtual Room Sever 1: Waiting for connections from TCP clients...")
(conn1, remote_endpoint_1) = tcpServer.accept()
if(conn1 not in vr1):
vr1.append(conn1)
print(remote_endpoint_1)
thread1 = Thread(target=client_1, args=("ClienThread-1",))
threads.append(thread1)
tcpServer2.listen(1)
print ("Virtual Room Sever 2: Waiting for connections from TCP clients...")
(conn2, remote_endpoint_2) = tcpServer2.accept()
if conn2 not in vr2:
vr2.append(conn2)
print(remote_endpoint_2)
thread2 = Thread(target=client_1, args=("ClienThread-2",))
threads.append(thread2)
thread1.start()
thread2.start()
for t in threads:
t.join()
А вот мой хвостовой журнал экземпляра EC2:
-------------------------------------
/opt/python/log/supervisord.log
-------------------------------------
2019-03-15 11:50:58,619 CRIT Supervisor running as root (no user in config file)
2019-03-15 11:50:58,631 INFO RPC interface 'supervisor' initialized
2019-03-15 11:50:58,631 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2019-03-15 11:50:58,632 INFO supervisord started with pid 2440
2019-03-15 11:50:59,634 INFO spawned: 'httpd' with pid 2544
2019-03-15 11:51:00,850 INFO success: httpd entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2019-03-15 12:10:18,285 INFO stopped: httpd (exit status 0)
2019-03-15 12:10:19,289 INFO spawned: 'httpd' with pid 25858
2019-03-15 12:10:20,318 INFO success: httpd entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
-------------------------------------
/var/log/httpd/error_log
-------------------------------------
[Fri Mar 15 12:10:18.273344 2019] [mpm_prefork:notice] [pid 2544] AH00169: caught SIGTERM, shutting down
[Fri Mar 15 12:10:19.317858 2019] [suexec:notice] [pid 25858] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Fri Mar 15 12:10:19.328054 2019] [so:warn] [pid 25858] AH01574: module wsgi_module is already loaded, skipping
[Fri Mar 15 12:10:19.333475 2019] [http2:warn] [pid 25858] 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.
[Fri Mar 15 12:10:19.333487 2019] [http2:warn] [pid 25858] AH02951: mod_ssl does not seem to be enabled
[Fri Mar 15 12:10:19.333986 2019] [lbmethod_heartbeat:notice] [pid 25858] AH02282: No slotmem from mod_heartmonitor
[Fri Mar 15 12:10:19.334040 2019] [:warn] [pid 25858] mod_wsgi: Compiled for Python/3.6.2.
[Fri Mar 15 12:10:19.334044 2019] [:warn] [pid 25858] mod_wsgi: Runtime using Python/3.6.7.
[Fri Mar 15 12:10:19.336976 2019] [mpm_prefork:notice] [pid 25858] AH00163: Apache/2.4.37 (Amazon) mod_wsgi/3.5 Python/3.6.7 configured -- resuming normal operations
[Fri Mar 15 12:10:19.336999 2019] [core:notice] [pid 25858] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
[Fri Mar 15 12:10:22.030546 2019] [:error] [pid 25863] Virtual Room Sever 1: Waiting for connections from TCP clients...
-------------------------------------
/var/log/httpd/access_log
-------------------------------------
-------------------------------------
/var/log/eb-activity.log
-------------------------------------
[2019-03-15T11:54:28.259Z] INFO [2782] - [CMD-TailLogs/TailLogs] : Completed activity. Result:
CMD-TailLogs - stage 0 - Command CMD-TailLogs stage 0 completed
[2019-03-15T11:54:28.259Z] INFO [2782] - [CMD-TailLogs/AddonsAfter] : Starting activity...
[2019-03-15T11:54:28.259Z] INFO [2782] - [CMD-TailLogs/AddonsAfter] : Completed activity.
[2019-03-15T11:54:28.259Z] INFO [2782] - [CMD-TailLogs] : Completed activity. Result:
CMD-TailLogs - Command CMD-TailLogs succeeded
[2019-03-15T12:10:14.770Z] INFO [25705] - [Application update application.py@2] : Starting activity...
[2019-03-15T12:10:14.770Z] INFO [25705] - [Application update application.py@2/AddonsBefore] : Starting activity...
[2019-03-15T12:10:14.770Z] INFO [25705] - [Application update application.py@2/AddonsBefore/ConfigCWLAgent] : Starting activity...
[2019-03-15T12:10:14.770Z] INFO [25705] - [Application update application.py@2/AddonsBefore/ConfigCWLAgent/10-config.sh] : Starting activity...
[2019-03-15T12:10:14.866Z] INFO [25705] - [Application update application.py@2/AddonsBefore/ConfigCWLAgent/10-config.sh] : Completed activity. Result:
Log streaming option setting is not specified, ignore cloudwatch logs setup.
Disabled log streaming.
[2019-03-15T12:10:14.866Z] INFO [25705] - [Application update application.py@2/AddonsBefore/ConfigCWLAgent] : Completed activity. Result:
Successfully execute hooks in directory /opt/elasticbeanstalk/addons/logstreaming/hooks/config.
[2019-03-15T12:10:14.866Z] INFO [25705] - [Application update application.py@2/AddonsBefore] : Completed activity.
[2019-03-15T12:10:15.136Z] INFO [25705] - [Application update application.py@2/AppDeployStage0] : Starting activity...
[2019-03-15T12:10:15.136Z] INFO [25705] - [Application update application.py@2/AppDeployStage0/DownloadSourceBundle] : Starting activity...
[2019-03-15T12:10:15.412Z] INFO [25705] - [Application update application.py@2/AppDeployStage0/DownloadSourceBundle] : Completed activity. Result:
[2019-03-15T12:10:15.218Z] INFO [25748] : Application version will be saved to /opt/elasticbeanstalk/deploy/appsource.
[2019-03-15T12:10:15.218Z] INFO [25748] : Using manifest cache with deployment ID 2 and serial 2.
[2019-03-15T12:10:15.218Z] INFO [25748] : Attempting to download application source bundle to: '/opt/elasticbeanstalk/deploy/appsource/source_bundle'.
[2019-03-15T12:10:15.218Z] INFO [25748] : Using computed s3 key.
[2019-03-15T12:10:15.317Z] INFO [25748] : Downloading from bucket 'elasticbeanstalk-us-east-1-300760595651' with key 'resources/environments/e-wcwj2awjyb/_runtime/_versions/confu-server/application.py' and version '' to '/opt/elasticbeanstalk/deploy/appsource/source_bundle'.
[2019-03-15T12:10:15.385Z] INFO [25748] : Size: 1256, ETag: "03a38264062ea631e76a8ba321c0b14b", Metadata: {"environmentid"=>"e-wcwj2awjyb", "requestid"=>"456c5fd5-471b-11e9-89f6-2fc23d76b855"}.
[2019-03-15T12:10:15.398Z] INFO [25748] : Downloaded size: 1256.
[2019-03-15T12:10:15.398Z] INFO [25748] : Successfully downloaded to '/opt/elasticbeanstalk/deploy/appsource/source_bundle'.
[2019-03-15T12:10:15.412Z] INFO [25705] - [Application update application.py@2/AppDeployStage0/EbExtensionPreBuild] : Starting activity...
[2019-03-15T12:10:15.683Z] INFO [25705] - [Application update application.py@2/AppDeployStage0/EbExtensionPreBuild/Infra-EmbeddedPreBuild] : Starting activity...
[2019-03-15T12:10:15.683Z] INFO [25705] - [Application update application.py@2/AppDeployStage0/EbExtensionPreBuild/Infra-EmbeddedPreBuild] : Completed activity.
[2019-03-15T12:10:15.699Z] INFO [25705] - [Application update application.py@2/AppDeployStage0/EbExtensionPreBuild] : Completed activity.
[2019-03-15T12:10:15.699Z] INFO [25705] - [Application update application.py@2/AppDeployStage0/AppDeployPreHook] : Starting activity...
[2019-03-15T12:10:15.699Z] INFO [25705] - [Application update application.py@2/AppDeployStage0/AppDeployPreHook/01_configure_xray.sh] : Starting activity...
[2019-03-15T12:10:15.784Z] INFO [25705] - [Application update application.py@2/AppDeployStage0/AppDeployPreHook/01_configure_xray.sh] : Completed activity.
[2019-03-15T12:10:15.784Z] INFO [25705] - [Application update application.py@2/AppDeployStage0/AppDeployPreHook/01new.py] : Starting activity...
[2019-03-15T12:10:16.028Z] INFO [25705] - [Application update application.py@2/AppDeployStage0/AppDeployPreHook/01new.py] : Completed activity.
[2019-03-15T12:10:16.029Z] INFO [25705] - [Application update application.py@2/AppDeployStage0/AppDeployPreHook/02unzip.py] : Starting activity...
[2019-03-15T12:10:16.281Z] INFO [25705] - [Application update application.py@2/AppDeployStage0/AppDeployPreHook/02unzip.py] : Completed activity. Result:
Archive: /opt/elasticbeanstalk/deploy/appsource/source_bundle
inflating: /opt/python/ondeck/app/application.py
creating: /opt/python/ondeck/app/__MACOSX/
inflating: /opt/python/ondeck/app/__MACOSX/._application.py
[2019-03-15T12:10:16.281Z] INFO [25705] - [Application update application.py@2/AppDeployStage0/AppDeployPreHook/03deploy.py] : Starting activity...
[2019-03-15T12:10:16.462Z] INFO [25705] - [Application update application.py@2/AppDeployStage0/AppDeployPreHook/03deploy.py] : Completed activity.
[2019-03-15T12:10:16.462Z] INFO [25705] - [Application update application.py@2/AppDeployStage0/AppDeployPreHook/04configen.py] : Starting activity...
[2019-03-15T12:10:17.426Z] INFO [25705] - [Application update application.py@2/AppDeployStage0/AppDeployPreHook/04configen.py] : Completed activity.
[2019-03-15T12:10:17.427Z] INFO [25705] - [Application update application.py@2/AppDeployStage0/AppDeployPreHook] : Completed activity. Result:
Successfully execute hooks in directory /opt/elasticbeanstalk/hooks/appdeploy/pre.
[2019-03-15T12:10:17.427Z] INFO [25705] - [Application update application.py@2/AppDeployStage0/EbExtensionPostBuild] : Starting activity...
[2019-03-15T12:10:17.700Z] INFO [25705] - [Application update application.py@2/AppDeployStage0/EbExtensionPostBuild/Infra-EmbeddedPostBuild] : Starting activity...
[2019-03-15T12:10:17.700Z] INFO [25705] - [Application update application.py@2/AppDeployStage0/EbExtensionPostBuild/Infra-EmbeddedPostBuild] : Completed activity.
[2019-03-15T12:10:17.715Z] INFO [25705] - [Application update application.py@2/AppDeployStage0/EbExtensionPostBuild] : Completed activity.
[2019-03-15T12:10:17.715Z] INFO [25705] - [Application update application.py@2/AppDeployStage0/InfraCleanEbextension] : Starting activity...
[2019-03-15T12:10:17.715Z] INFO [25705] - [Application update application.py@2/AppDeployStage0/InfraCleanEbextension] : Completed activity. Result:
Cleaned ebextensions subdirectories from /opt/python/ondeck/app.
[2019-03-15T12:10:17.715Z] INFO [25705] - [Application update application.py@2/AppDeployStage0] : Completed activity. Result:
Application update - Command CMD-AppDeploy stage 0 completed
[2019-03-15T12:10:17.715Z] INFO [25705] - [Application update application.py@2/AppDeployStage1] : Starting activity...
[2019-03-15T12:10:17.715Z] INFO [25705] - [Application update application.py@2/AppDeployStage1/AppDeployEnactHook] : Starting activity...
[2019-03-15T12:10:17.716Z] INFO [25705] - [Application update application.py@2/AppDeployStage1/AppDeployEnactHook/01flip.py] : Starting activity...
[2019-03-15T12:10:38.025Z] INFO [25705] - [Application update application.py@2/AppDeployStage1/AppDeployEnactHook/01flip.py] : Completed activity. Result:
httpd: stopped
httpd: started
httpd RUNNING pid 25858, uptime 0:00:02
2019-03-15 12:10:38,019 INFO Apache is running, but root page is not responding in 3 seconds.
[2019-03-15T12:10:38.025Z] INFO [25705] - [Application update application.py@2/AppDeployStage1/AppDeployEnactHook/01stop_xray.sh] : Starting activity...
[2019-03-15T12:10:40.116Z] INFO [25705] - [Application update application.py@2/AppDeployStage1/AppDeployEnactHook/01stop_xray.sh] : Completed activity. Result:
Executing: if ( initctl status xray | grep start ); then initctl stop xray; fi
xray start/running, process 1685
xray stop/waiting
[2019-03-15T12:10:40.116Z] INFO [25705] - [Application update application.py@2/AppDeployStage1/AppDeployEnactHook/02create_pids_for_monitoring.sh] : Starting activity...
[2019-03-15T12:10:40.198Z] INFO [25705] - [Application update application.py@2/AppDeployStage1/AppDeployEnactHook/02create_pids_for_monitoring.sh] : Completed activity. Result:
+ chmod 0755 /var/run/httpd
+ /opt/elasticbeanstalk/bin/healthd-track-pidfile --proxy httpd
+ /opt/elasticbeanstalk/bin/healthd-track-pidfile --name application --location /opt/python/run/supervisord.pid
[2019-03-15T12:10:40.198Z] INFO [25705] - [Application update application.py@2/AppDeployStage1/AppDeployEnactHook/02start_xray.sh] : Starting activity...
[2019-03-15T12:10:40.281Z] INFO [25705] - [Application update application.py@2/AppDeployStage1/AppDeployEnactHook/02start_xray.sh] : Completed activity.
[2019-03-15T12:10:40.282Z] INFO [25705] - [Application update application.py@2/AppDeployStage1/AppDeployEnactHook] : Completed activity. Result:
Successfully execute hooks in directory /opt/elasticbeanstalk/hooks/appdeploy/enact.
[2019-03-15T12:10:40.282Z] INFO [25705] - [Application update application.py@2/AppDeployStage1/AppDeployPostHook] : Starting activity...
[2019-03-15T12:10:40.282Z] INFO [25705] - [Application update application.py@2/AppDeployStage1/AppDeployPostHook] : Completed activity. Result:
Successfully execute hooks in directory /opt/elasticbeanstalk/hooks/appdeploy/post.
[2019-03-15T12:10:40.282Z] INFO [25705] - [Application update application.py@2/AppDeployStage1] : Completed activity. Result:
Application version switch - Command CMD-AppDeploy stage 1 completed
[2019-03-15T12:10:40.282Z] INFO [25705] - [Application update application.py@2/AddonsAfter] : Starting activity...
[2019-03-15T12:10:40.282Z] INFO [25705] - [Application update application.py@2/AddonsAfter/ConfigLogRotation] : Starting activity...
[2019-03-15T12:10:40.282Z] INFO [25705] - [Application update application.py@2/AddonsAfter/ConfigLogRotation/10-config.sh] : Starting activity...
[2019-03-15T12:10:40.343Z] INFO [25705] - [Application update application.py@2/AddonsAfter/ConfigLogRotation/10-config.sh] : Completed activity. Result:
Disabled forced hourly log rotation.
[2019-03-15T12:10:40.343Z] INFO [25705] - [Application update application.py@2/AddonsAfter/ConfigLogRotation] : Completed activity. Result:
Successfully execute hooks in directory /opt/elasticbeanstalk/addons/logpublish/hooks/config.
[2019-03-15T12:10:40.343Z] INFO [25705] - [Application update application.py@2/AddonsAfter] : Completed activity.
[2019-03-15T12:10:40.343Z] INFO [25705] - [Application update application.py@2] : Completed activity. Result:
Application update - Command CMD-AppDeploy succeeded
[2019-03-15T12:11:00.331Z] INFO [25995] - [CMD-TailLogs] : Starting activity...
[2019-03-15T12:11:00.331Z] INFO [25995] - [CMD-TailLogs/AddonsBefore] : Starting activity...
[2019-03-15T12:11:00.331Z] INFO [25995] - [CMD-TailLogs/AddonsBefore] : Completed activity.
[2019-03-15T12:11:00.331Z] INFO [25995] - [CMD-TailLogs/TailLogs] : Starting activity...
[2019-03-15T12:11:00.331Z] INFO [25995] - [CMD-TailLogs/TailLogs/TailLogs] : Starting activity...
-------------------------------------
/var/log/eb-commandprocessor.log
-------------------------------------
[2019-03-15T11:54:28.023Z] DEBUG [2782] : Retrieving metadata for key: AWS::ElasticBeanstalk::Ext||_API||_Commands..
[2019-03-15T11:54:28.023Z] INFO [2782] : Found enabled addons: ["logstreaming", "logpublish"].
[2019-03-15T11:54:28.024Z] INFO [2782] : Updating Command definition of addon logstreaming.
[2019-03-15T11:54:28.024Z] INFO [2782] : Updating Command definition of addon logpublish.
[2019-03-15T11:54:28.024Z] DEBUG [2782] : Loaded definition of Command CMD-TailLogs.
[2019-03-15T11:54:28.024Z] INFO [2782] : Executing CMD-TailLogs
[2019-03-15T11:54:28.025Z] INFO [2782] : Executing command: CMD-TailLogs...
[2019-03-15T11:54:28.025Z] INFO [2782] : Executing command CMD-TailLogs activities...
[2019-03-15T11:54:28.025Z] DEBUG [2782] : Setting environment variables..
[2019-03-15T11:54:28.025Z] INFO [2782] : Running AddonsBefore for command CMD-TailLogs...
[2019-03-15T11:54:28.025Z] DEBUG [2782] : Running stages of Command CMD-TailLogs from stage 0 to stage 0...
[2019-03-15T11:54:28.025Z] INFO [2782] : Running stage 0 of command CMD-TailLogs...
[2019-03-15T11:54:28.025Z] DEBUG [2782] : Loaded 1 actions for stage 0.
[2019-03-15T11:54:28.025Z] INFO [2782] : Running 1 of 1 actions: TailLogs...
[2019-03-15T11:54:28.259Z] INFO [2782] : Running AddonsAfter for command CMD-TailLogs...
[2019-03-15T11:54:28.259Z] INFO [2782] : Command CMD-TailLogs succeeded!
[2019-03-15T11:54:28.259Z] INFO [2782] : Command processor returning results:
{"status":"SUCCESS","api_version":"1.0","results":[{"status":"SUCCESS","msg":"","returncode":0,"events":[{"msg":"[Instance: i-0e019d3c44a3a495b] Successfully finished tailing 5 log(s)","severity":"INFO","timestamp":1552650868259}]}]}
[2019-03-15T12:10:14.356Z] DEBUG [25705] : Reading config file: /etc/elasticbeanstalk/.aws-eb-stack.properties
[2019-03-15T12:10:14.356Z] DEBUG [25705] : Checking if the command processor should execute...
[2019-03-15T12:10:14.357Z] DEBUG [25705] : Checking whether the command is applicable to instance (i-0e019d3c44a3a495b)..
[2019-03-15T12:10:14.357Z] INFO [25705] : Command is applicable to this instance (i-0e019d3c44a3a495b)..
[2019-03-15T12:10:14.357Z] DEBUG [25705] : Checking if the received command stage is valid..
[2019-03-15T12:10:14.357Z] INFO [25705] : No stage_num in command. Valid stage..
[2019-03-15T12:10:14.357Z] INFO [25705] : Received command CMD-AppDeploy: {"execution_data"=>"{\"leader_election\":\"true\"}", "instance_ids"=>["i-0e019d3c44a3a495b"], "data"=>"manifest_1552651810917", "command_name"=>"CMD-AppDeploy", "api_version"=>"1.0", "resource_name"=>"AWSEBAutoScalingGroup", "request_id"=>"456c5fd5-471b-11e9-89f6-2fc23d76b855"}
[2019-03-15T12:10:14.357Z] INFO [25705] : Command processor should execute command.
[2019-03-15T12:10:14.357Z] DEBUG [25705] : Storing current stage..
[2019-03-15T12:10:14.357Z] DEBUG [25705] : Stage_num does not exist. Not saving null stage. Returning..
[2019-03-15T12:10:14.357Z] DEBUG [25705] : Reading config file: /etc/elasticbeanstalk/.aws-eb-stack.properties
[2019-03-15T12:10:14.357Z] DEBUG [25705] : Retrieving metadata for key: AWS::ElasticBeanstalk::Ext||_ContainerConfigFileContent||commands..
[2019-03-15T12:10:14.358Z] DEBUG [25705] : Retrieving metadata for key: AWS::ElasticBeanstalk::Ext||_API||_Commands..
[2019-03-15T12:10:14.358Z] INFO [25705] : Found enabled addons: ["logstreaming", "logpublish"].
[2019-03-15T12:10:14.359Z] INFO [25705] : Updating Command definition of addon logstreaming.
[2019-03-15T12:10:14.359Z] INFO [25705] : Updating Command definition of addon logpublish.
[2019-03-15T12:10:14.359Z] DEBUG [25705] : Refreshing metadata...
[2019-03-15T12:10:14.633Z] DEBUG [25705] : Refreshed environment metadata.
[2019-03-15T12:10:14.633Z] INFO [25705] : Recreated directory /opt/elasticbeanstalk/deploy/configuration/.
[2019-03-15T12:10:14.633Z] DEBUG [25705] : Retrieving metadata for key: AWS::ElasticBeanstalk::Ext||_AppSourceUrlFileContent||url..
[2019-03-15T12:10:14.634Z] INFO [25705] : Created appsource url file at /opt/elasticbeanstalk/deploy/configuration/appsourceurl.
[2019-03-15T12:10:14.634Z] DEBUG [25705] : Retrieving metadata for key: AWS::ElasticBeanstalk::Ext||_ContainerConfigFileContent..
[2019-03-15T12:10:14.636Z] INFO [25705] : Created container config file at /opt/elasticbeanstalk/deploy/configuration/containerconfiguration.
[2019-03-15T12:10:14.636Z] DEBUG [25705] : Retrieving metadata for key: AWS::ElasticBeanstalk::Ext||_ContainerConfigFileContent||commands..
[2019-03-15T12:10:14.636Z] DEBUG [25705] : Retrieving metadata for key: AWS::ElasticBeanstalk::Ext||_API||_Commands..
[2019-03-15T12:10:14.637Z] INFO [25705] : Found enabled addons: ["logstreaming", "logpublish"].
[2019-03-15T12:10:14.637Z] INFO [25705] : Updating Command definition of addon logstreaming.
[2019-03-15T12:10:14.637Z] INFO [25705] : Updating Command definition of addon logpublish.
[2019-03-15T12:10:14.637Z] DEBUG [25705] : Retrieving metadata for key: AWS::CloudFormation::Init||Infra-WriteApplication2||files..
[2019-03-15T12:10:14.638Z] DEBUG [25705] : Retrieving metadata for key: AWS::ElasticBeanstalk::Ext||ManifestFileS3Key..
[2019-03-15T12:10:14.714Z] INFO [25705] : Loading manifest from bucket 'elasticbeanstalk-us-east-1-300760595651' using computed S3 key 'resources/environments/e-wcwj2awjyb/_runtime/versions/manifest_1552651810917'.
[2019-03-15T12:10:14.770Z] INFO [25705] : Updated manifest cache: deployment ID 2 and serial 2.
[2019-03-15T12:10:14.770Z] DEBUG [25705] : Loaded definition of Command CMD-AppDeploy.
[2019-03-15T12:10:14.770Z] INFO [25705] : Executing Application update
[2019-03-15T12:10:14.770Z] INFO [25705] : Executing command: CMD-AppDeploy...
[2019-03-15T12:10:14.770Z] INFO [25705] : Executing command CMD-AppDeploy activities...
[2019-03-15T12:10:14.770Z] DEBUG [25705] : Setting environment variables..
[2019-03-15T12:10:14.770Z] INFO [25705] : Running AddonsBefore for command CMD-AppDeploy...
[2019-03-15T12:10:14.866Z] DEBUG [25705] : Running stages of Command CMD-AppDeploy from stage 0 to stage 1...
[2019-03-15T12:10:14.866Z] INFO [25705] : Running stage 0 of command CMD-AppDeploy...
[2019-03-15T12:10:14.866Z] INFO [25705] : Running leader election...
[2019-03-15T12:10:15.136Z] INFO [25705] : Instance is Leader.
[2019-03-15T12:10:15.136Z] DEBUG [25705] : Loaded 5 actions for stage 0.
[2019-03-15T12:10:15.136Z] INFO [25705] : Running 1 of 5 actions: DownloadSourceBundle...
[2019-03-15T12:10:15.412Z] INFO [25705] : Running 2 of 5 actions: EbExtensionPreBuild...
[2019-03-15T12:10:15.699Z] INFO [25705] : Running 3 of 5 actions: AppDeployPreHook...
[2019-03-15T12:10:17.427Z] INFO [25705] : Running 4 of 5 actions: EbExtensionPostBuild...
[2019-03-15T12:10:17.715Z] INFO [25705] : Running 5 of 5 actions: InfraCleanEbextension...
[2019-03-15T12:10:17.715Z] INFO [25705] : Running stage 1 of command CMD-AppDeploy...
[2019-03-15T12:10:17.715Z] DEBUG [25705] : Loaded 2 actions for stage 1.
[2019-03-15T12:10:17.715Z] INFO [25705] : Running 1 of 2 actions: AppDeployEnactHook...
[2019-03-15T12:10:40.282Z] INFO [25705] : Running 2 of 2 actions: AppDeployPostHook...
[2019-03-15T12:10:40.282Z] INFO [25705] : Running AddonsAfter for command CMD-AppDeploy...
[2019-03-15T12:10:40.343Z] INFO [25705] : Command CMD-AppDeploy succeeded!
[2019-03-15T12:10:40.344Z] INFO [25705] : Command processor returning results:
{"status":"SUCCESS","api_version":"1.0","results":[{"status":"SUCCESS","msg":"","returncode":0,"events":[]}]}
[2019-03-15T12:11:00.321Z] DEBUG [25995] : Reading config file: /etc/elasticbeanstalk/.aws-eb-stack.properties
[2019-03-15T12:11:00.321Z] DEBUG [25995] : Checking if the command processor should execute...
[2019-03-15T12:11:00.328Z] DEBUG [25995] : Checking whether the command is applicable to instance (i-0e019d3c44a3a495b)..
[2019-03-15T12:11:00.328Z] INFO [25995] : Command is applicable to this instance (i-0e019d3c44a3a495b)..
[2019-03-15T12:11:00.328Z] DEBUG [25995] : Checking if the received command stage is valid..
[2019-03-15T12:11:00.328Z] INFO [25995] : No stage_num in command. Valid stage..
[2019-03-15T12:11:00.328Z] INFO [25995] : Received command CMD-TailLogs: {"execution_data"=>"*", "instance_ids"=>["i-0e019d3c44a3a495b"], "data"=>"644fc8d5-471b-11e9-89f6-2fc23d76b855", "command_name"=>"CMD-TailLogs", "api_version"=>"1.0", "resource_name"=>"AWSEBAutoScalingGroup", "request_id"=>"644fc8d5-471b-11e9-89f6-2fc23d76b855"}
[2019-03-15T12:11:00.328Z] INFO [25995] : Command processor should execute command.
[2019-03-15T12:11:00.328Z] DEBUG [25995] : Storing current stage..
[2019-03-15T12:11:00.328Z] DEBUG [25995] : Stage_num does not exist. Not saving null stage. Returning..
[2019-03-15T12:11:00.328Z] DEBUG [25995] : Reading config file: /etc/elasticbeanstalk/.aws-eb-stack.properties
[2019-03-15T12:11:00.328Z] DEBUG [25995] : Retrieving metadata for key: AWS::ElasticBeanstalk::Ext||_ContainerConfigFileContent||commands..
[2019-03-15T12:11:00.329Z] DEBUG [25995] : Retrieving metadata for key: AWS::ElasticBeanstalk::Ext||_API||_Commands..
[2019-03-15T12:11:00.329Z] INFO [25995] : Found enabled addons: ["logstreaming", "logpublish"].
[2019-03-15T12:11:00.330Z] INFO [25995] : Updating Command definition of addon logstreaming.
[2019-03-15T12:11:00.330Z] INFO [25995] : Updating Command definition of addon logpublish.
[2019-03-15T12:11:00.330Z] DEBUG [25995] : Loaded definition of Command CMD-TailLogs.
[2019-03-15T12:11:00.330Z] INFO [25995] : Executing CMD-TailLogs
[2019-03-15T12:11:00.331Z] INFO [25995] : Executing command: CMD-TailLogs...
[2019-03-15T12:11:00.331Z] INFO [25995] : Executing command CMD-TailLogs activities...
[2019-03-15T12:11:00.331Z] DEBUG [25995] : Setting environment variables..
[2019-03-15T12:11:00.331Z] INFO [25995] : Running AddonsBefore for command CMD-TailLogs...
[2019-03-15T12:11:00.331Z] DEBUG [25995] : Running stages of Command CMD-TailLogs from stage 0 to stage 0...
[2019-03-15T12:11:00.331Z] INFO [25995] : Running stage 0 of command CMD-TailLogs...
[2019-03-15T12:11:00.331Z] DEBUG [25995] : Loaded 1 actions for stage 0.
[2019-03-15T12:11:00.331Z] INFO [25995] : Running 1 of 1 actions: TailLogs...
Я пытался запустить тот же код через компилятор Online Python, который работает без каких-либо проблем, но, конечно, мы не можем получить IP-адрес веб-сайта для подключения, для которого у меня есть выделенные платные сервисы Amazon, но его предоставлениемне трудно.
Все, что мне нужно, чтобы этот код запускался и просто сделал два сервера сокетов, которые прослушивают указанный порт, затем я могу просто взять публичный IP-адрес и подключить свои мобильные приложения к этой конечной точке.
Кто-нибудь может помочь?