Lightsail container shutting down because of healthcheck failure

0

I developed a docker dropwizard application. I want to deploy it on Lightsail Container service. It exposes 8080, 8081 ports, where 8080 is for business and 8081 for healthcheck. I could run it using docker locally and could access business at http://localhost:8080/swagger#/ and healthcheck at http://localhost:8081/healthcheck. I deployed it using docker compose that looks like below:

services:
  nexus:
    image: "myaccount/my-image:1.0.5-SNAPSHOT"
    ports:
      - "8080:8080/tcp"
      - "8081:8081/tcp"
    logging:
      driver: "syslog"
      options:
        syslog-address: "udp://127.0.0.1:514"
        tag: "nexus"
        syslog-format: "rfc5424micro"
    environment:
      - "GOOGLE_API_KEY=${GOOGLE_API_KEY}"
      - "CASHFREE_CLIENT_ID=${CASHFREE_CLIENT_ID}"
      - "CASHFREE_CLIENT_SECRET=${CASHFREE_CLIENT_SECRET}"
      - "TZ=${TZ}"
      - "AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}"
      - "AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}"

But while deploying it on lightsail containers it fails with following errors:

[8/Sept/2023:13:40:22] GET /userservice/housekeeping/otp/{phone} (com.tarkshala.tavahot.ms.userservice.resources.HousekeepingResource)
[8/Sept/2023:13:40:22] GET /userservice/information/{userId} (com.tarkshala.tavahot.ms.userservice.resources.InformationResource)
[8/Sept/2023:13:40:22] POST /userservice/profile/update (com.tarkshala.tavahot.ms.userservice.resources.ProfileResource)
[8/Sept/2023:13:40:22] GET /userservice/profile/{userId} (com.tarkshala.tavahot.ms.userservice.resources.ProfileResource)
[8/Sept/2023:13:40:22] INFO [2023-09-08 13:40:22,157] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@3c9cd930{Application context,/,null,AVAILABLE}
[8/Sept/2023:13:40:22] INFO [2023-09-08 13:40:22,245] io.dropwizard.setup.AdminEnvironment: tasks =
[8/Sept/2023:13:40:22] POST /tasks/unblacklist (io.appform.dropwizard.sharding.admin.UnblacklistShardTask)
[8/Sept/2023:13:40:22] POST /tasks/blacklist (io.appform.dropwizard.sharding.admin.BlacklistShardTask)
[8/Sept/2023:13:40:22] POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask)
[8/Sept/2023:13:40:22] POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask)
[8/Sept/2023:13:40:22] INFO [2023-09-08 13:40:22,246] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@70b2819f{Admin context,/,null,AVAILABLE}
[8/Sept/2023:13:40:22] INFO [2023-09-08 13:40:22,350] org.eclipse.jetty.server.AbstractConnector: Started application@54b88247{HTTP/1.1, (http/1.1)}{0.0.0.0:8080}
[8/Sept/2023:13:40:22] INFO [2023-09-08 13:40:22,457] org.eclipse.jetty.server.AbstractConnector: Started admin@54eea16c{HTTP/1.1, (http/1.1)}{0.0.0.0:8081}
[8/Sept/2023:13:40:22] INFO [2023-09-08 13:40:22,457] org.eclipse.jetty.server.Server: Started @70685ms
[8/Sept/2023:13:40:23] 172.26.2.39 - - [08/Sep/2023:13:40:23 +0000] "GET / HTTP/1.1" 200 0 "-" "ELB-HealthChecker/2.0" 500
[8/Sept/2023:13:40:23] 172.26.28.244 - - [08/Sep/2023:13:40:23 +0000] "GET / HTTP/1.1" 200 0 "-" "ELB-HealthChecker/2.0" 597
[8/Sept/2023:13:40:23] 172.26.46.41 - - [08/Sep/2023:13:40:23 +0000] "GET / HTTP/1.1" 200 0 "-" "ELB-HealthChecker/2.0" 597
[8/Sept/2023:13:40:23] 172.26.28.244 - - [08/Sep/2023:13:40:23 +0000] "GET / HTTP/1.1" 200 0 "-" "ELB-HealthChecker/2.0" 598
[8/Sept/2023:13:40:23] 172.26.2.39 - - [08/Sep/2023:13:40:23 +0000] "GET / HTTP/1.1" 200 0 "-" "ELB-HealthChecker/2.0" 509
[8/Sept/2023:13:40:23] 172.26.2.39 - - [08/Sep/2023:13:40:23 +0000] "GET / HTTP/1.1" 200 0 "-" "ELB-HealthChecker/2.0" 602
[8/Sept/2023:13:40:23] 172.26.46.41 - - [08/Sep/2023:13:40:23 +0000] "GET / HTTP/1.1" 200 0 "-" "ELB-HealthChecker/2.0" 602
[8/Sept/2023:13:40:23] 172.26.28.244 - - [08/Sep/2023:13:40:23 +0000] "GET / HTTP/1.1" 200 0 "-" "ELB-HealthChecker/2.0" 513
[8/Sept/2023:13:40:23] 172.26.46.41 - - [08/Sep/2023:13:40:23 +0000] "GET / HTTP/1.1" 200 0 "-" "ELB-HealthChecker/2.0" 606
[8/Sept/2023:13:40:23] 172.26.28.244 - - [08/Sep/2023:13:40:23 +0000] "GET / HTTP/1.1" 200 0 "-" "ELB-HealthChecker/2.0" 3
[8/Sept/2023:13:40:23] 172.26.2.39 - - [08/Sep/2023:13:40:23 +0000] "GET / HTTP/1.1" 200 0 "-" "ELB-HealthChecker/2.0" 2
[8/Sept/2023:13:40:23] 172.26.46.41 - - [08/Sep/2023:13:40:23 +0000] "GET / HTTP/1.1" 200 0 "-" "ELB-HealthChecker/2.0" 4
[8/Sept/2023:13:40:28] [deployment:1] Health checks failed: port 8080 is unhealthy
[8/Sept/2023:13:40:28] 172.26.28.244 - - [08/Sep/2023:13:40:28 +0000] "GET / HTTP/1.1" 200 0 "-" "ELB-HealthChecker/2.0" 5
[8/Sept/2023:13:40:28] 172.26.2.39 - - [08/Sep/2023:13:40:28 +0000] "GET / HTTP/1.1" 200 0 "-" "ELB-HealthChecker/2.0" 3
[8/Sept/2023:13:40:28] 172.26.46.41 - - [08/Sep/2023:13:40:28 +0000] "GET / HTTP/1.1" 200 0 "-" "ELB-HealthChecker/2.0" 2
[8/Sept/2023:13:40:33] 172.26.2.39 - - [08/Sep/2023:13:40:33 +0000] "GET / HTTP/1.1" 200 0 "-" "ELB-HealthChecker/2.0" 1
[8/Sept/2023:13:40:33] 172.26.28.244 - - [08/Sep/2023:13:40:33 +0000] "GET / HTTP/1.1" 200 0 "-" "ELB-HealthChecker/2.0" 3
[8/Sept/2023:13:40:33] 172.26.46.41 - - [08/Sep/2023:13:40:33 +0000] "GET / HTTP/1.1" 200 0 "-" "ELB-HealthChecker/2.0" 1
[8/Sept/2023:13:40:44] [deployment:1] Started 1 new node
[8/Sept/2023:13:40:48] INFO [2023-09-08 13:40:48,328] org.eclipse.jetty.server.AbstractConnector: Stopped application@54b88247{HTTP/1.1, (http/1.1)}{0.0.0.0:8080}
[8/Sept/2023:13:40:48] INFO [2023-09-08 13:40:48,331] org.eclipse.jetty.server.AbstractConnector: Stopped admin@54eea16c{HTTP/1.1, (http/1.1)}{0.0.0.0:8081}
[8/Sept/2023:13:40:48] INFO [2023-09-08 13:40:48,332] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@70b2819f{Admin context,/,null,STOPPED}
[8/Sept/2023:13:40:48] INFO [2023-09-08 13:40:48,342] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@3c9cd930{Application context,/,null,STOPPED}
[8/Sept/2023:13:40:48] INFO [2023-09-08 13:40:48,357] io.appform.dropwizard.actors.base.UnmanagedPublisher: Publisher channel closed for [CUSTOMER_FEED_CREATION] with prefix [nexus.actors]
[8/Sept/2023:13:40:48] INFO [2023-09-08 13:40:48,359] io.appform.dropwizard.actors.base.UnmanagedConsumer: Waiting for handler to complete processing the current message..
[8/Sept/2023:13:40:48] INFO [2023-09-08 13:40:48,360] io.appform.dropwizard.actors.base.UnmanagedConsumer: Consumer channel closed for [CUSTOMER_FEED_CREATION] with prefix [nexus.actors]
[8/Sept/2023:13:40:48] INFO [2023-09-08 13:40:48,361] io.appform.dropwizard.actors.base.UnmanagedConsumer: Waiting for handler to complete processing the current message..
[8/Sept/2023:13:40:48] INFO [2023-09-08 13:40:48,361] io.appform.dropwizard.actors.base.UnmanagedConsumer: Consumer channel closed for [CUSTOMER_FEED_CREATION] with prefix [nexus.actors]
[8/Sept/2023:13:40:48] INFO [2023-09-08 13:40:48,362] io.appform.dropwizard.actors.base.UnmanagedPublisher: Publisher channel closed for [UPDATE_FEED_ETA] with prefix [nexus.actors]
[8/Sept/2023:13:40:48] INFO [2023-09-08 13:40:48,363] io.appform.dropwizard.actors.base.UnmanagedConsumer: Waiting for handler to complete processing the current message..
[8/Sept/2023:13:40:48] INFO [2023-09-08 13:40:48,365] io.appform.dropwizard.actors.base.UnmanagedConsumer: Consumer channel closed for [UPDATE_FEED_ETA] with prefix [nexus.actors]
[8/Sept/2023:13:40:48] INFO [2023-09-08 13:40:48,366] io.appform.dropwizard.actors.base.UnmanagedConsumer: Waiting for handler to complete processing the current message..
[8/Sept/2023:13:40:48] INFO [2023-09-08 13:40:48,367] io.appform.dropwizard.actors.base.UnmanagedConsumer: Consumer channel closed for [UPDATE_FEED_ETA] with prefix [nexus.actors]
[8/Sept/2023:13:40:48] INFO [2023-09-08 13:40:48,369] io.appform.dropwizard.actors.base.UnmanagedPublisher: Publisher channel closed for [SYNC_ORDER_WITH_PAYMENT] with prefix [nexus.actors]
[8/Sept/2023:13:40:48] INFO [2023-09-08 13:40:48,370] io.appform.dropwizard.actors.base.UnmanagedConsumer: Waiting for handler to complete processing the current message..
[8/Sept/2023:13:40:48] INFO [2023-09-08 13:40:48,442] io.appform.dropwizard.actors.base.UnmanagedConsumer: Consumer channel closed for [SYNC_ORDER_WITH_PAYMENT] with prefix [nexus.actors]
[8/Sept/2023:13:40:48] INFO [2023-09-08 13:40:48,444] io.appform.dropwizard.actors.base.UnmanagedConsumer: Waiting for handler to complete processing the current message..
[8/Sept/2023:13:40:48] INFO [2023-09-08 13:40:48,445] io.appform.dropwizard.actors.base.UnmanagedConsumer: Consumer channel closed for [SYNC_ORDER_WITH_PAYMENT] with prefix [nexus.actors]
[8/Sept/2023:13:40:48] INFO [2023-09-08 13:40:48,446] io.appform.dropwizard.actors.base.UnmanagedPublisher: Publisher channel closed for [CREATE_NOTIFICATION] with prefix [nexus.actors]
[8/Sept/2023:13:40:48] INFO [2023-09-08 13:40:48,446] io.appform.dropwizard.actors.base.UnmanagedConsumer: Waiting for handler to complete processing the current message..
[8/Sept/2023:13:40:48] INFO [2023-09-08 13:40:48,447] io.appform.dropwizard.actors.base.UnmanagedConsumer: Consumer channel closed for [CREATE_NOTIFICATION] with prefix [nexus.actors]
[8/Sept/2023:13:40:48] INFO [2023-09-08 13:40:48,448] io.appform.dropwizard.actors.base.UnmanagedConsumer: Waiting for handler to complete processing the current message..
[8/Sept/2023:13:40:48] INFO [2023-09-08 13:40:48,449] io.appform.dropwizard.actors.base.UnmanagedConsumer: Consumer channel closed for [CREATE_NOTIFICATION] with prefix [nexus.actors]
[8/Sept/2023:13:40:48] INFO [2023-09-08 13:40:48,449] io.appform.dropwizard.actors.base.UnmanagedPublisher: Publisher channel closed for [SCHEDULE_RECON] with prefix [nexus.actors]
[8/Sept/2023:13:40:48] INFO [2023-09-08 13:40:48,451] io.appform.dropwizard.actors.base.UnmanagedConsumer: Waiting for handler to complete processing the current message..
[8/Sept/2023:13:40:48] INFO [2023-09-08 13:40:48,452] io.appform.dropwizard.actors.base.UnmanagedConsumer: Consumer channel closed for [SCHEDULE_RECON] with prefix [nexus.actors]
[8/Sept/2023:13:40:48] INFO [2023-09-08 13:40:48,453] io.appform.dropwizard.actors.base.UnmanagedConsumer: Waiting for handler to complete processing the current message..
[8/Sept/2023:13:40:48] INFO [2023-09-08 13:40:48,454] io.appform.dropwizard.actors.base.UnmanagedConsumer: Consumer channel closed for [SCHEDULE_RECON] with prefix [nexus.actors]
[8/Sept/2023:13:40:48] INFO [2023-09-08 13:40:48,455] io.appform.dropwizard.actors.base.UnmanagedPublisher: Publisher channel closed for [DELETE_JOB] with prefix [nexus.actors]
[8/Sept/2023:13:40:48] INFO [2023-09-08 13:40:48,455] io.appform.dropwizard.actors.base.UnmanagedConsumer: Waiting for handler to complete processing the current message..
[8/Sept/2023:13:40:48] INFO [2023-09-08 13:40:48,542] io.appform.dropwizard.actors.base.UnmanagedConsumer: Consumer channel closed for [DELETE_JOB] with prefix [nexus.actors]
[8/Sept/2023:13:40:48] INFO [2023-09-08 13:40:48,544] io.appform.dropwizard.actors.base.UnmanagedConsumer: Waiting for handler to complete processing the current message..
[8/Sept/2023:13:40:48] INFO [2023-09-08 13:40:48,545] io.appform.dropwizard.actors.base.UnmanagedConsumer: Consumer channel closed for [DELETE_JOB] with prefix [nexus.actors]
[8/Sept/2023:13:41:32] INFO [2023-09-08 13:41:32,347] org.eclipse.jetty.util.log: Logging initialized @22166ms to org.eclipse.jetty.util.log.Slf4jLog
[8/Sept/2023:13:41:32] INFO [2023-09-08 13:41:32,753] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: /
[8/Sept/2023:13:41:32] INFO [2023-09-08 13:41:32,755] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: /
[8/Sept/2023:13:41:32] INFO [2023-09-08 13:41:32,764] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/*
[8/Sept/2023:13:41:32] INFO [2023-09-08 13:41:32,765] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-oauth2-connect for path /oauth2-redirect.html/*
[8/Sept/2023:13:41:34] INFO [2023-09-08 13:41:34,555] org.hibernate.Version: HHH000412: Hibernate ORM core version [WORKING]
[8/Sept/2023:13:41:35] INFO [2023-09-08 13:41:35,757] io.dropwizard.hibernate.SessionFactoryFactory: Entity classes: [com.tarkshala.tavahot.db.models.StoredOrder, com.tarkshala.tavahot.db.models.killswitch.StoredKillSwitch, com.tarkshala.tavahot.ms.catalogue.db.models.StoredImage, com.tarkshala.tavahot.ms.catalogue.db.models.StoredRestaurant, com.tarkshala.tavahot.ms.catalogue.db.models.StoredRestaurantDish, com.tarkshala.tavahot.ms.catalogue.db.models.StoredUserRestaurantMapping, com.tarkshala.tavahot.ms.communication.db.models.StoredNotification, com.tarkshala.tavahot.ms.feeds.db.models.StoredCustomerFeed, com.tarkshala.tavahot.ms.feeds.db.models.StoredRestaurantFeed, com.tarkshala.tavahot.ms.payments.db.models.StoredOffer, com.tarkshala.tavahot.ms.payments.db.models.StoredPayment, com.tarkshala.tavahot.ms.userservice.db.models.StoredContact, com.tarkshala.tavahot.ms.userservice.db.models.StoredOtp, com.tarkshala.tavahot.ms.userservice.db.models.StoredSession, com.tarkshala.tavahot.ms.userservice.db.models.StoredUser]
[8/Sept/2023:13:41:35] INFO [2023-09-08 13:41:35,951] org.hibernate.annotations.common.Version: HCANN000001: Hibernate Commons Annotations {5.1.2.Final}
[8/Sept/2023:13:41:38] INFO [2023-09-08 13:41:38,558] org.hibernate.dialect.Dialect: HHH000400: Using dialect: org.hibernate.dialect.MySQL5Dialect
[8/Sept/2023:13:41:38] INFO [2023-09-08 13:41:38,852] Hibernate Types: This framework is proudly powered 
[8/Sept/2023:13:41:38] What if there were a tool that could automatically detect JPA and Hibernate performance issues?
[8/Sept/2023:13:41:38] Hypersistence Optimizer is that tool! For more details, go to:
[8/Sept/2023:13:41:38] https://vladmihalcea.com/hypersistence-optimizer/
[8/Sept/2023:13:41:38] <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
[8/Sept/2023:13:41:47] INFO [2023-09-08 13:41:47,852] io.appform.dropwizard.sharding.healthcheck.HealthCheckManager: db health check added 0
[8/Sept/2023:13:41:47] INFO [2023-09-08 13:41:47,945] io.dropwizard.hibernate.SessionFactoryFactory: Entity classes: [com.tarkshala.tavahot.db.models.StoredOrder, 

Deployment config looks like as following Deployment config

asked 8 months ago59 views
No Answers

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions