DocSpace not running after install on Ubuntu 24.04 LTS

Do you want to: Report a bug

DocSpace version: 3.0.4.482
Type of installation of the DocSpace : provided script
docspace/installation/docspace-community-install-script.aspx

OS: Ubuntu 24.04.2 LTS

Additional information:

  • new installation of Ubuntu
  • system is behind a proxy
  • opensearch seems not to be started
Setting up docspace (3.0.4.482) ...
Install json package...   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 62528  100 62528    0     0  55674      0  0:00:01  0:00:01 --:--:-- 59.6M
OK
Configuring docspace... OK
Trying to establish MySQL connection... OK
Configuring docs... OK
Configuring openresty... OK
Configuring opensearch... Exception in thread "main" java.net.ConnectException: Connection refused
        at java.base/sun.nio.ch.Net.connect0(Native Method)
        at java.base/sun.nio.ch.Net.connect(Net.java:579)
        at java.base/sun.nio.ch.Net.connect(Net.java:568)
        at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:593)
        at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:327)
        at java.base/java.net.Socket.connect(Socket.java:633)
        at java.base/sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:304)
        at java.base/sun.security.ssl.BaseSSLSocketImpl.connect(BaseSSLSocketImpl.java:174)
        at java.base/sun.net.NetworkClient.doConnect(NetworkClient.java:183)
        at java.base/sun.net.www.http.HttpClient.openServer(HttpClient.java:533)
        at java.base/sun.net.www.http.HttpClient.openServer(HttpClient.java:638)
        at java.base/sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:266)
        at java.base/sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:380)
        at java.base/sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:193)
        at java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1242)
        at java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1128)
        at java.base/sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:179)
        at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:142)
        at org.opensearch.plugins.InstallPluginCommand.urlExists(InstallPluginCommand.java:426)
        at org.opensearch.plugins.InstallPluginCommand.getOpenSearchUrl(InstallPluginCommand.java:393)
        at org.opensearch.plugins.InstallPluginCommand.download(InstallPluginCommand.java:310)
        at org.opensearch.plugins.InstallPluginCommand.execute(InstallPluginCommand.java:273)
        at org.opensearch.plugins.InstallPluginCommand.execute(InstallPluginCommand.java:250)
        at org.opensearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:104)
        at org.opensearch.cli.Command.mainWithoutErrorHandling(Command.java:138)
        at org.opensearch.cli.MultiCommand.execute(MultiCommand.java:104)
        at org.opensearch.cli.Command.mainWithoutErrorHandling(Command.java:138)
        at org.opensearch.cli.Command.main(Command.java:101)
        at org.opensearch.plugins.PluginCli.main(PluginCli.java:60)

- configure of docspace fails:
dpkg: error processing package docspace (--configure):
 installed docspace package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 docspace
needrestart is being skipped since dpkg has failed
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@onlyoffice:/home/klaus#

------------------------------------------------------------------------------------------------------------

- Status of opensearch:
root@onlyoffice:/home/klaus# systemctl status opensearch
○ opensearch.service - OpenSearch
     Loaded: loaded (/usr/lib/systemd/system/opensearch.service; enabled; preset: enabled)
     Active: inactive (dead) since Mon 2025-03-17 16:31:14 CET; 51s ago
   Duration: 14min 44.281s
       Docs: https://opensearch.org/
    Process: 30085 ExecStart=/usr/share/opensearch/bin/systemd-entrypoint -p ${PID_DIR}/opensearch.pid --quiet (code=exited, status=143)
   Main PID: 30085 (code=exited, status=143)
        CPU: 50.857s

- Restart opensearch:
root@onlyoffice:/home/klaus# systemctl start opensearch
root@onlyoffice:/home/klaus# systemctl status opensearch
● opensearch.service - OpenSearch
     Loaded: loaded (/usr/lib/systemd/system/opensearch.service; enabled; preset: enabled)
     Active: active (running) since Mon 2025-03-17 16:32:51 CET; 4s ago
   Main PID: 38383 (java)
      Tasks: 76 (limit: 19102)
     Memory: 1.2G (peak: 1.2G)
        CPU: 36.393s
     CGroup: /system.slice/opensearch.service
             └─38383 /usr/share/opensearch/jdk/bin/java -Xshare:auto -Dopensearch.networkaddress.cache.ttl=60 -Dopensearch.networkaddress.cache.negative.ttl=10 -XX:+AlwaysPreTouch -Xss1m -Djava.awt.headless=true -Dfile.encoding=UTF-8 -D>

Mär 17 16:32:36 onlyoffice systemd[1]: Starting opensearch.service - OpenSearch...
Mär 17 16:32:38 onlyoffice systemd-entrypoint[38383]: WARNING: A terminally deprecated method in java.lang.System has been called
Mär 17 16:32:38 onlyoffice systemd-entrypoint[38383]: WARNING: System::setSecurityManager has been called by org.opensearch.bootstrap.OpenSearch (file:/usr/share/opensearch/lib/opensearch-2.11.1.jar)
Mär 17 16:32:38 onlyoffice systemd-entrypoint[38383]: WARNING: Please consider reporting this to the maintainers of org.opensearch.bootstrap.OpenSearch
Mär 17 16:32:38 onlyoffice systemd-entrypoint[38383]: WARNING: System::setSecurityManager will be removed in a future release
Mär 17 16:32:40 onlyoffice systemd-entrypoint[38383]: WARNING: A terminally deprecated method in java.lang.System has been called
Mär 17 16:32:40 onlyoffice systemd-entrypoint[38383]: WARNING: System::setSecurityManager has been called by org.opensearch.bootstrap.Security (file:/usr/share/opensearch/lib/opensearch-2.11.1.jar)
Mär 17 16:32:40 onlyoffice systemd-entrypoint[38383]: WARNING: Please consider reporting this to the maintainers of org.opensearch.bootstrap.Security
Mär 17 16:32:40 onlyoffice systemd-entrypoint[38383]: WARNING: System::setSecurityManager will be removed in a future release
Mär 17 16:32:51 onlyoffice systemd[1]: Started opensearch.service - OpenSearch.

- reconfigure docspace:
root@onlyoffice:/home/klaus# dpkg --configure docspace
docspace (3.0.4.482) wird eingerichtet ...
/usr/bin/json
Configuring docspace... OK
Trying to establish MySQL connection... OK
Configuring docs... OK
Configuring openresty... OK
Configuring opensearch... Exception in thread "main" java.net.ConnectException: Connection refused
        at java.base/sun.nio.ch.Net.connect0(Native Method)
        at java.base/sun.nio.ch.Net.connect(Net.java:579)
        at java.base/sun.nio.ch.Net.connect(Net.java:568)
        at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:593)
        at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:327)
        at java.base/java.net.Socket.connect(Socket.java:633)
        at java.base/sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:304)
        at java.base/sun.security.ssl.BaseSSLSocketImpl.connect(BaseSSLSocketImpl.java:174)
        at java.base/sun.net.NetworkClient.doConnect(NetworkClient.java:183)
        at java.base/sun.net.www.http.HttpClient.openServer(HttpClient.java:533)
        at java.base/sun.net.www.http.HttpClient.openServer(HttpClient.java:638)
        at java.base/sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:266)
        at java.base/sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:380)
        at java.base/sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:193)
        at java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1242)
        at java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1128)
        at java.base/sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:179)
        at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:142)
        at org.opensearch.plugins.InstallPluginCommand.urlExists(InstallPluginCommand.java:426)
        at org.opensearch.plugins.InstallPluginCommand.getOpenSearchUrl(InstallPluginCommand.java:393)
        at org.opensearch.plugins.InstallPluginCommand.download(InstallPluginCommand.java:310)
        at org.opensearch.plugins.InstallPluginCommand.execute(InstallPluginCommand.java:273)
        at org.opensearch.plugins.InstallPluginCommand.execute(InstallPluginCommand.java:250)
        at org.opensearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:104)
        at org.opensearch.cli.Command.mainWithoutErrorHandling(Command.java:138)
        at org.opensearch.cli.MultiCommand.execute(MultiCommand.java:104)
        at org.opensearch.cli.Command.mainWithoutErrorHandling(Command.java:138)
        at org.opensearch.cli.Command.main(Command.java:101)
        at org.opensearch.plugins.PluginCli.main(PluginCli.java:60)
dpkg: Fehler beim Bearbeiten des Paketes docspace (--configure):
 »installiertes post-installation-Skript des Paketes docspace«-Unterprozess gab den Fehlerwert 1 zurück
Fehler traten auf beim Bearbeiten von:
 docspace


root@onlyoffice:/home/klaus# systemctl status opensearch
○ opensearch.service - OpenSearch
     Loaded: loaded (/usr/lib/systemd/system/opensearch.service; enabled; preset: enabled)
     Active: inactive (dead) since Mon 2025-03-17 16:33:18 CET; 8s ago
   Duration: 26.924s
       Docs: https://opensearch.org/
    Process: 38383 ExecStart=/usr/share/opensearch/bin/systemd-entrypoint -p ${PID_DIR}/opensearch.pid --quiet (code=exited, status=143)
   Main PID: 38383 (code=exited, status=143)
        CPU: 37.736s

Mär 17 16:32:38 onlyoffice systemd-entrypoint[38383]: WARNING: System::setSecurityManager will be removed in a future release
Mär 17 16:32:40 onlyoffice systemd-entrypoint[38383]: WARNING: A terminally deprecated method in java.lang.System has been called
Mär 17 16:32:40 onlyoffice systemd-entrypoint[38383]: WARNING: System::setSecurityManager has been called by org.opensearch.bootstrap.Security (file:/usr/share/opensearch/lib/opensearch-2.11.1.jar)
Mär 17 16:32:40 onlyoffice systemd-entrypoint[38383]: WARNING: Please consider reporting this to the maintainers of org.opensearch.bootstrap.Security
Mär 17 16:32:40 onlyoffice systemd-entrypoint[38383]: WARNING: System::setSecurityManager will be removed in a future release
Mär 17 16:32:51 onlyoffice systemd[1]: Started opensearch.service - OpenSearch.
Mär 17 16:33:18 onlyoffice systemd[1]: Stopping opensearch.service - OpenSearch...
Mär 17 16:33:18 onlyoffice systemd[1]: opensearch.service: Deactivated successfully.
Mär 17 16:33:18 onlyoffice systemd[1]: Stopped opensearch.service - OpenSearch.
Mär 17 16:33:18 onlyoffice systemd[1]: opensearch.service: Consumed 37.736s CPU time, 1.2G memory peak, 0B memory swap peak.

In /usr/bin/docspace-configuration
I have found

change_elasticsearch_config(){
       systemctl stop opensearch
       if $PACKAGE_MANAGER elasticsearch >/dev/null 2>&1; then
               systemctl disable elasticsearch >/dev/null 2>&1
               systemctl stop elasticsearch >/dev/null 2>&1
       fi
root@onlyoffice:~# dpkg --configure -D113  docspace
Configuring docspace... OK
Trying to establish MySQL connection... OK
Configuring docs... OK
Configuring openresty... OK
Configuring opensearch... + systemctl stop opensearch
+ dpkg -s elasticsearch
+ sed -i '/^plugins\.security/d' /etc/opensearch/opensearch.yml
+ sed -i '/CN=kirk,OU=client,O=client,L=test, C=de/d' /etc/opensearch/opensearch.yml
+ /usr/share/opensearch/bin/opensearch-plugin list
+ grep -x opensearch-security
+ local ELASTIC_SEARCH_CONF_PATH=/etc/opensearch/opensearch.yml
+ local ELASTIC_SEARCH_JAVA_CONF_PATH=/etc/opensearch/jvm.options
+ /usr/share/opensearch/bin/opensearch-plugin list
+ grep -q ingest-attachment
+ /usr/share/opensearch/bin/opensearch-plugin install -s -b ingest-attachment
Exception in thread "main" java.net.ConnectException: Connection refused
  ....
dpkg: Fehler beim Bearbeiten des Paketes docspace (--configure):
 »installiertes post-installation-Skript des Paketes docspace«-Unterprozess gab den Fehlerwert 1 zurück
D000001: ensure_diversions: same, skipping
Fehler traten auf beim Bearbeiten von:
 docspace
 /usr/share/opensearch/bin/opensearch-plugin install -s -b ingest-attachment

is NOT using the webproxy, but trying to reach one cloudfront.net server directly
… and gets blocked by our firewall

Hello @K.Gundermann

Did you follow this guide to install DocSpace?

For better understanding could you please elaborate on proxy which is used in your environment?
You may also consider installing DocSpace with Docker as an alternative.