Self-hosting /e/ Cloud Services is here!

Specifically out of docker logs ngnix

I changed the router to connect directly to the host running the subdomain, and not via reverse proxy across my webserver httpd conf file. now the bootstrap was working, one thing does not work after installation. actually essential thing. nginx container is crashing/restarting after a few senconds, how can i check the logs in docker?

CONTAINER ID        IMAGE                                                                     COMMAND                  CREATED             STATUS                         PORTS                                                                                                                                                                          NAMES
561e12446cbe        registry.gitlab.e.foundation:5000/e/infra/docker-nginx:1.17               "nginx -g 'daemon of…"   16 hours ago        Restarting (1) 8 seconds ago                                                                                                                                                                                  nginx
d0c3d57bc542        registry.gitlab.e.foundation:5000/e/infra/docker-create-account:1.0.0     "python3 -u ./main.py"   16 hours ago        Up About a minute                                                                                                                                                                                             create-account
0a926accd8b5        registry.gitlab.e.foundation:5000/e/infra/docker-postfixadmin:1.0.0       "tini -- run.sh"         16 hours ago        Up About a minute              8888/tcp                                                                                                                                                                       postfixadmin

I found the issue by listing the logs inside the container that was restarting… found a way to list them on stackoverflow.com and also how to change contents of a file… this might be because of a typing mistake and several tries to install the bootstrap, so if i try to install it now after correcting the config files inside the docker container, the nginx is stable BUT when i issue bootstrap now, then this is the result

Sat Oct 12 11:46:39 UTC 2019: Waiting for Nextcloud to finish installation.............................................................................................................................................................................................................................................................................................................ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

I am sure that you have read this since a few days and I wonder if you have an idea what happens, i n the issue tracker it seems that there is a workaround, that has no explanation on how to do that… if i change docker-compose.yml then it will be changed back to original state before it is used in the init-repo.sh script… please could you share at least a workaround, that i could proceed with nextcloud setup? or is there a blocking point for that… maybe this is a issue with nexcloud and not with ecloud… just i dont understand yet what exactly does not work from the few lines that were written by Felix in the issue tracker. Thanks for some time for documentation/communication.

running in the same error… Did you find the solution to that ?

I dont understand
please provide steps and explain what error message, the one line you wrote is not enough information, thanks for your understanding…

hi.
When trying to run the script i get this error " ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)".

which script?

can you please write exactly what you are trying to get help for?

i ran also a script today

Well, I started the bootstrap process:
# bash bootstrap-generic.sh https://gitlab.e.foundation/e/infra/ecloud-selfhosting
Entered my setup then the scripts ran until screen shows Waiting for Nextcloud to finish installation" for a while from postinstall.sh file, and ends up with ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) " .
So I ran the script line by line, entereing my crendentials by hand inside the containers … And somehow ended up at line 62 :
Fatal error: Uncaught PDOException: SQLSTATE[HY000] [1045] Access denied for user ‘postfix’@‘172.18.0.8’ (using password: YES) in /postfixadmin/functions.inc.php:1564
Stack trace:
#0 /postfixadmin/functions.inc.php(1564): PDO->__construct(‘mysql:host=mari…’, ‘postfix’, ‘kEQPhT8opL4aHj0…’, Array)
#1 /postfixadmin/functions.inc.php(1728): db_connect()
#2 /postfixadmin/functions.inc.php(1691): db_query(‘SELECT value FR…’, Array)
#3 /postfixadmin/functions.inc.php(2025): db_query_one(‘SELECT value FR…’)
#4 /postfixadmin/scripts/postfixadmin-cli.php(152): check_db_version()
#5 /postfixadmin/scripts/postfixadmin-cli.php(409): PostfixAdmin->dispatch()
#6 {main}
thrown in /postfixadmin/functions.inc.php on line 1564

Thanks for your help :slight_smile:

1 Like

thanks, thats a decent error report, i will look into it at the weekend latest, thanks for your patience

hi. Just a quick reminder to know if you had time to look into the problem ?
Cheers

sorry, no but the error description could until then also answered by others maybe

sorry for not replying right away, but for the open source stuff we need all to be patient , me also when i request for other things

Actually I think what i did, in order to solve it because this was recommended by some people from the community to install without OnlyOffice

OnlyOffice is very alpha (not even beta) so even installer is unstable

i think if i remember right this also could solve your issue

so it looks like that you should not try to work around the error that root@localhost is denied by changing something, but solving the root@localhost to be permitted

check your settings in the /etc/ssh/sshd_config and check if PermitRootLogin is set to yes
https://www.tecmint.com/disable-or-enable-ssh-root-login-and-limit-ssh-access-in-linux/

after successful installation do not forget to change this setting to PermitRootLogin to no again

I really want to setup my self-hosted /e/-cloud, but i cant get a PTR record because my internet connection has dynamic IP-addresses.
Is there any chance to skip checking for PTR record?
All other DNS-Records are set up correctly.

It’s not a SSH problem, but a MariaDB (MySQL).
It seems that on later builds, root access is no longer allowed by default :frowning:

I managed to solve this problem, but Docker is a real pain in my a** :nauseated_face: , I wonder why developers persist in using it …

If anyone’s interested, what I’ve done :

  • stopped all components by

docker-compose stop

  • retrieve the password from /mnt/repo-base/.env
  • started a new container of mariadb using

docker container run -i -t -v “/mnt/repo-base/volumes/mysql/db:/var/lib/mysql” -v “/mnt/repo-base/config-dynamic/nextcloud/database:/docker-entrypoint-initdb.d” mariadb:10.3.17 ‘/bin/bash’

  • once started, I got an interactive bash shell :slight_smile:
  • in this shell, launched

mysqld_safe --defaults-file=/etc/mysql/debian.cnf --skip-grant-tables --user=root &

  • and then

mysql -u root

  • in SQL shell, launched

use mysql;
update user set password=password(‘<MYSQL_ROOT_PASSWORD>’) where user=‘root’;
update user set authentication_string=‘’ where user=‘root’;
update user set plugin=‘’ where user=‘root’;
flush privileges;
\q

  • then killed the mysqld process and the shell (ctrl-d), destroyed the container

docker container ls -a
docker container rm #

  • then restarted the mariadb container and checked

docker container ls -a
docker container start #
docker exec -i -t # bash
mysql -u root -p
(ctrl-d)
docker container stop #

  • then restarted all

source /mnt/repo-base/scripts/base.sh
docker-compose start

  • and relaunched the post-install script

/mnt/repo-base/scripts/postinstall.sh

A little further, I got :

PHP Fatal error: Uncaught PDOException: SQLSTATE[HY000] [1045] Access denied for user ‘postfix’@‘172.18.0.8’ (using password: YES) in /postfixadmin/functions.inc.php:1564

I had to connect a shell to mariadb container and use the following SQL to unlock :

grant all privileges on . to ‘postfix’@‘172.18.0.%’ identified by ‘’ with grant option;

After that the scripts ended successfully :slight_smile:

And, finally, it works ! :man_dancing:

2 Likes

For your information, Hetzner cloud VPS are working fine for /e/ private cloud.
LWS won’t, because of LXC (it is possible to run Docker into LXC, but this need some tunings …).

Thanks for taking the time to debug this. Passed the info on to the developers.

Hi @smu44,

thanks for sharing a solution for the problems these users are facing.
On our side, we use the selfhosting repository very often to set up test servers from scratch, so we were not aware of such issue. We use different providers for the tests: OVH, DigitalOcean, Scaleway, Hetzner. Maybe you can try on one of those, at least to rule out an incompatibility with your current hoster.

If you still get this error, or can reproduce it on at least two providers (VPS or dedicated server, not shared hosting), please open a ticket on our GitLab.

I will close now this thread, which was the original announcement of the self-hosting project last year. Thanks for your understanding.