alexbelgium / hassio-addons

My homeassistant addons
MIT License
1.35k stars 193 forks source link

πŸ› [Nextcloud] Nextcloud only starts in maintenance mode #1429

Closed Sniptzler closed 2 weeks ago

Sniptzler commented 2 weeks ago

Description

When starting the nextcloud addon it needs more than ten minutes for this step

Updating permissions...
... Config directory : /data
... data directory detected : /share/nextcloud
... setting permissions

and it only starts in maintenance mode. It is configures with a MariaDB server like described in the tutorial. It worked for many moths and broke somwhere in the last two weaks maybe after updating Nextcloud.

Reproduction steps

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

Addon Logs

-----------------------------------------------------------
 Add-on: Nextcloud
 Nextcloud for Homeassistant
-----------------------------------------------------------
 Add-on version: 29.0.2
 You are running the latest version of this add-on.
 System: Home Assistant OS 12.3  (amd64 / generic-x86-64)
 Home Assistant Core: 2024.6.1
 Home Assistant Supervisor: 2024.06.0
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums
-----------------------------------------------------------
 Provided by: https://github.com/alexbelgium/hassio-addons 
-----------------------------------------------------------
 Defining permissions for main user : 
User UID: 1000
User GID : 1000
-----------------------------------------------------------
/etc/cont-init.d/00-global_var.sh: executing
Full_Text_Search='false'
OCR='false'
OCRLANG='fra'
PGID='1000'
PUID='1000'
additional_apps='inotify-tools'
certfile='fullchain.pem'
default_phone_region='DE'
elasticsearch_server='<ip:port>'
enable_thumbnails='true'
keyfile='privkey.pem'
trusted_domains='homeassistant, homeassistant.fritz.box, homeassistant.local, 10.10.10.10'
use_own_certs='false'
/etc/cont-init.d/00-local_mounts.sh: executing
/etc/cont-init.d/00-smb_mounts.sh: executing
/etc/cont-init.d/01-config_yaml.sh: executing
Setting permissions for the config.yaml directory

Load environment variables from /config/addons_config/nextcloud-ocr/config.yaml if existing
If accessing the file with filebrowser it should be mapped to /homeassistant/addons_config/nextcloud-ocr/config.yaml
---------------------------------------------------------
Wiki here on how to use : github.com/alexbelgium/hassio-addons/wiki/Add‐ons-feature-:-add-env-variables

maintenance='false'
/etc/cont-init.d/01-custom_script.sh: executing
Execute /homeassistant/addons_config/nextcloud-ocr/nextcloud-ocr.sh if existing
Wiki here : github.com/alexbelgium/hassio-addons/wiki/Add-ons-feature-:-customisation
/etc/cont-init.d/01-folders.sh: executing
Setting user to 1000:1000
Updating permissions...
... Config directory : /data
... data directory detected : /share/nextcloud
... setting permissions
... done

/etc/cont-init.d/02-init_steps.sh: executing
sed: /data/config/nginx/site-confs/*.conf: No such file or directory
Error : /etc/cont-init.d/02-init_steps.sh exiting 1
/etc/cont-init.d/02-mariadb_discovery.sh: executing
/etc/cont-init.d/30-ssl.sh: executing
/etc/cont-init.d/99-add_packages.sh: executing
/etc/cont-init.d/99-elasticsearch.sh: executing
/etc/cont-init.d/99-ocr.sh: executing
/etc/cont-init.d/99-trusted_domains.sh: executing

Starting the upstream container

[migrations] started
[migrations] 01-nginx-site-confs-default: skipped
[migrations] 02-default-location: skipped
[migrations] done
───────────────────────────────────────

      β–ˆβ–ˆβ•—     β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—
      β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•β–ˆβ–ˆβ•—
      β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘
      β–ˆβ–ˆβ•‘     β•šβ•β•β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘
      β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•
      β•šβ•β•β•β•β•β•β•β•šβ•β•β•β•β•β•β•β•šβ•β• β•šβ•β•β•β•β•β•

   Brought to you by linuxserver.io
───────────────────────────────────────

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    1000
User GID:    1000
───────────────────────────────────────

using keys found in /data/config/keys
Initializing nextcloud 29.0.2.2 (this can take a while) ...
Setting permissions
Initializing finished
Starting...
/etc/cont-init.d/02-mariadb_discovery.sh: executing
---
MariaDB addon was found! It can't be configured automatically due to the way Nextcloud works, but you can configure it manually when running the web UI for the first time using those values :
Database user : service
Database password : ############################################################
Database name : nextcloud
Host-name : core-mariadb:3306
---
/etc/cont-init.d/99-add_packages.sh: executing
[19:31:55] INFO: Installing additional apps :
... inotify-tools
/etc/cont-init.d/99-elasticsearch.sh: executing
/etc/cont-init.d/99-ocr.sh: executing
/etc/cont-init.d/99-trusted_domains.sh: executing
[19:31:59] INFO: Currently set trusted domains :
Nextcloud is in maintenance mode, no apps are loaded.
Commands provided by apps are unavailable.
homeassistant:8099
homeassistant
homeassistant.fritz.box
homeassistant.local
10.10.10.10
[19:32:00] INFO: Trusted domains set in the configuration. Refreshing domains.
[19:32:00] INFO: ... removing previously added trusted domain (except for first one created)
Nextcloud is in maintenance mode, no apps are loaded.
Commands provided by apps are unavailable.
System config value trusted_domains => 2 deleted
Nextcloud is in maintenance mode, no apps are loaded.
Commands provided by apps are unavailable.
System config value trusted_domains => 3 deleted
Nextcloud is in maintenance mode, no apps are loaded.
Commands provided by apps are unavailable.
System config value trusted_domains => 4 deleted
Nextcloud is in maintenance mode, no apps are loaded.
Commands provided by apps are unavailable.
System config value trusted_domains => 5 deleted
[19:32:03] INFO: ... alignement with trusted domains list : homeassistant, homeassistant.fritz.box, homeassistant.local, 10.10.10.10
[19:32:03] INFO: ... adding homeassistant
Nextcloud is in maintenance mode, no apps are loaded.
Commands provided by apps are unavailable.
System config value trusted_domains => 6 set to string homeassistant
[19:32:04] INFO: ... adding homeassistant.fritz.box
Nextcloud is in maintenance mode, no apps are loaded.
Commands provided by apps are unavailable.
System config value trusted_domains => 7 set to string homeassistant.fritz.box
[19:32:04] INFO: ... adding homeassistant.local
Nextcloud is in maintenance mode, no apps are loaded.
Commands provided by apps are unavailable.
System config value trusted_domains => 8 set to string homeassistant.local
[19:32:05] INFO: ... adding 10.10.10.10
Nextcloud is in maintenance mode, no apps are loaded.
Commands provided by apps are unavailable.
System config value trusted_domains => 9 set to string 10.10.10.10
[19:32:06] INFO: Remaining configurated trusted domains :
Nextcloud is in maintenance mode, no apps are loaded.
Commands provided by apps are unavailable.
[19:32:07] INFO: homeassistant:8099
homeassistant
homeassistant.fritz.box
homeassistant.local
10.10.10.10

Starting the upstream container

[custom-init] No custom files found, skipping...
crond: crond (busybox 1.36.1) started, log level 8
[ls.io-init] done.
[11-Jun-2024 19:32:10] NOTICE: fpm is running, pid 2458
[11-Jun-2024 19:32:10] NOTICE: ready to handle connections

Architecture

amd64

OS

HAos

alexbelgium commented 2 weeks ago

Hi, thanks for reporting I'll push a new version, could you please confirm if it works?

alexbelgium commented 2 weeks ago

The new version pushed should try to solve common issues, then disable maintenance mode if successful

Sniptzler commented 2 weeks ago

Thanks for the quick fix, works for me.

iGaneshKumar commented 1 week ago

@alexbelgium I'm not sure if this is the right place to ask, but it feels like it might be. I followed these two YouTube videos (Vid-1 and Vid-2) to set up my external hard drive as a mount and Nextcloud. It worked until about two or three weeks ago. When the power goes out and comes back, my Home Assistant system won't start. I think it's stuck because Nextcloud can't start on time, which prevents Home Assistant from booting up. To fix this, I have to remove the hard drive from the thin client, start Home Assistant, reconnect the USB, and restart Nextcloud. This process is too time-consuming and power outages are common here. Any help or workaround would be greatly appreciated. I'm using: OS Version: Home Assistant OS 12.3 Home Assistant Core: 2024.6.3 Nextcloud: Current version 29.0.2-2

It just stuck here for long: Updating permissions... ... Config directory : /data ... data directory detected : /media/NEXTCLOUD/nextcloud ... setting permissions

alexbelgium commented 1 week ago

I've made a new issue