+1 vote
264 views

Hello,

I installed Collaboration Server 1.2.1 on Ubuntu 20.04 successfully.
However, I get a 500 error after a user, team, or group creation command.

The error message indicates that access to the database is read-only.

extract of the error message:
Caused by: java.sql.SQLException: An SQL data change is not permitted for a read-only connection, user or database.

How to check the database access rights?
How to change access rights?

Thank you for your help.

Sincerely

Christophe

Installed versions:

  • Ubuntu Server 20.04 LTS
  • open-jdk8
  • Tomcat9
  • elasticsearch 6
in LCA Collaboration Server by (360 points)

1 Answer

0 votes
by (6.7k points)
selected by
 
Best answer
The tomcat user must own the collaboration server directory (e.g. /opt/collab) and all its child directories. Maybe that is the issue?
by (360 points)
Hello,

I know, it's stated in your documentation. http://www.openlca.org/collaboration-server-installation-guide
I executed the command sudo chown tomcat:tomcat /opt/collab/ -R and increased the read and write permissions on the folder.
I always get the same mistake.

Christophe
by (6.7k points)
I did not yet install on Ubuntu 20 with tomcat 9 - but when I ran into issues with read-only database it was always a problem about permissions with the directories - can you run "cut -d: -f1 /etc/passwd" to see if the user is correct? with tomcat 8 the user was "tomcat8" instead of "tomcat"
by (360 points)
With Tomcat9 on Ubuntu 20.4, there is not tomcat8 user but tomcat only.
So, I created tomcat8 uerr,  added it to tomcat group, and added good rights (rwx) to /opt/collab directory.

drwxrwxrwx  5 tomcat tomcat     4096 Jun 18 11:19 collab/

But i get same error "An SQL data change is not permitted for a read-only connection, user or database."
by (6.7k points)
I don't really have another idea right now, why you can't access the data, maybe it has something to do with tomcat9 differences in access rights, as I mentioned, we have developed the CS to work with tomcat8 so far and did not yet test (and possibly migrate) to tomcat9.

If you are able to use the specified version in the documentation I'd recommend that for now, until we had the chance to test the CS with the newer version available.
by (360 points)
The problem comes from the Ubuntu and Tomcat versions.
I retested with Ubuntu 18.04 and Tomcat8, everything is OK.
Thanks for everything
...