# Cannot start Docker

**URL:** <https://community.open-emr.org/t/cannot-start-docker/18967>\
**Category:** Support\
**Created:** [August 13, 2022, 10:40am UTC](https://community.open-emr.org/t/cannot-start-docker/18967 "2022-08-13T10:40:13Z")\
**Posts on this page:** 20\
**Page:** 6

<div class="post-metadata">

**Author:** ![stephenwaite](https://community.open-emr.org/user_avatar/community.open-emr.org/stephenwaite/32/15754_2.png) [@stephenwaite](https://community.open-emr.org/u/stephenwaite)\
**Post date:** [September 1, 2022, 6:08pm UTC](https://community.open-emr.org/t/cannot-start-docker/18967/103 "2022-09-01T18:08:14Z")

</div>

try logging into openemr on the home computer and while logged in run the docker exec command that will list the keys in that folder

---

<div class="post-metadata">

**Author:** ![rdh61](https://community.open-emr.org/user_avatar/community.open-emr.org/rdh61/32/11407_2.png) [@rdh61](https://community.open-emr.org/u/rdh61)\
**Post date:** [September 1, 2022, 6:31pm UTC](https://community.open-emr.org/t/cannot-start-docker/18967/104 "2022-09-01T18:31:09Z")

</div>

![Screenshot_2022-09-01_20-29-11](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/3X/8/9/89ccc92a343890f3523222ad96dfee91d80cf6d7.png)

```auto
robert@robert-ideacentre-AIO-520-22IKU:~$ docker exec -it $(docker ps | grep _openemr | cut -f 1 -d " ") ls -lrt sites/default/documents/logs_and_misc/methods
total 4
-rwx------ 1 apache 1000 63 Sep 30 2018 README.md
robert@robert-ideacentre-AIO-520-22IKU:~$

```

---

<div class="post-metadata">

**Author:** ![stephenwaite](https://community.open-emr.org/user_avatar/community.open-emr.org/stephenwaite/32/15754_2.png) [@stephenwaite](https://community.open-emr.org/u/stephenwaite)\
**Post date:** [September 1, 2022, 8:00pm UTC](https://community.open-emr.org/t/cannot-start-docker/18967/105 "2022-09-01T20:00:10Z")

</div>

we can try debugging by using the nano text editor which is hopefully installed in your docker

1. logout of openemr
2. in terminal : `docker exec -it $(docker ps | grep _openemr | cut -f 1 -d " ") nano src/Common/Crypto/CryptoGen.php`
3. hold the `<Ctrl>` key and hit the / (forward slash)
4. type 466 and hit enter to go to that line #
5. insert this debugging line above that line

```auto
error_log("about to decrypt drive key " . file_get_contents($GLOBALS['OE_SITE_DIR'] . "/documents/logs_and_misc/methods/" . $label));

```

1. `<Ctrl>` x to save, Y to save modified buffer, enter to use the file name
2. refresh openemr login page ( this will look for keys)
3. back to terminal and look in error log with this command

```auto
docker exec -it $(docker ps | grep _openemr | cut -f 1 -d " ") tail /var/log/apache2/error.log

```

---

<div class="post-metadata">

**Author:** ![rdh61](https://community.open-emr.org/user_avatar/community.open-emr.org/rdh61/32/11407_2.png) [@rdh61](https://community.open-emr.org/u/rdh61)\
**Post date:** [September 2, 2022, 5:39am UTC](https://community.open-emr.org/t/cannot-start-docker/18967/106 "2022-09-02T05:39:20Z")

</div>

> [@stephenwaite](#):
>
> we can try debugging by using the nano text editor which is hopefully installed in your docker

robert@robert-ideacentre-AIO-520-22IKU:~$ docker exec -it $(docker ps | grep \_openemr | cut -f 1 -d " ") nano src/Common/Crypto/CryptoGen.php  
OCI runtime exec failed: exec failed: container\_linux.go:380: starting container process caused: exec: “nano”: executable file not found in $PATH: unknown  
robert@robert-ideacentre-AIO-520-22IKU:~$

---

<div class="post-metadata">

**Author:** ![snailwell](https://community.open-emr.org/letter_avatar_proxy/v4/letter/s/e19adc/32.png) [@snailwell](https://community.open-emr.org/u/snailwell)\
**Post date:** [September 2, 2022, 12:57pm UTC](https://community.open-emr.org/t/cannot-start-docker/18967/107 "2022-09-02T12:57:31Z")

</div>

The default openemr container only has vi, not nano :(.

---

<div class="post-metadata">

**Author:** ![stephenwaite](https://community.open-emr.org/user_avatar/community.open-emr.org/stephenwaite/32/15754_2.png) [@stephenwaite](https://community.open-emr.org/u/stephenwaite)\
**Post date:** [September 2, 2022, 1:00pm UTC](https://community.open-emr.org/t/cannot-start-docker/18967/108 "2022-09-02T13:00:04Z")

</div>

how about

```auto
docker exec -it $(docker ps | grep _openemr | cut -f 1 -d " ") apk add nano
```

---

<div class="post-metadata">

**Author:** ![rdh61](https://community.open-emr.org/user_avatar/community.open-emr.org/rdh61/32/11407_2.png) [@rdh61](https://community.open-emr.org/u/rdh61)\
**Post date:** [September 2, 2022, 2:53pm UTC](https://community.open-emr.org/t/cannot-start-docker/18967/109 "2022-09-02T14:53:41Z")

</div>

Debugging line successfully inserted.

```auto
robert@robert-ideacentre-AIO-520-22IKU:~$ docker exec -it $(docker ps | grep _openemr | cut -f 1 -d " ") tail /var/log/apache2/error.log

AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 172.18.0.2. Set the 'ServerName' directive globally to suppress this message
[Thu Sep 01 16:15:10.773522 2022] [core:warn] [pid 12] AH00098: pid file /run/apache2/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Thu Sep 01 16:15:10.856124 2022] [mpm_prefork:notice] [pid 12] AH00163: Apache/2.4.54 (Unix) OpenSSL/1.1.1q configured -- resuming normal operations
[Thu Sep 01 16:15:10.856179 2022] [core:notice] [pid 12] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 172.18.0.2. Set the 'ServerName' directive globally to suppress this message
[Fri Sep 02 05:15:19.859319 2022] [mpm_prefork:notice] [pid 13] AH00163: Apache/2.4.54 (Unix) OpenSSL/1.1.1q configured -- resuming normal operations
[Fri Sep 02 05:15:19.859394 2022] [core:notice] [pid 13] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 172.18.0.2. Set the 'ServerName' directive globally to suppress this message
[Fri Sep 02 14:40:01.794233 2022] [mpm_prefork:notice] [pid 12] AH00163: Apache/2.4.54 (Unix) OpenSSL/1.1.1q configured -- resuming normal operations
[Fri Sep 02 14:40:01.794268 2022] [core:notice] [pid 12] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
robert@robert-ideacentre-AIO-520-22IKU:~$

```

---

<div class="post-metadata">

**Author:** ![stephenwaite](https://community.open-emr.org/user_avatar/community.open-emr.org/stephenwaite/32/15754_2.png) [@stephenwaite](https://community.open-emr.org/u/stephenwaite)\
**Post date:** [September 2, 2022, 3:41pm UTC](https://community.open-emr.org/t/cannot-start-docker/18967/110 "2022-09-02T15:41:08Z")

</div>

how about

```auto
        error_log("testing crypto constructor " . $this->encryptionVersion . " " . $this->keyVersion);

```

in btw lines 57 and 58 in the `CryptoGen.php` file?

---

<div class="post-metadata">

**Author:** ![rdh61](https://community.open-emr.org/user_avatar/community.open-emr.org/rdh61/32/11407_2.png) [@rdh61](https://community.open-emr.org/u/rdh61)\
**Post date:** [September 2, 2022, 9:17pm UTC](https://community.open-emr.org/t/cannot-start-docker/18967/111 "2022-09-02T21:17:24Z")

</div>

```auto
        error_log("testing crypto constructor " . $this->encryptionVersion . " " . $this->keyVersion);

```

inserted in btw lines 57 and 58 in the `CryptoGen.php` file.

```auto
robert@robert-ideacentre-AIO-520-22IKU:~$ docker exec -it $(docker ps | grep _openemr | cut -f 1 -d " ") tail /var/log/apache2/error.log

AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 172.18.0.2. Set the 'ServerName' directive globally to suppress this message
[Fri Sep 02 05:15:19.859319 2022] [mpm_prefork:notice] [pid 13] AH00163: Apache/2.4.54 (Unix) OpenSSL/1.1.1q configured -- resuming normal operations
[Fri Sep 02 05:15:19.859394 2022] [core:notice] [pid 13] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 172.18.0.2. Set the 'ServerName' directive globally to suppress this message
[Fri Sep 02 14:40:01.794233 2022] [mpm_prefork:notice] [pid 12] AH00163: Apache/2.4.54 (Unix) OpenSSL/1.1.1q configured -- resuming normal operations
[Fri Sep 02 14:40:01.794268 2022] [core:notice] [pid 12] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 172.18.0.3. Set the 'ServerName' directive globally to suppress this message
[Fri Sep 02 18:47:57.104845 2022] [core:warn] [pid 12] AH00098: pid file /run/apache2/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Fri Sep 02 18:47:57.135810 2022] [mpm_prefork:notice] [pid 12] AH00163: Apache/2.4.54 (Unix) OpenSSL/1.1.1q configured -- resuming normal operations
[Fri Sep 02 18:47:57.135948 2022] [core:notice] [pid 12] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
robert@robert-ideacentre-AIO-520-22IKU:~$

```

---

<div class="post-metadata">

**Author:** ![stephenwaite](https://community.open-emr.org/user_avatar/community.open-emr.org/stephenwaite/32/15754_2.png) [@stephenwaite](https://community.open-emr.org/u/stephenwaite)\
**Post date:** [September 2, 2022, 10:33pm UTC](https://community.open-emr.org/t/cannot-start-docker/18967/112 "2022-09-02T22:33:33Z")

</div>

what about `docker ps -a`?

---

<div class="post-metadata">

**Author:** ![rdh61](https://community.open-emr.org/user_avatar/community.open-emr.org/rdh61/32/11407_2.png) [@rdh61](https://community.open-emr.org/u/rdh61)\
**Post date:** [September 3, 2022, 7:33am UTC](https://community.open-emr.org/t/cannot-start-docker/18967/113 "2022-09-03T07:33:39Z")

</div>

```auto
robert@robert-ideacentre-AIO-520-22IKU:~$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
852f705d50c8 openemr/openemr:7.0.0 "./openemr.sh" 13 days ago Up 8 minutes 0.0.0.0:80->80/tcp, :::80->80/tcp, 0.0.0.0:443->443/tcp, :::443->443/tcp openemr_openemr_1
ae8693b8a741 mariadb:10.4 "docker-entrypoint.s…" 10 months ago Up 8 minutes 3306/tcp openemr_mysql_1
robert@robert-ideacentre-AIO-520-22IKU:~$

```

---

<div class="post-metadata">

**Author:** ![rdh61](https://community.open-emr.org/user_avatar/community.open-emr.org/rdh61/32/11407_2.png) [@rdh61](https://community.open-emr.org/u/rdh61)\
**Post date:** [September 3, 2022, 7:37am UTC](https://community.open-emr.org/t/cannot-start-docker/18967/114 "2022-09-03T07:37:53Z")

</div>

Should I perhaps wipe it and set it all up again from scratch?

Or try the regular installation again?

---

<div class="post-metadata">

**Author:** ![rdh61](https://community.open-emr.org/user_avatar/community.open-emr.org/rdh61/32/11407_2.png) [@rdh61](https://community.open-emr.org/u/rdh61)\
**Post date:** [September 8, 2022, 7:12am UTC](https://community.open-emr.org/t/cannot-start-docker/18967/115 "2022-09-08T07:12:37Z")

</div>

So I still do not know:

(1) Why the restore procedure fails to restore the keys to their proper directory.

(2) How it is that I can log into and use openemr normally when the keys are missing.

(3) Whether this is a problem or not.

(4) Whether this is just a chance idiosyncrasy or whether it is a bug in openemr that needs fixing by developers.

Does anybody know?

And importantly to me, what should I do?

Again, thank you.

---

<div class="post-metadata">

**Author:** ![stephenwaite](https://community.open-emr.org/user_avatar/community.open-emr.org/stephenwaite/32/15754_2.png) [@stephenwaite](https://community.open-emr.org/u/stephenwaite)\
**Post date:** [September 8, 2022, 12:28pm UTC](https://community.open-emr.org/t/cannot-start-docker/18967/116 "2022-09-08T12:28:23Z")

</div>

1. maybe the backup didn’t have keys to copy in

2. you can log in and the keys will be created if missing, trying to find where those keys are has been difficult remotely

3. the keys on the drive would only be a problem if you’re saving sensitive data in globals or need to view the log later on down the road

4. not seeing anything that needs fixing yet

a good strategy is to move to a single instance that can be accessed remotely

---

<div class="post-metadata">

**Author:** ![rdh61](https://community.open-emr.org/user_avatar/community.open-emr.org/rdh61/32/11407_2.png) [@rdh61](https://community.open-emr.org/u/rdh61)\
**Post date:** [September 8, 2022, 2:32pm UTC](https://community.open-emr.org/t/cannot-start-docker/18967/117 "2022-09-08T14:32:45Z")

</div>

1. I checked this. sixa and sixb are present in the backup I restored from, in sites/default/documents/logs\_and\_misc/methods in openemr.tar.gz.

2. I notice that the keys are packaged with documents. Does this mean that before I brought in my documents, no keys were needed?

Yes, as previously explained, I would like to move to a single instance that can be accessed remotely. And I would like that to be on my home computer. I would just like some reassurance that I can go ahead and do that despite the “missing” keys issue.

---

<div class="post-metadata">

**Author:** ![stephenwaite](https://community.open-emr.org/user_avatar/community.open-emr.org/stephenwaite/32/15754_2.png) [@stephenwaite](https://community.open-emr.org/u/stephenwaite)\
**Post date:** [September 8, 2022, 4:06pm UTC](https://community.open-emr.org/t/cannot-start-docker/18967/118 "2022-09-08T16:06:32Z")

</div>

the keys aren’t missing since you wouldn’t be able to log in at all

we just haven’t been able to properly execute the command to list them through this channel

---

<div class="post-metadata">

**Author:** ![rdh61](https://community.open-emr.org/user_avatar/community.open-emr.org/rdh61/32/11407_2.png) [@rdh61](https://community.open-emr.org/u/rdh61)\
**Post date:** [September 8, 2022, 4:41pm UTC](https://community.open-emr.org/t/cannot-start-docker/18967/119 "2022-09-08T16:41:55Z")

</div>

So I can safely use this instance as my unique instance to access remotely?

---

<div class="post-metadata">

**Author:** ![stephenwaite](https://community.open-emr.org/user_avatar/community.open-emr.org/stephenwaite/32/15754_2.png) [@stephenwaite](https://community.open-emr.org/u/stephenwaite)\
**Post date:** [September 9, 2022, 12:13pm UTC](https://community.open-emr.org/t/cannot-start-docker/18967/120 "2022-09-09T12:13:45Z")

</div>

will be easier if can follow @jesdynf’s guide for [lightsail](https://github.com/openemr/openemr-devops/tree/master/packages/lightsail)

---

<div class="post-metadata">

**Author:** ![snailwell](https://community.open-emr.org/letter_avatar_proxy/v4/letter/s/e19adc/32.png) [@snailwell](https://community.open-emr.org/u/snailwell)\
**Post date:** [September 9, 2022, 12:50pm UTC](https://community.open-emr.org/t/cannot-start-docker/18967/121 "2022-09-09T12:50:13Z")

</div>

Before starting over, I think I would run

```auto
docker exec -it $(docker ps | grep _openemr | cut -f 1 -d " ") find -name sixa

```

…if only to sate my curiosity.

---

<div class="post-metadata">

**Author:** ![rdh61](https://community.open-emr.org/user_avatar/community.open-emr.org/rdh61/32/11407_2.png) [@rdh61](https://community.open-emr.org/u/rdh61)\
**Post date:** [September 9, 2022, 4:17pm UTC](https://community.open-emr.org/t/cannot-start-docker/18967/122 "2022-09-09T16:17:28Z")

</div>

Gets too involved for me. I’ll leave things as they are. Thanks.

[Previous page](https://community.open-emr.org/t/cannot-start-docker/18967.md?page=5)

[Next page](https://community.open-emr.org/t/cannot-start-docker/18967.md?page=7)
