Errors in upgrade from 4.1.2(7) to 4.2.0

lamspc wrote on Saturday, February 07, 2015:

I had openemr 4.1.2 (7) running on a debian 7 server; followed upgrade instructions to 4.2

After this command
dpkg -i openemr_4.2.0-1_all.deb

the script never completed or stopped

so I followed up with:

$>apt-get -f install
Reading package lists… Done
Building dependency tree
Reading state information… Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up openemr (4.2.0-1) …
dpkg: error processing openemr (–configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
openemr
E: Sub-process /usr/bin/dpkg returned an error code (1)

I dont know what the problem is or how to fix it. I looked into the dpkg.logs and did not get any useful information.

Any help appreciated.

Paul

fsgl wrote on Sunday, February 08, 2015:

Hi Paul,

I ran the script for Linux Mint without difficulty.

What happened when you repeat the download & upgrade?

Your other thread seems to suggest that the upgrade was successful.

lamspc wrote on Sunday, February 08, 2015:

Hi,
despite the errors reported on the installation, openemr otherwise seems to work well - I just did the upgrade a few hours ago and have until Monday when office hours will put it to the real test. However, because it is my ‘production’ installation, these errors make me fear that that all may not be well

bradymiller wrote on Sunday, February 08, 2015:

Hi Paul,

To sort this out, paste what you have in the 2 following files:
/etc/openemr/<the_only_file_here>
/var/log/openemr/<the_only_file_here>

-brady
OpenEMR

lamspc wrote on Sunday, February 08, 2015:

Hello Brady,

/etc/openemr/openemr.conf shows following:

#Optional settings
#(currently empty, plan to use in subsequent versions of OpenEMR)

#Installation settings

(DO NOT EDIT below!!!)

process=complete

The second file /var/log/openemr/install is attached.

Many thanks for trying to troubleshoot.

Paul

bradymiller wrote on Sunday, February 08, 2015:

Hi Paul,

Can you list the names of directories you have in /var/www/openemr/sites/

-brady
OpenEMR

bradymiller wrote on Sunday, February 08, 2015:

Also,

Check out the attached log, where I removed the fluff so you can follow what the script is doing (I also added a couple comments about what is happening).

-brady
OpenEMR

bradymiller wrote on Sunday, February 08, 2015:

Also will be good to know current status of the package:
dpkg -s openemr

lamspc wrote on Sunday, February 08, 2015:

Hi Brady

drwxrwxr-x+ 11 root root 4096 Feb 6 23:26 default
4 drwxr-xr-x 11 root root 4096 Feb 6 23:26 aaaaa
4 drwxr-xr-x 11 root root 4096 Feb 6 23:26 bbbbb
4 drwxr-xr-x 11 root root 4096 Feb 6 23:27 ccccc
4 drwxr-xr-x 11 root root 4096 Feb 6 23:27 ddddd
4 drwxr-xr-x 11 root root 4096 Feb 6 23:27 eeeee

where a, b, c, d and e represent 5 other sites (physician colleagues/friends to whom I introduced openemr). These sites have their own databases.

Paul

lamspc wrote on Sunday, February 08, 2015:

This is what I get:

~$ sudo dpkg -s openemr
Package: openemr
Status: deinstall ok half-configured
Priority: optional
Section: web
Installed-Size: 127000
Maintainer: Brady Miller brady@sparmy.com
Architecture: all
Source: openemr
Version: 4.2.0-1
Config-Version: 4.1.2-1
Depends: mysql-server, apache2-mpm-prefork, makepasswd, libapache2-mod-php5, libdate-calc-perl, libdbd-mysql-perl, libdbi-perl, libhtml-parser-perl, libtiff-tools, libwww-mechanize-perl, libxml-parser-perl, php5, php5-mysql, php5-cli, php5-gd, php5-xsl, php5-curl, php5-mcrypt, php-soap, php5-json, imagemagick
Pre-Depends: debconf
Description: Comprehensive Medical Practice Management Application
OpenEMR provides office scheduling, electronic medical records,
prescriptions, insurance billing, accounting and access controls.
.
To use OpenEMR after installation, go to http://localhost/openemr ,
the user is ‘admin’ and password is ‘pass’ (recommend changing password
after login).
.
The OpenEMR project home page and wiki (documentation) and forums
can be found at http://www.open-emr.org .
Homepage: http://www.open-emr.org/

lamspc wrote on Sunday, February 08, 2015:

Hi Brady,
is there anything odd about following output to dpkg -s openemr

Version: 4.2.0-1
Config-Version: 4.1.2-1

I would have expected the config version to be 4.2.0-1 as well.

Paul

bradymiller wrote on Sunday, February 08, 2015:

Hi,

According to the log of the upgrade, it did everything it needed to do to correctly upgrade your instance of OpenEMR. For some reason, the script then hanged here:

That line should of thrown out a prompt telling you the upgrade was a success. If you never answered the prompt or never saw the prompt then the script would of just hanged there.

One thing I noted when reading the log, which may cause issues on the the OpenEMR side (and completely unrelated to the upgrade), is that you have two of the multisite instances (default and aaaaa) that are using the same database; that could potentially cause weird things to happen for the users(again, is not related to the upgrade).

Definitely do not try to remove the package, though, or else everything(including all the data in the databases) gets removed.

The real goal now is to manually set the package to be correctly installed even though it officially didn’t get to finish the install. Doing this is needed to allow installing/upgrading other debian packages. Are there any debian/ubuntu package gurus out there that know how to do this? I think it involves simply editing a file, but it may be more complicated.

Regarding the Version and Config-Version discrepancy, can somebody (fsgl maybe) please paste what they get when do following command to see what it should look like:
sudo dpkg -s openemr
(This is just a command to give the status of a package and won’t do anything else)

-brady
OpenEMR

bradymiller wrote on Sunday, February 08, 2015:

Hi,

Here’s the meta file for packages:
/var/lib/dpkg/status

I think if you replace it with correct OpenEMR entry in there then it will be “fixed”(ie. ‘apt-get -f install’ should no longer throw errors). I am sort of guessing here, though, and definitely should backup this file and your system before messing around with this file.

-brady
OpenEMR

fsgl wrote on Sunday, February 08, 2015:

Status report:
Package: openemr
Status: install ok installed
Priority: optional
Section: web
Installed-Size: 127000
Maintainer: Brady Miller brady@sparmy.com
Architecture: all
Source: openemr
Version: 4.2.0-1
Depends: mysql-server, apache2-mpm-prefork, makepasswd, libapache2-mod-php5, libdate-calc-perl, libdbd-mysql-perl, libdbi-perl, libhtml-parser-perl, libtiff-tools, libwww-mechanize-perl, libxml-parser-perl, php5, php5-mysql, php5-cli, php5-gd, php5-xsl, php5-curl, php5-mcrypt, php-soap, php5-json, imagemagick
Pre-Depends: debconf
Description: Comprehensive Medical Practice Management Application
OpenEMR provides office scheduling, electronic medical records,
prescriptions, insurance billing, accounting and access controls.
.
To use OpenEMR after installation, go to http://localhost/openemr ,
the user is ‘admin’ and password is ‘pass’ (recommend changing password
after login).
.
The OpenEMR project home page and wiki (documentation) and forums
can be found at http://www.open-emr.org .
Homepage: http://www.open-emr.org/

fsgl wrote on Sunday, February 08, 2015:

Hi Paul,

This is a shot in the dark.

Did you just upgrade the default site & not the other sites as well? See this.

Wouldn’t it be great if this is the answer to both problems?

fsgl wrote on Sunday, February 08, 2015:

Brady,

I have a question for you.

In the Upgrading instructions for multiple sites, the webpage does not state specifically that the default site has to be upgraded first & then the other multiple sites.

It only talks about copying the documents, edi, era & letter_templates folders & upgrading the database for multiple sites.

What happened to the new 4.2.0 web directory?

bradymiller wrote on Sunday, February 08, 2015:

Hi,

The ubuntu package automatically upgrades all the sites, so the multisite upgrade instruction set is not pertinent for the ubuntu package. In Paul’s case, the log file did confirm that all the sites were properly upgraded.

-brady
OpenEMR

bradymiller wrote on Sunday, February 08, 2015:

Hi,

The ordering of upgrading the sites (from admin.php script) is not important. Just important that they all get upgraded.

The multisite upgrade instruction set doesn’t go into explicit version specific details since users of multisite are generally technically inclined; it’s more of an overview of what needs to be done.

(also, to reiterate and avoid confusion, this stuff is not pertinent for the ubuntu/debian package)

-brady
OpenEMR

bradymiller wrote on Sunday, February 08, 2015:

awesome,

So Paul could try to change Status line to:
Status: install ok installed
and
remove the line with:
Config-Version: 4.1.2-1 line

in the /var/lib/dpkg/status file and see what happens (again, back up the original file and backup the system before doing this)

-brady
OpenEMR

fsgl wrote on Monday, February 09, 2015:

Thanks, Brady.

It was a shot in the dark.

So, excluding Ubuntu/Mint/Debian, every site would have to be upgraded in the manner of the default site with the modifications specified in the Multiple Sites article.

The article is confusing because there is no mention of what to do with the new web directory. The article is listed under Configuration Manuals, therefore more likely to be viewed by developers.

Some users are DYI-ers & would need to understand the article as well. It is not necessary for the article to go into excruciating details, but it should provide enough general information so that user can understand the process.