# Planning for OpenEMR 5.0.2 release

**URL:** <https://community.open-emr.org/t/planning-for-openemr-5-0-2-release/11858>\
**Category:** OpenEMR Development\
**Created:** [March 29, 2019, 7:26am UTC](https://community.open-emr.org/t/planning-for-openemr-5-0-2-release/11858 "2019-03-29T07:26:25Z")\
**Posts on this page:** 19\
**Page:** 4

<div class="post-metadata">

**Author:** ![brady.miller](https://community.open-emr.org/user_avatar/community.open-emr.org/brady.miller/32/10178_2.png) [@brady.miller](https://community.open-emr.org/u/brady.miller)\
**Post date:** [August 4, 2019, 10:08pm UTC](https://community.open-emr.org/t/planning-for-openemr-5-0-2-release/11858/62 "2019-08-04T22:08:21Z")

</div>

Basically having you try it from another directory to avoid the docker-compose executable that is in that directory (then may be able to simply remove the outdated executable).

---

<div class="post-metadata">

**Author:** ![Ralf\_Lukner](https://community.open-emr.org/user_avatar/community.open-emr.org/ralf_lukner/32/11962_2.png) [@Ralf\_Lukner](https://community.open-emr.org/u/Ralf_Lukner)\
**Post date:** [August 4, 2019, 10:09pm UTC](https://community.open-emr.org/t/planning-for-openemr-5-0-2-release/11858/63 "2019-08-04T22:09:46Z")

</div>

I actually had to install it to begin with because it wasn’t in the path …  
How do I install the correct version of docker without using PowerShell (I don’t know what that is).

---

<div class="post-metadata">

**Author:** ![brady.miller](https://community.open-emr.org/user_avatar/community.open-emr.org/brady.miller/32/10178_2.png) [@brady.miller](https://community.open-emr.org/u/brady.miller)\
**Post date:** [August 4, 2019, 10:10pm UTC](https://community.open-emr.org/t/planning-for-openemr-5-0-2-release/11858/64 "2019-08-04T22:10:42Z")

</div>

Also,

See my post above regarding the database link. The settings in the docker-compose.yaml are used for initial docker run, but will not be used in the upgrade. The database settings need to be modified in the docker itself in the sites/default/sqlconf.php file (since you need to redirect it to the RDS backup instance).

---

<div class="post-metadata">

**Author:** ![brady.miller](https://community.open-emr.org/user_avatar/community.open-emr.org/brady.miller/32/10178_2.png) [@brady.miller](https://community.open-emr.org/u/brady.miller)\
**Post date:** [August 4, 2019, 10:17pm UTC](https://community.open-emr.org/t/planning-for-openemr-5-0-2-release/11858/65 "2019-08-04T22:17:12Z")

</div>

hi,

To help out, what do you see for the following:

```auto
docker --version

```

and

```auto
docker-compose --version

```

(run them both from within the /root/openemr-devops/packages/standard/ directory)

---

<div class="post-metadata">

**Author:** ![Ralf\_Lukner](https://community.open-emr.org/user_avatar/community.open-emr.org/ralf_lukner/32/11962_2.png) [@Ralf\_Lukner](https://community.open-emr.org/u/Ralf_Lukner)\
**Post date:** [August 4, 2019, 10:22pm UTC](https://community.open-emr.org/t/planning-for-openemr-5-0-2-release/11858/66 "2019-08-04T22:22:41Z")

</div>

> [@brady.miller](#):
>
> docker --version

ubuntu@ip-172-31-44-33:~$ docker --version  
Docker version 17.05.0-ce, build 89658be

---

<div class="post-metadata">

**Author:** ![Ralf\_Lukner](https://community.open-emr.org/user_avatar/community.open-emr.org/ralf_lukner/32/11962_2.png) [@Ralf\_Lukner](https://community.open-emr.org/u/Ralf_Lukner)\
**Post date:** [August 4, 2019, 10:24pm UTC](https://community.open-emr.org/t/planning-for-openemr-5-0-2-release/11858/67 "2019-08-04T22:24:10Z")

</div>

> [@brady.miller](#):
>
> docker-compose --version

root@ip-172-31-44-33:/root/openemr-devops/packages/standard# docker-compose --version  
docker-compose version 1.8.0, build unknown

---

<div class="post-metadata">

**Author:** ![Ralf\_Lukner](https://community.open-emr.org/user_avatar/community.open-emr.org/ralf_lukner/32/11962_2.png) [@Ralf\_Lukner](https://community.open-emr.org/u/Ralf_Lukner)\
**Post date:** [August 4, 2019, 10:25pm UTC](https://community.open-emr.org/t/planning-for-openemr-5-0-2-release/11858/68 "2019-08-04T22:25:47Z")

</div>

I’m running into another issue where the new EC2 instance cannot “see” the databases. On going to the web server I get the following error:  
Check that you can ping the server [5-0-2-2019-08-04.cydpnbzyq3qr.us-east-1.rds.amazonaws.com](http://5-0-2-2019-08-04.cydpnbzyq3qr.us-east-1.rds.amazonaws.com).

Which, sure enough, I cannot ping … Probably because I’m not on the correct network with the database server…

---

<div class="post-metadata">

**Author:** ![brady.miller](https://community.open-emr.org/user_avatar/community.open-emr.org/brady.miller/32/10178_2.png) [@brady.miller](https://community.open-emr.org/u/brady.miller)\
**Post date:** [August 4, 2019, 10:29pm UTC](https://community.open-emr.org/t/planning-for-openemr-5-0-2-release/11858/69 "2019-08-04T22:29:09Z")

</div>

Sounds like we need @jesdynf to help with the backup ec2/database instance 🙂

---

<div class="post-metadata">

**Author:** ![Ralf\_Lukner](https://community.open-emr.org/user_avatar/community.open-emr.org/ralf_lukner/32/11962_2.png) [@Ralf\_Lukner](https://community.open-emr.org/u/Ralf_Lukner)\
**Post date:** [August 4, 2019, 10:35pm UTC](https://community.open-emr.org/t/planning-for-openemr-5-0-2-release/11858/70 "2019-08-04T22:35:33Z")

</div>

I’m also going to ask Amazon AWS support … They are usually pretty good but it takes about 24 hours to get an answer.  
–RBL

---

<div class="post-metadata">

**Author:** ![jesdynf](https://community.open-emr.org/user_avatar/community.open-emr.org/jesdynf/32/15698_2.png) [@jesdynf](https://community.open-emr.org/u/jesdynf)\
**Post date:** [August 5, 2019, 1:09am UTC](https://community.open-emr.org/t/planning-for-openemr-5-0-2-release/11858/71 "2019-08-05T01:09:35Z")

</div>

When you launched Standard, CloudFormation created a VPC and several subnets and security groups. Your snapshot instance needs to share all of these things, or the OpenEMR instance won’t be able to connect to it.

Mind that I didn’t say “IP” – the snapshot will have a unique IP, but it has to be part of the VPC and subnet (to make it addressable) and it has to be part of the security groups (to make it connectable).

---

<div class="post-metadata">

**Author:** ![Ralf\_Lukner](https://community.open-emr.org/user_avatar/community.open-emr.org/ralf_lukner/32/11962_2.png) [@Ralf\_Lukner](https://community.open-emr.org/u/Ralf_Lukner)\
**Post date:** [August 5, 2019, 2:26am UTC](https://community.open-emr.org/t/planning-for-openemr-5-0-2-release/11858/72 "2019-08-05T02:26:59Z")

</div>

I started over, making sure that I have the consistent VPC and subnets, and that seems to have launched me past that database connectivity problem for now.

The ssl configuration of the replicated EC2 image is redirecting to the secure connection … in other words it won’t allow a http connection to the replicated image and immediately redirects to my domain with a https:// and I cannot remember how to “undo” this behavior. I know there must be a .cnf or .conf file somewhere that controls the redirection of http to https (forcing a https connection).

Update — I eliminated a .htaccess file and modified all the relevant .conf and .cnf files I could find. Finally sent a message to Amazon Tech Support to help me out on this.  
–Ralf

---

<div class="post-metadata">

**Author:** ![Ralf\_Lukner](https://community.open-emr.org/user_avatar/community.open-emr.org/ralf_lukner/32/11962_2.png) [@Ralf\_Lukner](https://community.open-emr.org/u/Ralf_Lukner)\
**Post date:** [August 12, 2019, 1:34am UTC](https://community.open-emr.org/t/planning-for-openemr-5-0-2-release/11858/73 "2019-08-12T01:34:39Z")

</div>

> [@Ralf\_Lukner](#):
>
> I started over, making sure that I have the consistent VPC and subnets, and that seems to have launched me past that database connectivity problem for now.
> 
> The ssl configuration of the replicated EC2 image is redirecting to the secure connection … in other words it won’t allow a http connection to the replicated image and immediately redirects to my domain with a https:// and I cannot remember how to “undo” this behavior. I know there must be a .cnf or .conf file somewhere that controls the redirection of http to https (forcing a https connection).
> 
> Update — I eliminated a .htaccess file and modified all the relevant .conf and .cnf files I could find. Finally sent a message to Amazon Tech Support to help me out on this.

AWS Tech support helped me out on this (by reading the OpenEMR manual no less)… those folks never cease to amaze me. Anyway, it turns out that there is a ssl configuration in OpenEMR itself and somehow that must be redirecting to the secure site rather than allowing an http connection to the test system. I would need to take this out of the configuration somehow … it’s probably buried in a database table for the openEMR configuration. Rather than go that route, I decided to first take the opportunity to test the backup and restore of 5.0.1(7) to create a new 5.0.1(7) test system that I could then upgrade to 5.0.2.

Sooooo … I created a new Standard OpenEMR 5.0.1-6b (the newest available) instance and database using the AWS Marketplace subscription system that uses Cloudformation. Next, I am patching it to 5.0.1(7). Then I am going to try to restore the backup and upgrade this system as explained by Brady, above.  
–Ralf

---

<div class="post-metadata">

**Author:** ![sjpadgett](https://community.open-emr.org/user_avatar/community.open-emr.org/sjpadgett/32/21623_2.png) [@sjpadgett](https://community.open-emr.org/u/sjpadgett)\
**Post date:** [August 12, 2019, 2:06am UTC](https://community.open-emr.org/t/planning-for-openemr-5-0-2-release/11858/74 "2019-08-12T02:06:12Z")

</div>

If I remember correctly there is an openemr.conf somewhere that redirects port 80 or there is a virtual host for port 80 that redirects.

---

<div class="post-metadata">

**Author:** ![Ralf\_Lukner](https://community.open-emr.org/user_avatar/community.open-emr.org/ralf_lukner/32/11962_2.png) [@Ralf\_Lukner](https://community.open-emr.org/u/Ralf_Lukner)\
**Post date:** [August 12, 2019, 2:15am UTC](https://community.open-emr.org/t/planning-for-openemr-5-0-2-release/11858/75 "2019-08-12T02:15:37Z")

</div>

I was able to modify the openemr.conf file to take out that redirect. However, there is still something else (I removed all .htdirect files also)

---

<div class="post-metadata">

**Author:** ![sjpadgett](https://community.open-emr.org/user_avatar/community.open-emr.org/sjpadgett/32/21623_2.png) [@sjpadgett](https://community.open-emr.org/u/sjpadgett)\
**Post date:** [August 12, 2019, 2:27am UTC](https://community.open-emr.org/t/planning-for-openemr-5-0-2-release/11858/76 "2019-08-12T02:27:36Z")

</div>

I assume there’s a ssl virtual host set up for ssl. Ya sure there is not another vhost conf for port 80?  
Also, wouldn’t access log point you to who is doing redirect?

---

<div class="post-metadata">

**Author:** ![Ralf\_Lukner](https://community.open-emr.org/user_avatar/community.open-emr.org/ralf_lukner/32/11962_2.png) [@Ralf\_Lukner](https://community.open-emr.org/u/Ralf_Lukner)\
**Post date:** [August 12, 2019, 2:57am UTC](https://community.open-emr.org/t/planning-for-openemr-5-0-2-release/11858/77 "2019-08-12T02:57:28Z")

</div>

> [@sjpadgett](#):
>
> I assume there’s a ssl virtual host set up for ssl. Ya sure there is not another vhost conf for port 80?  
> Also, wouldn’t access log point you to who is doing redirect?

Yes, correct. I agree with you that this shouldn’t be so difficult.

I’m going to try the following … (helplessly retrieved from [Troubleshooting apache redirects in production - Server Fault](https://serverfault.com/questions/11332/troubleshooting-apache-redirects-in-production))

To log what’s going on in the **mod\_rewrite** module you need to set [RewriteLog](http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html#rewritelog) and [RewriteLogLevel](http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html#rewriteloglevel):

```auto
RewriteLog /path/to/mod_rewrite.log
RewriteLogLevel 2

```

I killed those test instances, but I can easily re-create them. I’m going to snapshot the current AWS production web server EC2 instance and image the MySQL database/instance and re-create that particular system and take another look. I’ll show you what I modify, and what the result is so I can troubleshoot this in more detail.  
–Ralf

---

<div class="post-metadata">

**Author:** ![Ralf\_Lukner](https://community.open-emr.org/user_avatar/community.open-emr.org/ralf_lukner/32/11962_2.png) [@Ralf\_Lukner](https://community.open-emr.org/u/Ralf_Lukner)\
**Post date:** [August 12, 2019, 3:46am UTC](https://community.open-emr.org/t/planning-for-openemr-5-0-2-release/11858/78 "2019-08-12T03:46:11Z")

</div>

> [@Ralf\_Lukner](#):
>
> > I assume there’s a ssl virtual host set up for ssl. Ya sure there is not another vhost conf for port 80?  
> > Also, wouldn’t access log point you to who is doing redirect?
> 
> Yes, correct. I agree with you that this shouldn’t be so difficult.

I reverted to the original openemr.conf and ssl.conf … renamed the .htaccess file to SSLhtaccess restarted docker … and it worked on the test system webserver EC2 instance … no more undesired redirect!

Thank you!

Now I need to connect the test system to the test database instance (it is connecting to the production database initially because this is from a snapshot … need to change the configuration to connect to the MySQL database that was created from the production database image.  
–Ralf

---

<div class="post-metadata">

**Author:** ![sjpadgett](https://community.open-emr.org/user_avatar/community.open-emr.org/sjpadgett/32/21623_2.png) [@sjpadgett](https://community.open-emr.org/u/sjpadgett)\
**Post date:** [August 12, 2019, 3:52am UTC](https://community.open-emr.org/t/planning-for-openemr-5-0-2-release/11858/79 "2019-08-12T03:52:21Z")

</div>

Good deal.  
I find using netcat and pings very helpful along with traceroute for these type issues.  
Good luck.

---

<div class="post-metadata">

**Author:** ![Ralf\_Lukner](https://community.open-emr.org/user_avatar/community.open-emr.org/ralf_lukner/32/11962_2.png) [@Ralf\_Lukner](https://community.open-emr.org/u/Ralf_Lukner)\
**Post date:** [August 12, 2019, 5:53am UTC](https://community.open-emr.org/t/planning-for-openemr-5-0-2-release/11858/80 "2019-08-12T05:53:52Z")

</div>

> [@brady.miller](#):
>
> Very cool. Make a backup ec2(along with RDS) of your instance and then try the below upgrade on that (ensure you use a backup RDS or else it will upgrade your original database).
> 
> To do the upgrade will involve following steps:  
> **Step 1** - Go into directory
> 
> ```auto
> cd /root/openemr-devops/packages/standard/
> 
> ```
> 
> **Step 2** - Modify docker-compose.yaml file  
> Change the `image: openemr/openemr:5.0.1` line in docker-compose.yaml to:  
> `image: openemr/openemr:5.0.2`  
> **Step 3** - Bring in the new docker (which will auto-upgrade it)
> 
> ```auto
> docker-compose up -d
> 
> ```
> 
> **Step 4** - Ensure it worked by checking the log
> 
> ```auto
> docker logs standard_openemr_1
> 
> ```

Ok. So I have an AWS EC2/RDS(MySQL) test system now thanks to substantial help from everyone above.

Now I’m trying to do the upgrade on the test system as explained by @brady.miller above …  
Step 1 - DONE: sudo bash … then cd /root/openemr-devops/packages/standard/ as given by brady.  
Step 2 - DONE: Modify docker-compose.yaml file  
Change the `image: openemr/openemr:5.0.1` line in docker-compose.yaml to:  
`image: openemr/openemr:5.0.2`  
Step 3 - DONE:  
**root@ip-10-0-1-179** : **/root/openemr-devops/packages/standard** # /root/openemr-devops/packages/standard/docker-compose up -d

Removing elegant\_goldstine

Removing nervous\_elion

Removing affectionate\_carson

Removing epic\_kalam

Removing eloquent\_mcnulty

Pulling openemr (openemr/openemr:5.0.2)…

5.0.2: Pulling from openemr/openemr

050382585609: Pull complete

4d61f28ee280: Pull complete

76e61a049383: Pull complete

bf5110788d99: Pull complete

0f871c9e49bb: Pull complete

61236122513d: Pull complete

343af72d1676: Pull complete

3ab4fbedcac6: Pull complete

9af2c76c95e8: Pull complete

b8fe35ac4f01: Pull complete

553e8e64c900: Pull complete

9674cacacb05: Pull complete

9ce5ad550ce6: Pull complete

Digest: sha256:616140a6039bb381ef1efecb573e4e30aa2e207c14339818d205664235c05430

Status: Downloaded newer image for openemr/openemr:5.0.2

Recreating standard\_openemr\_1 …

Recreating standard\_openemr\_1 … done

**root@ip-10-0-1-179** : **/root/openemr-devops/packages/standard** #OpenEMR Development

Then  
docker logs standard\_openemr\_1

Plan to try an upgrade from 0 to 1

Attempting upgrade

Start: Processing fsupgrade-1.sh upgrade script

Start: Upgrade to docker-version 1

Start: Ensure have all directories in default

Completed: Ensure have all directories in default

Start: Update new directory structure in default

Completed: Update new directory structure in default

Start: Clear smarty cache in default … etc. etc. (lots of information)…

……  
Completed: Upgrade database for default from 5.0.1

Completed: Upgrade to docker-version 1

Completed: Processing fsupgrade-1.sh upgrade script

Completed upgrade

Setting user ‘www’ as owner of openemr/ and setting file/dir permissions to 400/500

Default file permissions and ownership set, allowing writing to specific directories

Removing remaining setup scripts

Setup scripts removed, we should be ready to go now!

Love OpenEMR? You can now support the project via the open collective:

\> [Contribute - Open Collective](https://opencollective.com/openemr/donate)

Starting cron daemon!

Starting apache!

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

Looks like it worked.

Now try it out…  
Seems to work well. I will test this test system out for a few days before I upgrade the production system.

Thank you, everyone!!  
–Ralf

[Previous page](https://community.open-emr.org/t/planning-for-openemr-5-0-2-release/11858.md?page=3)
