简体   繁体   English

带有SSL和自定义健康检查URL的Elasticbeanstalk(在其他端口上)不起作用

[英]Elasticbeanstalk with ssl and custom healh check url (on a different port) not working

i using elastic beanstalk and added successfull a letsencrypt https cert yesterday. 我使用弹性beantalk,并成功添加了一个letencrypt https昨天的证书。 but now, my custom health check is set my systemstatus to red. 但是现在,我的自定义运行状况检查将系统状态设置为红色。

if i remove the ssl config (all properties with namespace ""namespace:aws:elb:listener:443"). the healthcheck it's working. 如果我删除ssl配置(名称空间为““ namespace:aws:elb:listener:443”的所有属性),则运行状况检查正常。

it's not a port problem, i allowed public access to the port temporally. 这不是端口问题,我允许公众临时访问该端口。

what do i forget ? 我会忘记什么?

Thanks Marcel 谢谢马塞尔

my ebextension config is this: 我的ebextension配置是这样的:


Resources:
  healthPort: 
    Type: AWS::EC2::SecurityGroupIngress
    Properties:
      GroupId: {"Fn::GetAtt" : ["AWSEBSecurityGroup", "GroupId"]}
      IpProtocol: tcp
      ToPort: 7979
      FromPort: 7979
      SourceSecurityGroupName: { "Fn::GetAtt": ["AWSEBLoadBalancer", "SourceSecurityGroup.GroupName"] }

option_settings:

  - namespace:  aws:elasticbeanstalk:application
    option_name:  Application Healthcheck URL
    value: HTTP:7979/health

option_settings:
  - namespace: aws:elb:listener:80
    option_name: ListenerEnabled
    value: true

  - namespace: aws:elb:listener:80
    option_name: ListenerProtocol
    value: HTTP

  - namespace: aws:elb:listener:80
    option_name: InstancePort
    value: 80

  - namespace: aws:elb:listener:80
    option_name: InstanceProtocol
    value: HTTP

  - namespace: aws:elb:listener:443
    option_name: ListenerEnabled
    value: true

  - namespace: aws:elb:listener:443
    option_name: ListenerProtocol
    value: HTTPS

  - namespace: aws:elb:listener:443
    option_name: InstancePort
    value: 80

  - namespace: aws:elb:listener:443
    option_name: InstanceProtocol
    value: HTTP

  - namespace: aws:elb:listener:443
    option_name: SSLCertificateId
    value: xxx

The problem was the ELB hasn't the right to connect to the 7979 Port. 问题是ELB无权连接到7979端口。 I don't know why it just happend, if i enable ssl but now it works. 我不知道为什么会这样,如果我启用了ssl,但现在可以了。

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

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