Nextcloud Aborting

Guten Abend,

es gibt ja schon einiges zum Thema hier zu finden, jedoch finde ich bisher keine Lösung. Der Versuch die Nextcloud-App zu installieren, bricht folgendermaßen laut cat /var/log/univention/management-console-module-appcenter.log ab:

04.02.18 21:06:41.340  MODULE      ( PROCESS ) : Creating database for 4.1/nextcloud=12.0.5-0
04.02.18 21:06:45.785  MODULE      ( PROCESS ) : Password for nextcloud database in /etc/postgresql-nextcloud.secret
04.02.18 21:06:45.786  MODULE      ( PROCESS ) : Registering schema /usr/share/univention-appcenter/apps/nextcloud/nextcloud.schema
04.02.18 21:07:15.831  MODULE      ( PROCESS ) : Registering the container host nextc-48358306 for nextcloud
04.02.18 21:07:17.450  MODULE      ( PROCESS ) : Verifying Docker registry manifest for app image docker.software-univention.de/nextcloud:12.0.5-0
04.02.18 21:07:18.097  MODULE      ( PROCESS ) : Downloading app image docker.software-univention.de/nextcloud:12.0.5-0
04.02.18 21:09:39.224  MODULE      ( PROCESS ) : Initializing app image
04.02.18 21:09:39.803  MODULE      ( PROCESS ) : Preconfiguring container 9f6618a5ae33bf505dcf6526e9de8b6fec56152f88cdcc3e555caa77e9497d1d
04.02.18 21:09:49.083  MODULE      ( PROCESS ) : Starting docker-app-nextcloud (via systemctl): docker-app-nextcloud.service.
04.02.18 21:09:52.540  MODULE      ( PROCESS ) : Calling ['docker', 'cp', '/etc/timezone', '9f6618a5ae33bf505dcf6526e9de8b6fec56152f88cdcc3e555caa77e9497d1d:/etc/timezone']
04.02.18 21:09:53.350  MODULE      ( PROCESS ) : Calling ['docker', 'cp', '/etc/localtime', '9f6618a5ae33bf505dcf6526e9de8b6fec56152f88cdcc3e555caa77e9497d1d:/etc/localtime']
04.02.18 21:09:54.533  MODULE      ( PROCESS ) : Calling ['docker', 'cp', u'/etc/postgresql-nextcloud.secret', u'9f6618a5ae33bf505dcf6526e9de8b6fec56152f88cdcc3e555caa77e9497d1d:/etc/postgresql-nextcloud.secret']
04.02.18 21:09:55.268  MODULE      ( PROCESS ) : Configuring 4.1/nextcloud=12.0.5-0
04.02.18 21:09:57.114  MODULE      ( PROCESS ) : ucr cannot be found, falling back to changing the database file directly
04.02.18 21:09:57.219  MODULE      ( PROCESS ) : Executing interface restore_data_before_setup for nextcloud
04.02.18 21:09:57.349  MODULE      ( PROCESS ) : Copying App Center's restore_data_before_setup to container's /usr/share/univention-docker-container-mode/restore_data_before_setup_custom
04.02.18 21:09:57.837  MODULE      ( PROCESS ) : Executing interface setup for nextcloud
04.02.18 21:09:58.276  MODULE      ( PROCESS ) : Copying App Center's setup to container's /usr/share/univention-docker-container-mode/setup_custom
04.02.18 21:10:01.036  MODULE      ( PROCESS ) : Nextcloud is not installed - only a limited number of commands are available
04.02.18 21:11:01.153  MODULE      ( PROCESS ) : Error while trying to create admin user: Failed to connect to the database: An exception occured in driver: SQLSTATE[08006] [7] timeout expired
04.02.18 21:11:01.153  MODULE      ( PROCESS ) :  -> 
04.02.18 21:11:01.196  MODULE      ( PROCESS ) : Error while installing Nextcloud
04.02.18 21:11:01.302  MODULE      ( WARN    ) : Setup script failed!
04.02.18 21:11:01.303  MODULE      ( PROCESS ) : Aborting...
0

Das scheint der Befehl

 26558 actions.install                  18-02-04 21:09:52 [    INFO]: Calling ['docker', 'cp', '/etc/timezone', '9f6618a5ae33bf505dcf6526e9de8b6fec56152f88cdcc3e555caa77e9497d1d:/etc/timezone']
 26558 actions.install                  18-02-04 21:09:53 [    INFO]: Calling ['docker', 'cp', '/etc/localtime', '9f6618a5ae33bf505dcf6526e9de8b6fec56152f88cdcc3e555caa77e9497d1d:/etc/localtime']
 26558 actions.install                  18-02-04 21:09:54 [    INFO]: Calling ['docker', 'cp', u'/etc/postgresql-nextcloud.secret', u'9f6618a5ae33bf505dcf6526e9de8b6fec56152f88cdcc3e555caa77e9497d1d:/etc/postgresql-nextcloud.secret']
 26558 actions.configure                18-02-04 21:09:55 [   DEBUG]: Calling configure
 26558 actions.configure.progress       18-02-04 21:09:55 [   DEBUG]: 0
 26558 actions.configure                18-02-04 21:09:55 [    INFO]: Configuring 4.1/nextcloud=12.0.5-0
 26558 actions.configure.container.9f66 18-02-04 21:09:56 [   DEBUG]: Using container.9f66 for container 9f6618a5ae33bf505dcf6526e9de8b6fec56152f88cdcc3e555caa77e9497d1d
 26558 actions.configure.container.9f66 18-02-04 21:09:56 [   DEBUG]: Calling docker exec 9f6618a5ae33bf505dcf6526e9de8b6fec56152f88cdcc3e555caa77e9497d1d which ucr
 26558 actions.configure                18-02-04 21:09:57 [ WARNING]: ucr cannot be found, falling back to changing the database file directly
 26558 actions.configure.progress       18-02-04 21:09:57 [   DEBUG]: 100
 26558 actions.install.progress         18-02-04 21:09:57 [   DEBUG]: 50
 26558 actions.install                  18-02-04 21:09:57 [    INFO]: Executing interface restore_data_before_setup for nextcloud
 26558 actions.install                  18-02-04 21:09:57 [    INFO]: Copying App Center's restore_data_before_setup to container's /usr/share/univention-docker-container-mode/restore_data_before_setup_custom
 26558 actions.install.container.9f66   18-02-04 21:09:57 [   DEBUG]: Using container.9f66 for container 9f6618a5ae33bf505dcf6526e9de8b6fec56152f88cdcc3e555caa77e9497d1d
 26558 actions.install.container.9f66   18-02-04 21:09:57 [   DEBUG]: Calling docker exec 9f6618a5ae33bf505dcf6526e9de8b6fec56152f88cdcc3e555caa77e9497d1d /usr/share/univention-docker-container-mode/restore_data_before_setup_custom --app nextcloud --app-version 12.0.5-0 --error-file /var/univention/tmp/tmp8S_3DP

aus cat /var/log/univention/appcenter.log zu sein.

Jemand eine Idee?

Viele Grüße,
Bernd

Moin,

läuft der postgresql und ist in der Firewall freigegeben?

systemctl status postgresql@9.4-main.service 
ucr get security/packetfilter/package/univention-postgresql-9.4/tcp/5432/all

Grüße von der bytemine GmbH

Moin Moin,

das war’s. Zumindest für die nextcloud Installation…
Nun kommt (error=51) beim join - aber da habe ich ja den Hinweis auf letsencrypt gefunden und werde das probieren.

Bleibt mein Problem für den Grund warum ich security/packetfilter/package/univention-postgresql-9.4/tcp/5432/all nicht aktiviert hatte… Bzw. eben alle security/packetfilter/package/... Regeln.

Kann ich, bzw. wie kann ich die so aktivierten Regeln für einzelne Ports auf einer öffentlichen IP-Adresse schließen?
Ich habe es mit security/packetfilter/<prot>/<port>/w.x.y.z=DROP versucht, aber das schreckt zumindest nmap nicht ab. Dabei steht doch in der Dev-Doku

Local rules have a higher priority and overwrite rules provided by packages.

Was habe ich da nicht beachtet?

Grüße und Danke!
Bernd

Moin,

Die UCR-Regeln unterstützen keine Angabe von Quell- oder Zieladressen, sondern leider nur das generische Öffnen bzw. Schließen von Ports für alle Verbindungen. Wenn man feinere Kontrolle möchte, so muss man selber Shellscripte in /etc/security/packetfilter.d anlegen, die entsprechende iptables-Befehle absetzen. Diese werden vom univention-firewall.service-Dienst beim Starten ausgeführt.

Die Admin-Doku weiß zu dem Thema mehr.

Gruß
mosu

Servus,

hm, das lese ich und lese ich und schaue mir die Dateien unter /etc/security/packetfilter.d an - so recht schlau werde ich daraus noch nicht. In 10_univention-firewall_start.sh stehen die UCR-Variablen in einer mir nicht nachvollziehbaren Ordnung: gut der Anfang ist klar, aber sobald die UCR-Variablen abgearbeitet werden gehen security/packetfilter/package/... und security/packetfilter/... für mein Verständnis durcheinander.
Füge ich Regeln unter 50_local.sh ein so z.B.:

iptables -A INPUT -p "tcp" -d w.x.y.z --dport 389 -j DROP
iptables -A INPUT -p "udp" -d w.x.y.z --dport 53 -j DROP
iptables -A INPUT -p "tcp" -d w.x.y.z --dport 464 -j DROP
iptables -A INPUT -p "tcp" -d w.x.y.z --dport 7636 -j DROP
...

Bringt es mich auch nicht weiter. Sollten Regeln eher als 05_meine_filter.sh eingefügt werden?

Gruß und Dank,
Bernd

Servus nochmal,

oder ist der Weg besser in dieser Richtung UCS 4.x als Root-Server - welche Ports? zu gehen?

Mehr Grüße,
Bernd

Ach huch, Regeln nach Adressen gehen doch so halb, wusste ich nicht :slight_smile:

iptables kennt nicht nur -A, sondern auch -I. Sprich man kann auch mit einem späten Script frühe Regeln erstellen. Trotzdem kann man natürlich auch das eigene Script numerisch niedrig anordnen und damit dafür sorgen, dass die eigenen Regeln früh abgearbeitet werden.

Ein Script vor 10_univention-firewall_start.sh bringt aber nichts, da das zuerst alle vorhandenen Regeln entfernt (iptables -F …).

Gruß
mosu

1 Like

Ich denke mit iptables -I -Tipp kann ich etwas anfangen!
Danke,
Bernd

Mastodon