Clean install of 2.3

Dear Forum Members (mainly Tim!!)

I am installing 2.3 on a new production server and having some issues. Like Yuri in the last post on this forum I had to supply the root login to mysql to create the openvpms database as otherwise I hit the same error she did using the openvpms login I had created for the purpose. Nonetheless, the database creation was OK once root was used and the schema creation was verified using mysql workbench.

Once the webapp was installed though and a login attempted I hit an error (screenshot attached) and a null pointer is thrown in the tomcat logs (attached). I very much suspect that this is a database connection issue but I am unsure how to resolve. I have changed the openvpms.properties file to use a root login to mysql and recreated the war file using the toolbox and reinstalled the war file into tomcat. The same error in both the logs and screenshot are to be had though.

 

Any idea of how to proceed much appreciated.

 

Kind regards

 

Chris

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Re: Clean install of 2.3

If this was a new database, did you run the dataload step from https://www.openvpms.org/documentation/csh/2.3/topics/installing-openvpm... ?

 

 

Re: Clean install of 2.3

I believe so. With the base flag set. I have attached a few screen shots of what MIGHT be the relevant tables to demonstrate this but let me know if not. Also I note it says the Schema version does not match the 2.3 version of openvpms I have tried to install. Is this indicative of an error on my part or has the schema version not been updated for the 2.3 version?

 

C

AttachmentSize
Screenshot from 2021-11-16 08-29-50.png 240.86 KB
Screenshot from 2021-11-16 08-29-37.png 249.89 KB
Screenshot from 2021-11-16 08-27-01.png 184.46 KB

Re: Clean install of 2.3

The dataload base command is intended for sites migrating from an existing database.

For sites with no existing data, dataload setup should be run. This creates the practice amongst other things, and should avoid the errors you are seeing.

The difference between dataload base and setup is that the latter also loads <OPENVPMS_HOME>/import/data/setup.xml.

You can load the setup.xml file separately, using:

> cd <OPENVPMS_HOME>/bin
> dataload -f ../import/data/setup.xml

NOTE: if you run dataload multiple times, you will generate duplicates.

Re: Clean install of 2.3

Awesome thanks Tim. I had misunderstood the documentation. As I am migrating data from my existing PMS I had thought base was the appropriate flag.

 

Thanks again

 

Chris

Re: Clean install of 2.3

If you are going to migrate existing data into your new database, then running dataload base is appropriate. But until it has practice, practice location, species, breeds etc loaded from the existing system, it not going to work very well.

Re: Clean install of 2.3

I've found the standard installation instructions confusing and sometimes misleading, leaving out steps (such as root login for mysql).  Thankfully I've been able to play with a new server and have finally got a new install of OpenVPMS 2.3 working - I am SO expert now at Backup System image / Restore System Image to be able to back up a step or two when things don't work.

I figure I'm just an average user, not an IT guru, but I've completely rewritten the Windows install tutorial for v2.3 documenting a couple of "gotchas" that had me burning the midnight oil on several occasions.  I'd welcome constructive criticism.

See https://www.openvpms.org/documentation/installing-openvpms-windows-10

Yuri.

PS Now that I've been able to achieve a new installation, I'll see how I go with moving a current v1.9.3 installation to this new server.

Re: Clean install of 2.3

The instructions for creating the database do indicate that the MySQL administrator password is required i.e.:

toolbox database --create -u <admin-user> -p <admin-password>

...

NOTES

  • replace <admin-user> with a user that has administrator privileges in MySQL and <admin-password> with their password

If I can change it to make it clearer, please let me know.

When moving OpenVPMS to a new server, follow the steps at https://www.openvpms.org/documentation/csh/2.3/topics/installing-openvpm...
Its very important that the upgrade starts with an empty database.

Some points on your walkthrough:
 

Download OpenVPMS Installation And Other Required Files

  • Java 11 is preferred for new installs
  • MySQL 5.7 is preferred for new installs
  • MySQL GUI Tools & MySQL Administrator have been replaced by MySQL Workbench
  • 64-bit versions of software should be installed if the host has > 4GB ram.

3. Open Port 3306 in your Windows Firewall.

  • You only need to do this if Tomcat and OpenVPMS are running on different hosts. You are likely to get better performance if they are running on the same host.
    From a security perspective, its better to isolate the MySQL server as much as possible.

4. Install MySQL

  • Why do you need to change the access permissions to the MySQL Server 5.5 folder? I haven't encountered any issues with MySQL 5.5 or 5.7
  • For security, the MySQL administrator password should be different to that used by OpenVPMS

8. Configure Apache Tomcat

12. OpenVPMS Database Setup

  • The toolbox configure command generates a random password for security
  • The toolbox database --create -u root -p openvpms line could perhaps indicate that the password comes from the MySQL Server Instance Configuration step
  • After running dataload, the admin password should be set to something secure. This can be done with:
    toolbox user --setpassword admin -p somestrongpassword
    

 

Re: Clean install of 2.3

Passwords: I admit to being unsure as to what passwords protect which app and what has to be the same.  I took the coward's way out and made all of them "openvpms" so that I knew the app would start up (and early official OpevVPMS guides similarly took this approach).

If I read it correctly, there's six places for passwords:

  1. Tomcat installation: username=admin password=password1
  2. MySql configuration: username=root hostname=localhost password=password2
  3. Toolbox configure: database user=openvpms password=password3
  4. Toolbox configure: reporting database user=openvpms password=password3 (or is it password4)?
  5. Tomcat Service Setup (Manage | Services | Log on):  account=openvpms password=password5
  6. Openvpms app log on: User=admin password=password6

So what goes with what?  The official installation guide isn't clear to a simple joe-schmo like me on the relationships so that you know what passwords can be/should be the same.  Using the numbered list above please match password with app.

If you save a SQL with one password can it be restored to an OpenVPMS which has a different password?
Or do you restore backup with old passwords in place and then change passwords?

 

Re: Clean install of 2.3

1. is only required if you want to use the Tomcat Manager web application

5. isn't required. Tomcat can be run as a Local Service

3 + 4 are the logins that OpenVPMS uses to connect to MySQL. They should be different to the MySQL administrator account.

At present, 3 + 4 can be the same or different, depending on the security requirements of the organisation.
The reporting user exists for sites that replicate the database to another one for  backup and reporting purposes. The toolbox utility won't create it if it is not present. In future, we may require that the reporting user is a different user, with reduced access.

6. is the OpenVPMS administrator user. It should have a different password to all of the above.

You can transfer OpenVPMS databases to another host, but you also need to make sure you transfer the <OPENVPMS_HOME>/conf/openvpms.properties file as well. Failure to do so will mean that when you upgrade to a new version, you won't be able to decrypt 3rd party passwords e.g those used to connect to email servers, SmartflowSheet, IDEXX, Zoetis, Deputy etc.

Re: Clean install of 2.3

Tim asked:

"Why do you need to change the access permissions to the MySQL Server 5.5 folder? I haven't encountered any issues with MySQL 5.5 or 5.7"

Google "mysql 5.5 not starting" to find lots of users with that issue.  It took me ages to work out how to get past this step.  Became very adept at system image restorations as I tried different ways to get past this step.

The solution turned out to be so simple.

I normally don't save or post screenshots of steps that DON'T work (I could probably triple the length of a tutorial if I did) but here's proof that this bug/error is 100% reproducible.  I performed the MySQL 5.5 install and configuration on a different PC at work (a new Win10 Pro 16MB Dell XPS desktop so not a PC I built myself - this to eliminate me as the cause of the error as my new server is my assmbly).

Without changing permissions and moving straight from install to configuration as per default this is what I got at the final configuration step:

It was only that I read down one of the replies on StackOverflow where a posted  log mentioned access issues that I decided to check access permissions before running the configuration.  Setting the permissions to RW meant that the configuration app ran perfectly to completion.  As I said - so simple to fix.

Edit: and this was with both UAC turned off and elevated administrator privileges  turned on.

Re: Clean install of 2.3

I haven't seen this although I always install from a Local Account with Administrator access.

Re: Clean install of 2.3

Such a quaint and helpful error message laugh!  (I seem to be able to find all these "interesting features" - or they find me).

I increased max_allowed_packet in MySQL Admin | Startup Variables | Advanced Networking from the default 16M to 64M, rebooted the server and the restore backup ran smoothly to completion.  I'm wondering if the database has a large video or Dicom file in it somewhere which caused MySQL to "go for an early lunch".

Re: Clean install of 2.3

It actually doesnt take a very big file to cause this error.  My max packet is now set pretty high by default. Our databases are getting huge because we file so many documents - I often wonder if this is something we need to readdress in design.

 

Regards
 
Ben 
OpenVPMS Installer and Helper 
Ph: +61423044823 
Email: info[at]charltonit.com[dot]au

Re: Clean install of 2.3

After a few days running old and new server in parallel I'm going to do the big changeover over Christmas break.  Just did a final upgrade to 2.3.0.5/

One last question (I hope): in previous versions of OV (1.9.3 and earlier) commenting out the ScheduleTable.Selected parameter  in default.stylesheet meant we didn't switch to cream on selection, just had bold italic text on whatever background was already there (forum post https://www.openvpms.org/forum/colour-code-customer-invoice-item#comment...).

When I do this in v2.3.0.5 and select the item, there's no change - ie it doesn't change to cream but it doesn't go bold / italic either so you have no idea it's selected.

Is there a way to get the bold italic without the cream?

(First world problem, I know.)

Re: Clean install of 2.3

Regarding going from 1.9 to 2.3: If you are going to migrate your 1.9 database to a new machine, make sure you follow https://www.openvpms.org/documentation/csh/2.3/topics/installing-openvpm.... The database on the target machine must be empty. If there is a schema_version table present, the migration will be incomplete.

Regarding the schedule table colours, the commenting out layoutData works for me:

    <style name="ScheduleTable.Selected" type="nextapp.echo2.app.Component">
        <properties>
            <property name="font">
                <font size="${font.size}" bold="true" italic="true">
                    <typeface name="${font.typeface}"/>
                </font>
            </property>
            <property name="foreground" value="#000000"/>
            <!--property name="layoutData">
                <layout-data type="nextapp.echo2.app.layout.TableLayoutData">
                    <properties>
                        <property name="background" value="#f2f3b3"/>
                    </properties>
                </layout-data>
            </property-->
        </properties>
    </style>

Make sure you restart Tomcat after making the change.

Re: Clean install of 2.3

>Regarding the schedule table colours, the commenting out layoutData works for me.

As it does for me once I put the comment markers in the right place (hangs head in embarrassment sad).

>Regarding going from 1.9 to 2.3: If you are going to migrate your 1.9 database to a new machine....

Yes, I'd created a system image immediately after the "create empty database" step and had then installed v2.3.0.3 last week.  It was thus a simple matter to restore that image, and set up v2.3.0.5 (having done it a few times I get very good at it!).  

I've checked it over and over.  I've backed up, then restored back up to make sure everything works ok.  The old server will be kept as a back up as it's now also upgraded to v2.3.0.5 (but it's as slow as a wet week compared to the new server - from 4GB+core2duo+HDDs to i7+32GB+SSDs make an amazing difference). So we're good to go tomorrow morning.

Thanks for your patient help, Tim.

Yuri.

Re: Clean install of 2.3

If you continue to run the old server, make sure you deactivate background tasks and integrations, to avoid interfering with the live system.

These include:

  • any jobs in Administration - Jobs
  • Smart Flow Sheet
    Remove the Smart Flow Clinic API Key from each Practice Location in Administration - Organisation
  • SMS
    Remove SMS from the Practice in Administration - Organisation
  • Mail Servers
    Remove Mail Server from the Practice and Practice Locations and in Administration - Organisation
  • HL7 services and connectors in Administration - HL7
  • plugins in Administration - System - Plugins
    Use Configure to disable them

 

Re: Clean install of 2.3

Excellent advice - hadn't thought it through till you mentioned it.  Old server is currently turned off under the desk and will stay that way unless required to be pressed back into service.

Syndicate content