繁体   English   中英

Elastic Beanstalk Ruby 在私有 su.net 上失败

[英]Elastic Beanstalk Ruby failing on private subnet

我有一个部署到 Elastic Beanstalk 的 ruby 应用程序,它在连接到我的公共 su.net 时成功部署和运行,但在连接到我的私有 su.net 时失败并出现错误。

2023/01/04 21:16:25.937590 [INFO] Running command /bin/su webapp -c bundle exec /opt/elasticbeanstalk/config/private/checkforraketask.rb assets:precompile
2023/01/04 21:16:26.178594 [INFO] bundler: failed to load command: /opt/elasticbeanstalk/config/private/checkforraketask.rb (/opt/elasticbeanstalk/config/private/checkforraketask.rb)
/opt/elasticbeanstalk/config/private/checkforraketask.rb:16:in `require': cannot load such file -- rake (LoadError)
    from /opt/elasticbeanstalk/config/private/checkforraketask.rb:16:in `<top (required)>'
    from /opt/rubies/ruby-2.7.7/lib/ruby/site_ruby/2.7.0/bundler/cli/exec.rb:58:in `load'
    from /opt/rubies/ruby-2.7.7/lib/ruby/site_ruby/2.7.0/bundler/cli/exec.rb:58:in `kernel_load'
    from /opt/rubies/ruby-2.7.7/lib/ruby/site_ruby/2.7.0/bundler/cli/exec.rb:23:in `run'
    from /opt/rubies/ruby-2.7.7/lib/ruby/site_ruby/2.7.0/bundler/cli.rb:491:in `exec'
    from /opt/rubies/ruby-2.7.7/lib/ruby/site_ruby/2.7.0/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
    from /opt/rubies/ruby-2.7.7/lib/ruby/site_ruby/2.7.0/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
    from /opt/rubies/ruby-2.7.7/lib/ruby/site_ruby/2.7.0/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
    from /opt/rubies/ruby-2.7.7/lib/ruby/site_ruby/2.7.0/bundler/cli.rb:34:in `dispatch'
    from /opt/rubies/ruby-2.7.7/lib/ruby/site_ruby/2.7.0/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
    from /opt/rubies/ruby-2.7.7/lib/ruby/site_ruby/2.7.0/bundler/cli.rb:28:in `start'
    from /opt/rubies/ruby-2.7.7/lib/ruby/gems/2.7.0/gems/bundler-2.4.1/exe/bundle:45:in `block in <top (required)>'
    from /opt/rubies/ruby-2.7.7/lib/ruby/site_ruby/2.7.0/bundler/friendly_errors.rb:117:in `with_friendly_errors'
    from /opt/rubies/ruby-2.7.7/lib/ruby/gems/2.7.0/gems/bundler-2.4.1/exe/bundle:33:in `<top (required)>'
    from /opt/elasticbeanstalk/.rbenv/versions/2.7.7/bin/bundle:25:in `load'
    from /opt/elasticbeanstalk/.rbenv/versions/2.7.7/bin/bundle:25:in `<main>'

最初我们的 VPC 配置错误,以至于我们的公共 su.net 之一和私有 su.net 之一没有出站 inte.net 访问。 我更正了这一点,当连接到公共 su.net 时错误不会发生,但它确实发生在私有 su.net 上。 我在私有 su.net 中启动了 EC2 实例,并验证它们确实具有出站 inte.net 访问权限,因此它似乎与我的 beantalk 实例有关。

我已经验证了我们的环境与此处的模板一致 https://github.com/awsdocs/elastic-beanstalk-samples/blob/master/cfn-templates/vpc-privatepublic.yaml但仍然没有运气。

任何帮助都会很棒!

我解决了这个问题。 我通过以下步骤启用了 HTTPS 一直到实例https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/https-tcp-passthrough.html和此处https://docs.aws.amazon .com/elasticbeanstalk/latest/dg/https-singleinstance-ruby.html#Puma在该设置期间,它让您执行此步骤AWS HTTPS 设置

关键是这只需要在默认 VPC 上完成。 不知道为什么当我把所有东西都放在我的公共 su.net 上时这并没有破坏东西,但是问题已经解决了

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM