# Failed container in Mender prod deloyment

**URL:** <https://hub.mender.io/t/failed-container-in-mender-prod-deloyment/1784>\
**Category:** General Discussions\
**Tags:** mender-server\
**Created:** [April 14, 2020, 7:54am UTC](https://hub.mender.io/t/failed-container-in-mender-prod-deloyment/1784 "2020-04-14T07:54:11Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![vikram](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/vikram/32/572_2.png) [@vikram](https://hub.mender.io/u/vikram)\
**Post date:** [April 14, 2020, 7:54am UTC](https://hub.mender.io/t/failed-container-in-mender-prod-deloyment/1784/1 "2020-04-14T07:54:11Z")

</div>

![mender_container_fail](https://canada1.discourse-cdn.com/flex036/uploads/mender/original/1X/4d4680cc4e19155aec3de2ee20d4775faaf8ef68.jpeg)

Hi,  
I have followed this link [https://docs.mender.io/2.3/administration/production-installation](https://docs.mender.io/2.3/administration/production-installation) to install mender production in ec2 instance. Everything worked but when i do docker ps, i could see a container **(mendersoftware/deployments:1.9.0)** is restarting continuously. I was able to access the mender login screen although.

I have attached the **docker ps** output image and logs

> WARNING: ca-certificates.crt does not contain exactly one certificate or CRL: skipping
> 
> ```
> time="2020-04-14T07:30:06Z" level=info msg="Deployments Service, version unknown starting up"
> 
> time="2020-04-14T07:30:06Z" level=info msg="automigrate is ON, will apply migrations" file=migrations.go func=mongo.Migrate line=48
> 
> time="2020-04-14T07:30:06Z" level=info msg="migrating deployment_service" file=migrations.go func=mongo.MigrateSingle line=70
> 
> time="2020-04-14T07:30:06Z" level=info msg="got info: '{1.2.1 2020-04-14 07:29:59.782 +0000 UTC}'" file=db.go func=migrate.GetMigrationInfo line=63
> 
> time="2020-04-14T07:30:06Z" level=info msg="got info: '{1.2.2 2020-04-14 07:30:00.207 +0000 UTC}'" file=db.go func=migrate.GetMigrationInfo line=63
> 
> time="2020-04-14T07:30:06Z" level=info msg="migration to version 1.2.1 skipped" db=deployment_service file=migrator_simple.go func="migrate.(*SimpleMigrator).Apply" lin
> 
> e=125
> 
> time="2020-04-14T07:30:06Z" level=info msg="migration to version 1.2.2 skipped" db=deployment_service file=migrator_simple.go func="migrate.(*SimpleMigrator).Apply" lin
> 
> e=125
> 
> time="2020-04-14T07:30:06Z" level=info msg="DB migrated to version 1.2.2" db=deployment_service file=migrator_simple.go func="migrate.(*SimpleMigrator).Apply" line=140
> 
> RequestError: send request failed
> 
> caused by: Put https://:9000/mender-artifact-storage: dial tcp :9000: connect: connection refused
> 
> WARNING: ca-certificates.crt does not contain exactly one certificate or CRL: skipping
> 
> time="2020-04-14T07:30:09Z" level=info msg="Deployments Service, version unknown starting up"
> 
> time="2020-04-14T07:30:09Z" level=info msg="automigrate is ON, will apply migrations" file=migrations.go func=mongo.Migrate line=48
> 
> time="2020-04-14T07:30:09Z" level=info msg="migrating deployment_service" file=migrations.go func=mongo.MigrateSingle line=70
> 
> time="2020-04-14T07:30:09Z" level=info msg="got info: '{1.2.1 2020-04-14 07:29:59.782 +0000 UTC}'" file=db.go func=migrate.GetMigrationInfo line=63
> 
> time="2020-04-14T07:30:09Z" level=info msg="got info: '{1.2.2 2020-04-14 07:30:00.207 +0000 UTC}'" file=db.go func=migrate.GetMigrationInfo line=63
> 
> time="2020-04-14T07:30:09Z" level=info msg="migration to version 1.2.1 skipped" db=deployment_service file=migrator_simple.go func="migrate.(*SimpleMigrator).Apply" lin
> 
> e=125
> 
> time="2020-04-14T07:30:09Z" level=info msg="migration to version 1.2.2 skipped" db=deployment_service file=migrator_simple.go func="migrate.(*SimpleMigrator).Apply" lin
> 
> e=125
> 
> time="2020-04-14T07:30:09Z" level=info msg="DB migrated to version 1.2.2" db=deployment_service file=migrator_simple.go func="migrate.(*SimpleMigrator).Apply" line=140
> 
> RequestError: send request failed
> 
> caused by: Put https://:9000/mender-artifact-storage: dial tcp :9000: connect: connection refused
> 
> WARNING: ca-certificates.crt does not contain exactly one certificate or CRL: skipping
> 
> time="2020-04-14T07:30:14Z" level=info msg="Deployments Service, version unknown starting up"
> 
> time="2020-04-14T07:30:14Z" level=info msg="automigrate is ON, will apply migrations" file=migrations.go func=mongo.Migrate line=48
> 
> time="2020-04-14T07:30:14Z" level=info msg="migrating deployment_service" file=migrations.go func=mongo.MigrateSingle line=70
> 
> time="2020-04-14T07:30:14Z" level=info msg="got info: '{1.2.1 2020-04-14 07:29:59.782 +0000 UTC}'" file=db.go func=migrate.GetMigrationInfo line=63''''
> 
> ```
> 
> ‘’‘’

---

<div class="post-metadata">

**Author:** ![mirzak](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/mirzak/32/2056_2.png) [@mirzak](https://hub.mender.io/u/mirzak)\
**Post date:** [April 14, 2020, 8:36am UTC](https://hub.mender.io/t/failed-container-in-mender-prod-deloyment/1784/2 "2020-04-14T08:36:59Z")

</div>

Hi @vikram,

> I have followed this link to install mender production in ec2 instance

There is no link available in above. Could you please share it again.

---

<div class="post-metadata">

**Author:** ![vikram](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/vikram/32/572_2.png) [@vikram](https://hub.mender.io/u/vikram)\
**Post date:** [April 14, 2020, 8:58am UTC](https://hub.mender.io/t/failed-container-in-mender-prod-deloyment/1784/3 "2020-04-14T08:58:48Z")

</div>

Hi sorry that i have missed the link. Here it is [Production installation](https://docs.mender.io/2.3/administration/production-installation)

I have successfully executed all the steps mentioned in the tutorial for open source mender deployment in EC2 instance

---

<div class="post-metadata">

**Author:** ![peter](https://avatars.discourse-cdn.com/v4/letter/p/278dde/32.png) [@peter](https://hub.mender.io/u/peter)\
**Post date:** [April 14, 2020, 1:58pm UTC](https://hub.mender.io/t/failed-container-in-mender-prod-deloyment/1784/4 "2020-04-14T13:58:22Z")

</div>

Hello Vikram!

thanks for using Mender.

> [@vikram](#):
>
> https://:9000/mender-artifact-storage:

the above log line seems to be pointing to bad minio (or other s3 storage) configuration, do you have minio (or tother s3 storage) configured and DEPLOYMENTS\_AWS\_URI is pointing to it?

peter

---

<div class="post-metadata">

**Author:** ![vikram](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/vikram/32/572_2.png) [@vikram](https://hub.mender.io/u/vikram)\
**Post date:** [April 14, 2020, 2:46pm UTC](https://hub.mender.io/t/failed-container-in-mender-prod-deloyment/1784/5 "2020-04-14T14:46:53Z")

</div>

Hi Peter,  
As mentioned in the tutorial, i have configured these 2 parameters with my ec2 instance’s public dns: [ec2-xxxx-xxxx-xxxx.compute-1.amazonaws.com](http://ec2-xxxx-xxxx-xxxx.compute-1.amazonaws.com)  
As i’m not using any s3 storage, used the same value for both of them.

> API\_GATEWAY\_DOMAIN\_NAME=“[ec2-xxxx-xxxx-xxxx.compute-1.amazonaws.com](http://ec2-xxxx-xxxx-xxxx.compute-1.amazonaws.com)” # NB! replace with your server’s public domain name  
> STORAGE\_PROXY\_DOMAIN\_NAME=“$API\_GATEWAY\_DOMAIN\_NAME” # change if you are hosting the Storage Proxy on a different domain name (not the default)

In case if i have to use s3 and configure the same, kindly let me know the procedure as i’m new to Mender

---

<div class="post-metadata">

**Author:** ![peter](https://avatars.discourse-cdn.com/v4/letter/p/278dde/32.png) [@peter](https://hub.mender.io/u/peter)\
**Post date:** [April 14, 2020, 3:29pm UTC](https://hub.mender.io/t/failed-container-in-mender-prod-deloyment/1784/6 "2020-04-14T15:29:12Z")

</div>

Hi,

[https://docs.mender.io/2.3/administration/production-installation#deployments-service](https://docs.mender.io/2.3/administration/production-installation#deployments-service)  
I would suggest to start with minio:  
[https://docs.mender.io/2.3/administration/production-installation#minio](https://docs.mender.io/2.3/administration/production-installation#minio)

peter

---

<div class="post-metadata">

**Author:** ![vikram](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/vikram/32/572_2.png) [@vikram](https://hub.mender.io/u/vikram)\
**Post date:** [April 14, 2020, 4:42pm UTC](https://hub.mender.io/t/failed-container-in-mender-prod-deloyment/1784/7 "2020-04-14T16:42:43Z")

</div>

Hello Peter,  
Thanks for your support.  
I was able to fix the issue!  
The issue is with the sed command not replacing some of the keys like `DEPLOYMENTS_AWS_URI`. I have manually replaced some keys and verified config/prod.yaml file. Now all containers are up!!!

---

<div class="post-metadata">

**Author:** ![peter](https://avatars.discourse-cdn.com/v4/letter/p/278dde/32.png) [@peter](https://hub.mender.io/u/peter)\
**Post date:** [April 14, 2020, 6:37pm UTC](https://hub.mender.io/t/failed-container-in-mender-prod-deloyment/1784/8 "2020-04-14T18:37:07Z")

</div>

Hi Vikram!

great to hear it! I hope you will enjoy Mender.  
let me know if there are any things you would like to discuss.

peter

---

<div class="post-metadata">

**Author:** ![vikram](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/vikram/32/572_2.png) [@vikram](https://hub.mender.io/u/vikram)\
**Post date:** [April 14, 2020, 6:51pm UTC](https://hub.mender.io/t/failed-container-in-mender-prod-deloyment/1784/9 "2020-04-14T18:51:49Z")

</div>

I have few questions here

1. I need to setup mender in my organization where VMs don’t have access to public internet to pull latest images for Mender. In that case how can i manage this scenario?
2. Also i have been using ec2 instance’s DNS in the prod.yaml file while deploying using AWS. If i need to run this locally in my organization what should be this DNS filed to be updated in the yaml file? localhost??

---

<div class="post-metadata">

**Author:** ![peter](https://avatars.discourse-cdn.com/v4/letter/p/278dde/32.png) [@peter](https://hub.mender.io/u/peter)\
**Post date:** [April 28, 2020, 6:22pm UTC](https://hub.mender.io/t/failed-container-in-mender-prod-deloyment/1784/10 "2020-04-28T18:22:51Z")

</div>

I believe you solved that issue and there was another post about it.

peter
