Trying to run Fedora 6.3 on Ubuntu 22.04 and Tomcat 9

25 views
Skip to first unread message

Davide Merlitti

unread,
Mar 9, 2023, 9:38:49 AM3/9/23
to Fedora Community
I'm trying to run Fedora 6.3 on a Ubuntu 22.04 and Tomcat 9 by following the following instructions:



2) I created a directory /data/fedora owned by tomcat:tomcat

3) I changed fedora.home by using JAVA_OPTS in /etc/default/tomcat9 (see https://wiki.lyrasis.org/display/FEDORA6x/Application+Configuration#ApplicationConfiguration-tomcatTomcat9)

Unfortunately I get this errors in catalina.out when deploying the war:

[2023-03-09 14:18:30] [info] INFO 14:18:30.758 [main] (JmsConfig) JMS messaging enabled
[2023-03-09 14:18:30] [info] INFO 14:18:30.870 [main] (FedoraPropsConfig) Fedora home: /data/fedora
[2023-03-09 14:18:30] [info] WARN 14:18:30.872 [main] (XmlWebApplicationContext) Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependenc
yException: Error creating bean with name 'webappConfig': Unsatisfied dependency expressed through field 'fedoraPropsConfig'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error
 creating bean with name 'jmsBroker' defined in org.fcrepo.webapp.JmsConfig: Unsatisfied dependency expressed through method 'jmsBroker' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationE
xception: Error creating bean with name 'fedoraPropsConfig': Invocation of init method failed; nested exception is java.nio.file.FileSystemException: /data/fedora/data: Read-only file system
[2023-03-09 14:18:30] [info] ERROR 14:18:30.876 [main] (ContextLoader) Context initialization failed
[2023-03-09 14:18:30] [info] org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'webappConfig': Unsatisfied dependency expressed through field 'fedoraPropsConfig'; nested e
xception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'jmsBroker' defined in org.fcrepo.webapp.JmsConfig: Unsatisfied dependency expressed through method 'jmsBroke
r' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'fedoraPropsConfig': Invocation of init method failed; nested exception is java.nio.file.FileS
ystemException: /data/fedora/data: Read-only file system
[...]
[2023-03-09 14:18:30] [info] Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'jmsBroker' defined in org.fcrepo.webapp.JmsConfig: Unsatisfied dependency expressed through method 'jmsBroker' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'fedoraPropsConfig': Invocation of init method failed; nested exception is java.nio.file.FileSystemException: /data/fedora/data: Read-only file system
[...]
[2023-03-09 14:18:30] [info] Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'fedoraPropsConfig': Invocation of init method failed; nested exception is java.nio.file.FileSystemException: /data/fedora/data: Read-only file system
[...]
[2023-03-09 14:18:30] [info] Caused by: java.nio.file.FileSystemException: /data/fedora/data: Read-only file system
[...]
[2023-03-09 14:18:30] [crit] One or more listeners failed to start. Full details will be found in the appropriate container log file
[2023-03-09 14:18:30] [crit] Context [/fcrepo] startup failed due to previous errors


What am I doing wrong or forgetting? Any suggestions are appreciated.

Davide

Gunter Vasold

unread,
Mar 9, 2023, 12:42:24 PM3/9/23
to fedora-c...@googlegroups.com
Hi Davide,

[2023-03-09 14:18:30] [info] Caused by: java.nio.file.FileSystemException: /data/fedora/data: Read-only file system

It seems that the user tomcat runs as cannot write to /data/fedora/data

Gunter

--
You received this message because you are subscribed to the Google Groups "Fedora Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fedora-communi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fedora-community/d7464ba6-ae6d-43cf-9b32-3c95f8556e01n%40googlegroups.com.

Dan Field

unread,
Mar 10, 2023, 3:25:25 PM3/10/23
to Fedora Community
Can you share the file permissions of /data/fedora/data and /data/fedora ?

Jaime Penagos

unread,
Mar 10, 2023, 3:25:25 PM3/10/23
to fedora-c...@googlegroups.com
Hi, maybe it's not the problem, but when I worked with Fedora 6 + Tomcat 9 I had to double check the Tomcat 9 Service (under systemd), and add an exception to the folder Fedora uses.

Maybe it helps a bit?

Best regards, 
Jaime

Davide Merlitti

unread,
Mar 10, 2023, 3:25:25 PM3/10/23
to Fedora Community
Fixed. On Ubuntu 22.04 Tomcat 9 is sandboxed by systemd and only has write access to the directories specified in /lib/systemd/system/tomcat9.service

The solution in my case was to add:

[Service]
[...]
ReadWritePaths=/data/fedora
/

Reply all
Reply to author
Forward
0 new messages