我已经将我的网络应用程序的端口从3030更改为8081(eb-default).但我仍然得到“502”错误的网关错误.
这是我的日志文件.
[2016-03-26T03:26:57.709Z] DEBUG [12162] : Reading config file: /etc/elasticbeanstalk/.aws-eb-stack.properties
[2016-03-26T03:26:57.709Z] DEBUG [12162] : Checking if the command processor should execute...
[2016-03-26T03:26:57.711Z] DEBUG [12162] : Checking whether the command is applicable to instance (i-525a308a)..
[2016-03-26T03:26:57.711Z] INFO [12162] : Command is applicable to this instance (i-525a308a)..
[2016-03-26T03:26:57.711Z] DEBUG [12162] : Checking if the received command stage is valid..
[2016-03-26T03:26:57.711Z] INFO [12162] : No stage_num in command. Valid stage..
[2016-03-26T03:26:57.711Z] INFO [12162] : Received command CMD-TailLogs: {"execution_data":"{\"aws_access_key_id\":\"ASIAJDXEY3WNMSVE3VPA\",\"signature\":\"+dKY04cX3l4Yd443BItdPVBn6Zc=\",\"security_token\":\"AQoDYXdzEG0a8AJjWGaSl9U1L1NRB5WqSKl198DCqFWu7qQ0veWFkdmJlQwhpIEGZrr41GOHTXgylzOx1aBAZPTp3lTU81YtRqDy4JDS9zysHCn2+6vNv9M1k\\\/ztyanXbzOdZB2ZmwKd9pnj5XwN1wcGe88YACQO6P3ZF7sIsuMBkFL\\\/xz+aIgSL\\\/v3hXdXkRUHlLTgZMj2ZEBoVvOeXYp2c1w6kzHONT1DGLwq1IPjlubbGKdAia2pUGixKv7RNMMJc1VuaoUSlW4+tmuFvbEjSpjMoA91pRGmvBJpp7gkl0fsnFY6uOC+87hlENXvqxszgQt9FhyzQY3dRUeIsCG1HIUm33nZciJzsDMyP\\\/M4ZqaG+cZ5YFCGvJXDtVNLTilpC5OYpGZZD4Q\\\/F0kXmCZ20\\\/ofqFfDPQD92TG64X+JOhREqIFquewtDk9psCJoYbZ4ODDWwTXcLVa1VK+Kp7bXtiaJ6dicTYCU9lBUiNt2UlvnUOjXn+fE\\\/LiCn49e3BQ==\",\"policy\":\"eyJleHBpcmF0aW9uIjoiMjAxNi0wMy0yNlQwMzo1Njo0OC4zNDVaIiwiY29uZGl0aW9ucyI6W1sic3RhcnRzLXdpdGgiLCIkeC1hbXotbWV0YS10aW1lX3N0YW1wIiwiIl0sWyJzdGFydHMtd2l0aCIsIiR4LWFtei1tZXRhLXB1Ymxpc2hfbWVjaGFuaXNtIiwiIl0sWyJzdGFydHMtd2l0aCIsIiRrZXkiLCJyZXNvdXJjZXNcL2Vudmlyb25tZW50c1wvbG9nc1wvIl0sWyJzdGFydHMtd2l0aCIsIiR4LWFtei1tZXRhLWJhdGNoX2lkIiwiIl0sWyJzdGFydHMtd2l0aCIsIiR4LWFtei1tZXRhLWZpbGVfbmFtZSIsIiJdLFsic3RhcnRzLXdpdGgiLCIkeC1hbXotc2VjdXJpdHktdG9rZW4iLCIiXSxbInN0YXJ0cy13aXRoIiwiJENvbnRlbnQtVHlwZSIsIiJdLFsiZXEiLCIkYnVja2V0IiwiZWxhc3RpY2JlYW5zdGFsay11cy13ZXN0LTItOTk2Njk5MTA4MTI4Il0sWyJlcSIsIiRhY2wiLCJwcml2YXRlIl1dfQ==\"}","instance_ids":["i-525a308a"],"data":"92b9ea79-f302-11e5-bc66-9761883272e3","command_name":"CMD-TailLogs","api_version":"1.0","resource_name":"AWSEBAutoScalingGroup","request_id":"92b9ea79-f302-11e5-bc66-9761883272e3","command_timeout":"600"}
[2016-03-26T03:26:57.711Z] INFO [12162] : Command processor should execute command.
[2016-03-26T03:26:57.711Z] DEBUG [12162] : Storing current stage..
[2016-03-26T03:26:57.711Z] DEBUG [12162] : Stage_num does not exist. Not saving null stage. Returning..
[2016-03-26T03:26:57.712Z] INFO [12162] : Executing CMD-TailLogs - stage
[2016-03-26T03:26:57.712Z] INFO [12162] : Executing command: CMD-TailLogs...
[2016-03-26T03:26:57.716Z] DEBUG [12162] : Reading config file: /etc/elasticbeanstalk/.aws-eb-stack.properties
[2016-03-26T03:26:57.717Z] DEBUG [12162] : Refreshing metadata..
[2016-03-26T03:27:05.130Z] DEBUG [12162] : Refreshed environment metadata.
[2016-03-26T03:27:05.130Z] DEBUG [12162] : Retrieving metadata for key: AWS::ElasticBeanstalk::Ext||_ContainerConfigFileContent||commands..
[2016-03-26T03:27:05.132Z] DEBUG [12162] : Retrieving metadata for key: AWS::ElasticBeanstalk::Ext||_API||_Commands..
[2016-03-26T03:27:05.137Z] INFO [12162] : Found enabled addons: ["logpublish"].
[2016-03-26T03:27:05.368Z] INFO [12162] : Updating Command definition of addon logpublish.
[2016-03-26T03:27:05.368Z] DEBUG [12162] : Loaded definition of Command CMD-TailLogs.
[2016-03-26T03:27:05.368Z] INFO [12162] : Executing command CMD-TailLogs activities...
[2016-03-26T03:27:05.368Z] DEBUG [12162] : Setting environment variables..
[2016-03-26T03:27:05.368Z] INFO [12162] : Running AddonsBefore for command CMD-TailLogs...
[2016-03-26T03:27:05.369Z] DEBUG [12162] : Running stages of Command CMD-TailLogs from stage 0 to stage 0...
[2016-03-26T03:27:05.369Z] INFO [12162] : Running stage 0 of command CMD-TailLogs...
[2016-03-26T03:27:05.369Z] DEBUG [12162] : Loaded 1 actions for stage 0.
[2016-03-26T03:27:05.369Z] INFO [12162] : Running 1 of 1 actions: TailLogs...
我认为这与阶段num有关,但我不知道如何解决这个问题.
最佳答案 问题是我的代码实际上并没有在本地构建.我修复了代码并再次上传.