when I go to my_URL/nextcloud I get this error on a web page:
Nextcloud - Letsencrypt issue
-
- gelöst
- STUKguy
-
-
Yes.
Were all your containers affected by the PGID typo? If yes you should the delete the appdata folder (or whereever your config files are stored) and restart fresh
-
IT WORKED! I am getting to the Nextcloud initiation page.
Thank you so much.
Maybe worth updating the original instructions as the file size error always appears until I change to 1024m as you mentioned in your earlier post above.
-
no i am getting the following error on the initial Nextcloud setup page:
Error
Error while trying to create admin user: Failed to connect to the database: An exception occurred in driver: SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Try again
-
Any ideas where I can look for the issue? I am attaching a screenshot of the error.
-
In the screenshot you mixed the two bottom fields. In the last field you need to provide the path to the database and this is the mariaDB container, which is identified by its container name (nextclouddb).
-
I tried both ways. Same error message.
-
any idea what could be the issue?
-
The error message suggest that nextcloud can't connect to the database.
I also had this issue some time ago. Not sure if its the same problem. It was after an update of the mariaDB image, that prevented nextcloud from creating the database.
The solution was to bring up the database yourself. The "easiest" way to do this:
Stop your containers: docker-compose down
Remove the mariaDB config folder: e.g. rm -r /srv/dev-disk-by-label-disk1/appdata/nextclouddb
Edit your docker-compose.yml: nano docker-compose.yml
Edit the section of mariadb to look like this:
Code
Alles anzeigenmariadb: image: linuxserver/mariadb container_name: nextclouddb environment: - PUID=1000 #change PUID if needed - PGID=100 #change PGID if needed - MYSQL_ROOT_PASSWORD=mariadbpassword #change password - TZ=Europe/Berlin #Change Time Zone if needed - MYSQL_DATABASE=nextcloud - MYSQL_USER=nextcloud - MYSQL_PASSWORD=somepassword volumes: - /srv/dev-disk-by-label-disk1/appdata/nextclouddb:/config #/srv/dev-disk-by-label-disk1 needs to be adjusted restart: unless-stopped
Save the file: CTRL +x ; y; ENTER
Bring the containers up again: docker-compose up -d
When at the nextcloud setup page enter these credentials:
- Database user = nextcloud
- Database password = somepassword
- Database name = nextcloud
- Database location = nextclouddb
-
The swag container is complaining now and not generating any more certificates. Do you know any workarounds here?:
-
You need to wait until letsencrypt cools of.
Or you use another domain.
-
ok - I tried as per your YML file but still the same error. Any more ideas? Is there a way to log into the container and do some tests on the database?
-
Some people are reporting that this error has something to do with localhost settings. Do you know where I would need to change these?
SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name or service not known
'm here because I update my php version from php 5 to php56. If you have admin right you can log into root and look for /etc/hosts. This file controls the location of localhost. I opened settings.inc.php and changed this define('_DB_SERVER_', 'localhost:3306'); to reference define('_DB_SERVER_', '127.0.0.1'); and now my website works!
-
Is there a way to log into the container and do some tests on the database?
docker exec -it nextclouddb bash gives a bash console inside the mariadb container
SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name or service not known
'm here because I update my php version from php 5 to php56. If you have admin right you can log into root and look for /etc/hosts. This file controls the location of localhost. I opened settings.inc.php and changed this define('_DB_SERVER_', 'localhost:3306'); to reference define('_DB_SERVER_', '127.0.0.1'); and now my website works!
I highly doubt that going that route will help you. Because we do not use localhost as our database path. We use the container name because the docker internal dns service will resolve it to the address.
But unfortunately I dont have any more ideas to troubleshoot this. Have you checked the log of the mariadb container? Any issues there?
-
I checked mariadb log. Do you see anything?
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.,
[s6-init] ensuring user provided files have correct perms...exited 0.,
[fix-attrs.d] applying ownership & permissions fixes...,
[fix-attrs.d] done.,
[cont-init.d] executing container initialization scripts...,
[cont-init.d] 01-envfile: executing... ,
[cont-init.d] 01-envfile: exited 0.,
[cont-init.d] 10-adduser: executing... ,
,
-------------------------------------,
_ (),
| | ___ _ __,
| | / __| | | / \ ,
| | \__ \ | | | () |,
|_| |___/ |_| \__/,
,
,
Brought to you by linuxserver.io,
-------------------------------------,
,
To support LSIO projects visit:,
https://www.linuxserver.io/donate/,
-------------------------------------,
GID/UID,
-------------------------------------,
,
User uid: 1004,
User gid: 1004,
-------------------------------------,
,
[cont-init.d] 10-adduser: exited 0.,
[cont-init.d] 30-config: executing... ,
[cont-init.d] 30-config: exited 0.,
[cont-init.d] 40-initialise-db: executing... ,
[cont-init.d] 40-initialise-db: exited 0.,
[cont-init.d] 99-custom-scripts: executing... ,
[custom-init] no custom files found exiting...,
[cont-init.d] 99-custom-scripts: exited 0.,
[cont-init.d] done.,
[services.d] starting services,
[services.d] done.,
201122 14:04:47 mysqld_safe Logging to syslog.,
201122 14:04:47 mysqld_safe Starting mysqld daemon with databases from /config/databases
-
UID 1004 and GID 1004 look weird, is that really correct? Otherwise I dont see an error
-
yes 1004 is correct.
-
for both? usually gid is in the 100+ section
-
on my portainer dashboard the mariadb container does not show any published ports. SHouldn't there be 3006 or so for the database?
-
no, when accessed over the interal docker network no ports need to be published on the host. Can you post the output of id user_you_use_for_your_container
Jetzt mitmachen!
Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!