Internal Server Error 500 when uploading Template Documents

Hi all,

Just started using OpenVPMS and testing out its features.

On my fresh install on macOS Monterey I'm getting an Internal Server Error 500 when trying to upload Template Documents. I've attached a screenshot of the error.

So far I've tried it with different formats of document, I've tested .doc, .odt, .jrxml and .rft. They all result in the same error.

I've checked that there is write permissions on the reports folders.

I can't think of anything else that might be causing it, can anyone help?

Comment viewing options

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

Re: Internal Server Error 500 when uploading Template Documents

The error should be logged. You can view these in Administration - System, by clicking the Diagnostics button and then the Logs tab.
If you have configured a Mail Server in Administration - Organisation, you can email them through to me at tanderson at openvpms.org.

Re: Internal Server Error 500 when uploading Template Documents

Hi,

I've sent through the requested logs, though it did say "Log file not found".

Thanks for your help.

Re: Internal Server Error 500 when uploading Template Documents

Hi,

How did youinstall Tomcat .. did you use brew ?

Did you install with root privileges ?

How do you run Tomcat i.e via Catalina.sh script or using another method ?

Also as what user do you run ?

 

I think you have a permissions issue srealted to the above which means the running Tomcat doesn't have access to the installed logs folder ..

Cheers
Tony

Re: Internal Server Error 500 when uploading Template Documents

Hi,

I installed Tomcat from the Apache binary distribution.

I installed most of the components using an admin account, only using sudo when requested.

I run Tomcat via launchd (I've attached the plist I use). It runs under a separate user with limited permissions. It should have full access to the Tomcat file system (I've attached a quick permissions list for the Tomcat file, the user it runs is in the same group as the installer (staff, group 20).)

I was hoping to secure the install as best I can as the machine is used for day to day work as well as hosting the openvpms.

AttachmentSize
perms.txt 985 bytes
org.apache.tomcat.txt 510 bytes

Re: Internal Server Error 500 when uploading Template Documents

Hi,

I expect the launchd or some other issue is not getting the correct CATALINA_HOME env variable and hence trying to write the logs somewhere it  is not allowed to due to your user permission restrictions.  

 

Maybe first try to up the users permissions temporarily to confirm this nad then find out where the logs are being written .. then check the env variables being used as well. 

In regards security and protection have you thought of running  Openvpms in Docker Desktop or another Virtual Container application or using a Ubuntu Linux virtual machine under VirtualBox.  The only reason I say this is in my experience setting up the components in OSX can be a bit painful , especially getting OpenOffice to run reliably ...

Cheers

Tony

 

Re: Internal Server Error 500 when uploading Template Documents

Hi Tony,

I hadn't considered Docker, I'd tried to setup Ubuntu in Virtual Box but I'm running on Apple Silicon and VB doesn't do emulation like that. 

I'll see if I can figure out the CATALINA_HOME situation and permissions, but if not I'll take a look at the Docker style of install as I'm much more comfortable using Docker for these things. (I've also had OSX trouble in the past.)

Re: Internal Server Error 500 when uploading Template Documents

Some other things to try:

Re: Internal Server Error 500 when uploading Template Documents

Good ideas thanks.

Re: Internal Server Error 500 when uploading Template Documents

Hi,

I moved the CATALINA_HOME, and JAVA_HOME exports from ~/.zshenv to /etc/zshenv. This seems to have resolved the problem.

In hindsight I should have put them in /etc/ to start with.

Thanks for pointing me in the right direction.

Syndicate content