实例上的命令失败。返回代码:1 输出:(TRUNCATED)在 AWS elastic beanstalk 上用于 nodejs 应用程序

实例上的命令失败。返回代码:1 输出:(TRUNCATED)在 AWS elastic beanstalk 上用于 nodejs 应用程序

我是 AWS 新手,在将 nodejs 应用程序上传到 AWS beanstalk 时,出现了错误[Instance: i-00dee873eeaed8bbb] Command failed on instance. Return code: 1 Output: (TRUNCATED)...ry/Brass-Inserts.ejs inflating: /tmp/deployment/application/views/subcategory/Copper-Aluminium-Lugs.ejs

并且健康状况显示恶化。以下是完整日志:-

-------------------------------------
/var/log/eb-activity.log
-------------------------------------
    inflating: /tmp/deployment/application/views/product/Flare-Nuts.ejs  
    inflating: /tmp/deployment/application/views/product/Flat-And-Twisted-Crampets.ejs  
    inflating: /tmp/deployment/application/views/product/Flat-Head-Screw.ejs  
    inflating: /tmp/deployment/application/views/product/Flexible-Braid-Bonds-And-Connectors.ejs  
    inflating: /tmp/deployment/application/views/product/Flexible-Conduit-PVC-Coated.ejs  
    inflating: /tmp/deployment/application/views/product/Flush-Hinges.ejs  
    inflating: /tmp/deployment/application/views/product/Furniture-Cap-Nuts.ejs  
    inflating: /tmp/deployment/application/views/product/G-Type-Earth-Clamp.ejs  
    inflating: /tmp/deployment/application/views/product/Galvanized-Lock-Nut.ejs  
    inflating: /tmp/deployment/application/views/product/Galvanized-Male-Hooks.ejs  
    inflating: /tmp/deployment/application/views/product/Gate-Hinge.ejs  
    inflating: /tmp/deployment/application/views/product/Heavy-Hex-Nuts.ejs  
    inflating: /tmp/deployment/application/views/product/Heavy-U-Bolt-Clamp.ejs  
    inflating: /tmp/deployment/application/views/product/Helical-Knurled-Inserts.ejs  
    inflating: /tmp/deployment/application/views/product/Hex-Bolts-Set-Screws.ejs  
    inflating: /tmp/deployment/application/views/product/Hex-Coupling-Nuts.ejs  
    inflating: /tmp/deployment/application/views/product/Hex-Jam-Nuts.ejs  
    inflating: /tmp/deployment/application/views/product/Hex-Nuts.ejs  
    inflating: /tmp/deployment/application/views/product/Hook-Plates.ejs  
    inflating: /tmp/deployment/application/views/product/Inspection-Tees-and-Elbows-With-Cover-And-Screw.ejs  
    inflating: /tmp/deployment/application/views/product/IP-68-Cable-Glands.ejs  
    inflating: /tmp/deployment/application/views/product/Junction-Box-Cover-Lids.ejs  
    inflating: /tmp/deployment/application/views/product/Junction-Boxes-And-Pressed-Conduit-Boxes.ejs  
    inflating: /tmp/deployment/application/views/product/Lid-Stay.ejs  
    inflating: /tmp/deployment/application/views/product/Line-Taps-Split-Bolt.ejs  
    inflating: /tmp/deployment/application/views/product/Lock-Nuts.ejs  
    inflating: /tmp/deployment/application/views/product/Machine-Screws.ejs  
    inflating: /tmp/deployment/application/views/product/Male-And-Female-Bush.ejs  
    inflating: /tmp/deployment/application/views/product/Male-Nipples.ejs  
    inflating: /tmp/deployment/application/views/product/Marine-Cable-Gland.ejs  
    inflating: /tmp/deployment/application/views/product/Mechanical-Connectors-Lugs.ejs  
    inflating: /tmp/deployment/application/views/product/Milled-Edge-Lock-Rings.ejs  
    inflating: /tmp/deployment/application/views/product/Moulded-In-Inserts.ejs  
    inflating: /tmp/deployment/application/views/product/Moulded-In-Male-Inserts.ejs  
    inflating: /tmp/deployment/application/views/product/O-Type-Earth-Clamp.ejs  
    inflating: /tmp/deployment/application/views/product/Oblong-Test-Clamps.ejs  
    inflating: /tmp/deployment/application/views/product/Parliament-Hinge.ejs  
    inflating: /tmp/deployment/application/views/product/PG-Type-Cable-Glands.ejs  
    inflating: /tmp/deployment/application/views/product/Piano-Hinges.ejs  
    inflating: /tmp/deployment/application/views/product/Pivot-Hinges.ejs  
    inflating: /tmp/deployment/application/views/product/PPR-Inserts.ejs  
    inflating: /tmp/deployment/application/views/product/Press-Knocked-Inserts.ejs  
    inflating: /tmp/deployment/application/views/product/Press-Lock-Type-Inserts.ejs  
    inflating: /tmp/deployment/application/views/product/Quadrant-Hinge.ejs  
    inflating: /tmp/deployment/application/views/product/Rain-Water-Pipe-Bonds.ejs  
    inflating: /tmp/deployment/application/views/product/Rise-And-Fall-Hinge.ejs  
    inflating: /tmp/deployment/application/views/product/Rod-To-Cable-Clamps.ejs  
    inflating: /tmp/deployment/application/views/product/Rod-To-Cable-Saddle.ejs  
    inflating: /tmp/deployment/application/views/product/Rod-To-Lug-Clamps.ejs  
    inflating: /tmp/deployment/application/views/product/Rod-To-Tape-A-Clamps.ejs  
    inflating: /tmp/deployment/application/views/product/Roto-Moulding-Insert.ejs  
    inflating: /tmp/deployment/application/views/product/Screw-Down-Round-Test-Clamps-Test-Bonds.ejs  
    inflating: /tmp/deployment/application/views/product/Self-Tapping-Inserts.ejs  
    inflating: /tmp/deployment/application/views/product/Shoulder-Screws.ejs  
    inflating: /tmp/deployment/application/views/product/Socket-Head-Screw.ejs  
    inflating: /tmp/deployment/application/views/product/Soss-And-Barrel-Hinges.ejs  
    inflating: /tmp/deployment/application/views/product/Space-Bar-Distance-Saddles.ejs  
    inflating: /tmp/deployment/application/views/product/Split-Inserts.ejs  
    inflating: /tmp/deployment/application/views/product/Spring-Hinge.ejs  
    inflating: /tmp/deployment/application/views/product/Square-Nuts.ejs  
    inflating: /tmp/deployment/application/views/product/Square-Tape-Clamps.ejs  
    inflating: /tmp/deployment/application/views/product/SS-Cable-Gland.ejs  
    inflating: /tmp/deployment/application/views/product/Strap-Hinge.ejs  
    inflating: /tmp/deployment/application/views/product/Tape-Clips.ejs  
    inflating: /tmp/deployment/application/views/product/Tee-Hinge.ejs  
    inflating: /tmp/deployment/application/views/product/Tee-Type-Clamp.ejs  
    inflating: /tmp/deployment/application/views/product/Terminal-Base-Arrestor-Base.ejs  
    inflating: /tmp/deployment/application/views/product/Terminals-For-Connectors-Earthing.ejs  
    inflating: /tmp/deployment/application/views/product/Threaded-Studs-All-Threads.ejs  
    inflating: /tmp/deployment/application/views/product/Thumb-Screws.ejs  
    inflating: /tmp/deployment/application/views/product/Tinned-Copper-Aluminium-Cable-Terminal-Ends-Lugs.ejs  
    inflating: /tmp/deployment/application/views/product/Tower-Earth-Clamp.ejs  
    inflating: /tmp/deployment/application/views/product/U-Bolt-E-Type-Clamp.ejs  
    inflating: /tmp/deployment/application/views/product/U-Bolt-Guv-Clamps.ejs  
    inflating: /tmp/deployment/application/views/product/Ultrasonic-Inserts.ejs  
    inflating: /tmp/deployment/application/views/product/Washers-And-Pressed-Parts.ejs  
    inflating: /tmp/deployment/application/views/product/Water-Main-Pipe-Bond.ejs  
    inflating: /tmp/deployment/application/views/product/Wing-Nuts.ejs  
    inflating: /tmp/deployment/application/views/product/Wiping-Glands.ejs  
    inflating: /tmp/deployment/application/views/quality.ejs  
    inflating: /tmp/deployment/application/views/search.ejs  
    inflating: /tmp/deployment/application/views/subcategories.ejs  
     creating: /tmp/deployment/application/views/subcategory/
    inflating: /tmp/deployment/application/views/subcategory/Battery-Terminal.ejs  
    inflating: /tmp/deployment/application/views/subcategory/Brass-Inserts.ejs  
    inflating: /tmp/deployment/application/views/subcategory/Copper-Aluminium-Lugs.ejs  
    inflating: /tmp/deployment/application/views/subcategory/Nuts.ejs  
    inflating: /tmp/deployment/application/views/subcategory/Screws-Bolts.ejs   (Executor::NonZeroExitStatus)


[2019-12-27T14:06:08.282Z] INFO  [3124]  - [Application deployment amarex-source@1/StartupStage0/AppDeployPreHook/20unzip.sh] : Activity failed.
[2019-12-27T14:06:08.282Z] INFO  [3124]  - [Application deployment amarex-source@1/StartupStage0/AppDeployPreHook] : Activity failed.
[2019-12-27T14:06:08.282Z] INFO  [3124]  - [Application deployment amarex-source@1/StartupStage0] : Activity failed.
[2019-12-27T14:06:08.292Z] INFO  [3124]  - [Application deployment amarex-source@1] : Completed activity. Result:
  Application deployment - Command CMD-Startup failed
[2019-12-27T14:09:30.865Z] INFO  [3281]  - [CMD-TailLogs] : Starting activity...
[2019-12-27T14:09:30.865Z] INFO  [3281]  - [CMD-TailLogs/AddonsBefore] : Starting activity...
[2019-12-27T14:09:30.865Z] INFO  [3281]  - [CMD-TailLogs/AddonsBefore] : Completed activity.
[2019-12-27T14:09:30.866Z] INFO  [3281]  - [CMD-TailLogs/TailLogs] : Starting activity...
[2019-12-27T14:09:30.866Z] INFO  [3281]  - [CMD-TailLogs/TailLogs/TailLogs] : Starting activity...



-------------------------------------
/var/log/eb-commandprocessor.log
-------------------------------------
    inflating: /tmp/deployment/application/views/product/Inspection-Tees-and-Elbows-With-Cover-And-Screw.ejs  
    inflating: /tmp/deployment/application/views/product/IP-68-Cable-Glands.ejs  
    inflating: /tmp/deployment/application/views/product/Junction-Box-Cover-Lids.ejs  
    inflating: /tmp/deployment/application/views/product/Junction-Boxes-And-Pressed-Conduit-Boxes.ejs  
    inflating: /tmp/deployment/application/views/product/Lid-Stay.ejs  
    inflating: /tmp/deployment/application/views/product/Line-Taps-Split-Bolt.ejs  
    inflating: /tmp/deployment/application/views/product/Lock-Nuts.ejs  
    inflating: /tmp/deployment/application/views/product/Machine-Screws.ejs  
    inflating: /tmp/deployment/application/views/product/Male-And-Female-Bush.ejs  
    inflating: /tmp/deployment/application/views/product/Male-Nipples.ejs  
    inflating: /tmp/deployment/application/views/product/Marine-Cable-Gland.ejs  
    inflating: /tmp/deployment/application/views/product/Mechanical-Connectors-Lugs.ejs  
    inflating: /tmp/deployment/application/views/product/Milled-Edge-Lock-Rings.ejs  
    inflating: /tmp/deployment/application/views/product/Moulded-In-Inserts.ejs  
    inflating: /tmp/deployment/application/views/product/Moulded-In-Male-Inserts.ejs  
    inflating: /tmp/deployment/application/views/product/O-Type-Earth-Clamp.ejs  
    inflating: /tmp/deployment/application/views/product/Oblong-Test-Clamps.ejs  
    inflating: /tmp/deployment/application/views/product/Parliament-Hinge.ejs  
    inflating: /tmp/deployment/application/views/product/PG-Type-Cable-Glands.ejs  
    inflating: /tmp/deployment/application/views/product/Piano-Hinges.ejs  
    inflating: /tmp/deployment/application/views/product/Pivot-Hinges.ejs  
    inflating: /tmp/deployment/application/views/product/PPR-Inserts.ejs  
    inflating: /tmp/deployment/application/views/product/Press-Knocked-Inserts.ejs  
    inflating: /tmp/deployment/application/views/product/Press-Lock-Type-Inserts.ejs  
    inflating: /tmp/deployment/application/views/product/Quadrant-Hinge.ejs  
    inflating: /tmp/deployment/application/views/product/Rain-Water-Pipe-Bonds.ejs  
    inflating: /tmp/deployment/application/views/product/Rise-And-Fall-Hinge.ejs  
    inflating: /tmp/deployment/application/views/product/Rod-To-Cable-Clamps.ejs  
    inflating: /tmp/deployment/application/views/product/Rod-To-Cable-Saddle.ejs  
    inflating: /tmp/deployment/application/views/product/Rod-To-Lug-Clamps.ejs  
    inflating: /tmp/deployment/application/views/product/Rod-To-Tape-A-Clamps.ejs  
    inflating: /tmp/deployment/application/views/product/Roto-Moulding-Insert.ejs  
    inflating: /tmp/deployment/application/views/product/Screw-Down-Round-Test-Clamps-Test-Bonds.ejs  
    inflating: /tmp/deployment/application/views/product/Self-Tapping-Inserts.ejs  
    inflating: /tmp/deployment/application/views/product/Shoulder-Screws.ejs  
    inflating: /tmp/deployment/application/views/product/Socket-Head-Screw.ejs  
    inflating: /tmp/deployment/application/views/product/Soss-And-Barrel-Hinges.ejs  
    inflating: /tmp/deployment/application/views/product/Space-Bar-Distance-Saddles.ejs  
    inflating: /tmp/deployment/application/views/product/Split-Inserts.ejs  
    inflating: /tmp/deployment/application/views/product/Spring-Hinge.ejs  
    inflating: /tmp/deployment/application/views/product/Square-Nuts.ejs  
    inflating: /tmp/deployment/application/views/product/Square-Tape-Clamps.ejs  
    inflating: /tmp/deployment/application/views/product/SS-Cable-Gland.ejs  
    inflating: /tmp/deployment/application/views/product/Strap-Hinge.ejs  
    inflating: /tmp/deployment/application/views/product/Tape-Clips.ejs  
    inflating: /tmp/deployment/application/views/product/Tee-Hinge.ejs  
    inflating: /tmp/deployment/application/views/product/Tee-Type-Clamp.ejs  
    inflating: /tmp/deployment/application/views/product/Terminal-Base-Arrestor-Base.ejs  
    inflating: /tmp/deployment/application/views/product/Terminals-For-Connectors-Earthing.ejs  
    inflating: /tmp/deployment/application/views/product/Threaded-Studs-All-Threads.ejs  
    inflating: /tmp/deployment/application/views/product/Thumb-Screws.ejs  
    inflating: /tmp/deployment/application/views/product/Tinned-Copper-Aluminium-Cable-Terminal-Ends-Lugs.ejs  
    inflating: /tmp/deployment/application/views/product/Tower-Earth-Clamp.ejs  
    inflating: /tmp/deployment/application/views/product/U-Bolt-E-Type-Clamp.ejs  
    inflating: /tmp/deployment/application/views/product/U-Bolt-Guv-Clamps.ejs  
    inflating: /tmp/deployment/application/views/product/Ultrasonic-Inserts.ejs  
    inflating: /tmp/deployment/application/views/product/Washers-And-Pressed-Parts.ejs  
    inflating: /tmp/deployment/application/views/product/Water-Main-Pipe-Bond.ejs  
    inflating: /tmp/deployment/application/views/product/Wing-Nuts.ejs  
    inflating: /tmp/deployment/application/views/product/Wiping-Glands.ejs  
    inflating: /tmp/deployment/application/views/quality.ejs  
    inflating: /tmp/deployment/application/views/search.ejs  
    inflating: /tmp/deployment/application/views/subcategories.ejs  
     creating: /tmp/deployment/application/views/subcategory/
    inflating: /tmp/deployment/application/views/subcategory/Battery-Terminal.ejs  
    inflating: /tmp/deployment/application/views/subcategory/Brass-Inserts.ejs  
    inflating: /tmp/deployment/application/views/subcategory/Copper-Aluminium-Lugs.ejs  
    inflating: /tmp/deployment/application/views/subcategory/Nuts.ejs  
    inflating: /tmp/deployment/application/views/subcategory/Screws-Bolts.ejs   (Executor::NonZeroExitStatus)


[2019-12-27T14:06:08.292Z] ERROR [3124]  : Command CMD-Startup failed!
[2019-12-27T14:06:08.293Z] INFO  [3124]  : Command processor returning results: 
{"status":"FAILURE","api_version":"1.0","results":[{"status":"FAILURE","msg":"(TRUNCATED)...ry/Brass-Inserts.ejs  \n  inflating: /tmp/deployment/application/views/subcategory/Copper-Aluminium-Lugs.ejs  \n  inflating: /tmp/deployment/application/views/subcategory/Nuts.ejs  \n  inflating: /tmp/deployment/application/views/subcategory/Screws-Bolts.ejs. \nHook /opt/elasticbeanstalk/hooks/appdeploy/pre/20unzip.sh failed. For more detail, check /var/log/eb-activity.log using console or EB CLI","returncode":1,"events":[]}],"truncated":"true"}
[2019-12-27T14:09:30.859Z] DEBUG [3281]  : Reading config file: /etc/elasticbeanstalk/.aws-eb-stack.properties
[2019-12-27T14:09:30.859Z] DEBUG [3281]  : Checking if the command processor should execute...
[2019-12-27T14:09:30.862Z] DEBUG [3281]  : Checking whether the command is applicable to instance (i-00dee873eeaed8bbb)..
[2019-12-27T14:09:30.862Z] INFO  [3281]  : Command is applicable to this instance (i-00dee873eeaed8bbb)..
[2019-12-27T14:09:30.862Z] DEBUG [3281]  : Checking if the received command stage is valid..
[2019-12-27T14:09:30.862Z] INFO  [3281]  : No stage_num in command. Valid stage..
[2019-12-27T14:09:30.862Z] INFO  [3281]  : Received command CMD-TailLogs: {"execution_data"=>"*", "instance_ids"=>["i-00dee873eeaed8bbb"], "data"=>"24dd3b0d-4fd3-4963-b4b9-4ff609db6372", "command_name"=>"CMD-TailLogs", "api_version"=>"1.0", "resource_name"=>"AWSEBAutoScalingGroup", "request_id"=>"24dd3b0d-4fd3-4963-b4b9-4ff609db6372"}
[2019-12-27T14:09:30.862Z] INFO  [3281]  : Command processor should execute command.
[2019-12-27T14:09:30.862Z] DEBUG [3281]  : Storing current stage..
[2019-12-27T14:09:30.862Z] DEBUG [3281]  : Stage_num does not exist. Not saving null stage. Returning..
[2019-12-27T14:09:30.862Z] DEBUG [3281]  : Reading config file: /etc/elasticbeanstalk/.aws-eb-stack.properties
[2019-12-27T14:09:30.862Z] DEBUG [3281]  : Retrieving metadata for key: AWS::ElasticBeanstalk::Ext||_ContainerConfigFileContent||commands..
[2019-12-27T14:09:30.863Z] DEBUG [3281]  : Retrieving metadata for key: AWS::ElasticBeanstalk::Ext||_API||_Commands..
[2019-12-27T14:09:30.864Z] INFO  [3281]  : Found enabled addons: ["logpublish", "logstreaming"].
[2019-12-27T14:09:30.865Z] INFO  [3281]  : Updating Command definition of addon logpublish.
[2019-12-27T14:09:30.865Z] INFO  [3281]  : Updating Command definition of addon logstreaming.
[2019-12-27T14:09:30.865Z] DEBUG [3281]  : Loaded definition of Command CMD-TailLogs.
[2019-12-27T14:09:30.865Z] INFO  [3281]  : Executing CMD-TailLogs
[2019-12-27T14:09:30.865Z] INFO  [3281]  : Executing command: CMD-TailLogs...
[2019-12-27T14:09:30.865Z] INFO  [3281]  : Executing command CMD-TailLogs activities...
[2019-12-27T14:09:30.865Z] DEBUG [3281]  : Setting environment variables..
[2019-12-27T14:09:30.865Z] INFO  [3281]  : Running AddonsBefore for command CMD-TailLogs...
[2019-12-27T14:09:30.865Z] DEBUG [3281]  : Running stages of Command CMD-TailLogs from stage 0 to stage 0...
[2019-12-27T14:09:30.865Z] INFO  [3281]  : Running stage 0 of command CMD-TailLogs...
[2019-12-27T14:09:30.866Z] DEBUG [3281]  : Loaded 1 actions for stage 0.
[2019-12-27T14:09:30.866Z] INFO  [3281]  : Running 1 of 1 actions: TailLogs...

在 eb-activity 日志中,我收到以下错误消息:-

ElasticBeanstalk::ExternalInvocationError)
caused by: ++ /opt/elasticbeanstalk/bin/get-config container -k app_staging_dir
  + EB_APP_STAGING_DIR=/tmp/deployment/application
  ++ /opt/elasticbeanstalk/bin/get-config container -k source_bundle
  + EB_APP_SOURCE_BUNDLE=/opt/elasticbeanstalk/deploy/appsource/source_bundle
  + /usr/bin/unzip -o -d /tmp/deployment/application /opt/elasticbeanstalk/deploy/appsource/source_bundle

当我尝试重新上传代码时,我收到以下消息:-

Environment named *** is in an invalid state for this operation. Must be Ready.

请帮我。

相关内容