The issue seems to be related to Red Hat security (SELinux). You have two options to resolve it:
I advise against this option, but you can disable SELinux on Red Hat by following this guide. Afterward, you should reinstall snapd and xwiki.snap.
Alternatively, you can solve the problem by adding /var/snap/xwiki/current/ to your PATH and executing sh start_xwiki.sh whenever you wish to run the Xwiki snap.
I will continue investigating this matter until then.
I tried, this morning, to run xwiki with the following command, but I had a different message
[root@srv-xwiki-test current]# xwiki.start
java.nio.file.NoSuchFileException: /tmp/start_291489999898403813.properties
at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:116)
at java.base/sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:219)
at java.base/java.nio.file.Files.newByteChannel(Files.java:371)
at java.base/java.nio.file.Files.createFile(Files.java:648)
at java.base/java.nio.file.TempFileHelper.create(TempFileHelper.java:137)
at java.base/java.nio.file.TempFileHelper.createTempFile(TempFileHelper.java:160)
at java.base/java.nio.file.Files.createTempFile(Files.java:913)
at org.eclipse.jetty.start.StartArgs.getMainArgs(StartArgs.java:786)
at org.eclipse.jetty.start.Main.invokeMain(Main.java:218)
at org.eclipse.jetty.start.Main.start(Main.java:512)
at org.eclipse.jetty.start.Main.main(Main.java:74)
java.nio.file.NoSuchFileException: /tmp/start_291489999898403813.properties
at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:116)
at java.base/sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:219)
at java.base/java.nio.file.Files.newByteChannel(Files.java:371)
at java.base/java.nio.file.Files.createFile(Files.java:648)
at java.base/java.nio.file.TempFileHelper.create(TempFileHelper.java:137)
at java.base/java.nio.file.TempFileHelper.createTempFile(TempFileHelper.java:160)
at java.base/java.nio.file.Files.createTempFile(Files.java:913)
at org.eclipse.jetty.start.StartArgs.getMainArgs(StartArgs.java:786)
at org.eclipse.jetty.start.Main.invokeMain(Main.java:218)
at org.eclipse.jetty.start.Main.start(Main.java:512)
at org.eclipse.jetty.start.Main.main(Main.java:74)
Usage: java -jar $JETTY_HOME/start.jar [options] [properties] [configs]
java -jar $JETTY_HOME/start.jar --help # for more information
[root@srv-xwiki-test current]#
so I’ve put the PATH viariable and it did’nt worked.
[root@srv-xwiki-test ~]# sudo xwiki.start
sudo: xwiki.start : commande introuvable
[root@srv-xwiki-test ~]# xwiki.start
java.nio.file.NoSuchFileException: /tmp/start_10842251950731598944.properties
at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:116)
at java.base/sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:219)
at java.base/java.nio.file.Files.newByteChannel(Files.java:371)
at java.base/java.nio.file.Files.createFile(Files.java:648)
at java.base/java.nio.file.TempFileHelper.create(TempFileHelper.java:137)
at java.base/java.nio.file.TempFileHelper.createTempFile(TempFileHelper.java:160)
at java.base/java.nio.file.Files.createTempFile(Files.java:913)
at org.eclipse.jetty.start.StartArgs.getMainArgs(StartArgs.java:786)
at org.eclipse.jetty.start.Main.invokeMain(Main.java:218)
at org.eclipse.jetty.start.Main.start(Main.java:512)
at org.eclipse.jetty.start.Main.main(Main.java:74)
java.nio.file.NoSuchFileException: /tmp/start_10842251950731598944.properties
at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:116)
at java.base/sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:219)
at java.base/java.nio.file.Files.newByteChannel(Files.java:371)
at java.base/java.nio.file.Files.createFile(Files.java:648)
at java.base/java.nio.file.TempFileHelper.create(TempFileHelper.java:137)
at java.base/java.nio.file.TempFileHelper.createTempFile(TempFileHelper.java:160)
at java.base/java.nio.file.Files.createTempFile(Files.java:913)
at org.eclipse.jetty.start.StartArgs.getMainArgs(StartArgs.java:786)
at org.eclipse.jetty.start.Main.invokeMain(Main.java:218)
at org.eclipse.jetty.start.Main.start(Main.java:512)
at org.eclipse.jetty.start.Main.main(Main.java:74)
Usage: java -jar $JETTY_HOME/start.jar [options] [properties] [configs]
java -jar $JETTY_HOME/start.jar --help # for more information
[root@srv-xwiki-test ~]#
And it still did’nt work. Maybe I should reinstall it from scracth and see if I’ve the same problem…
I’ll try to reinstall snapd first and wiki, and I’ll do from scracth if it’s the same.
I’ve reinstalled snapd and xwiki.
xwiki.start works but not with sudo.
Also, when xwiki starts, it start like a demo version. So when I close my ssh connexion, xwiki stop.