Unable to create account self-hosted?

I successfully, I think, set up a self-hosted environment. I am able to log into the ncadmin account and changed the password of the rainloop admin account. I’m having two issues thus far and cannot find the answer or log files to point me in the right direction are:

  1. I cannot log into the Postfix admin account as shown in the result from running show-info.sh

  2. I cannot create an account after generating the welcome email. I get the following error A server-side error occurred while processing your request! Please try again later.

Please provide some direction to fix these issues so that I can proceed with my migration from Google’s services to my own and flash the rom for my phone. Until I’m able to get the self-hosted services up and running, I am stuck with Google.

Thanks in advance!

Hi,

Not easy to help having only a few information, anyway you can try this:

  1. Setup your environment with:
    a. cd /mnt/repo-base
    b. source scripts/base.sh
  2. Get some info and please output result here, obfuscating any sensitive information:
    a. PostfixAdmin admin with docker-compose exec -T postfixadmin /postfixadmin/scripts/postfixadmin-cli admin view $ALT_EMAIL
    b. domain info with docker-compose exec -T postfixadmin /postfixadmin/scripts/postfixadmin-cli domain view $DOMAIN
    c. for the reference : scripts/postinstall.sh · master · e / infra / ecloud-selfhosting · GitLab
  3. This may be related with previous problem. Please provide us with some mandatory details, as:
    a. what method did you use (the script from here, or … ?)
    b. how/where the error is output, was something entered/displayed before ?
  4. Did you keep a trace of the whole installation process ? Something may have gone wrong at some point…
  5. If it’s OK for you, please restart from scratch with something like:
    a. docker-compose down -v --rmi all
    b. cd then rm -rf /srv/repo-base/*
    c. reboot, restart from https://gitlab.e.foundation/e/infra/ecloud-selfhosting/-/tree/master#start-bootstrap-process
    c. please use postmaster@yourdomain.tld as alternative email (as usual, replace yourdomain.tld with your domain)
1 Like

Thank you for the response! I’ll give it another shot and report back.

I followed the steps listed on the GitLab page you linked in 2a. I scrolled back but there were no errors during installation so I didn’t keep any of the logs.

The Postfix admin webpage is only part of the problem, I’m unable to create an account using the generated welcome link. It gives the server-side error I listed.

I’m doing this in a VM and created a snapshot so that I can always rollback to a fresh installation. The issues listed in the original post were from my third attempt.

One problem solved :smile_cat:

Maybe you should also run manually lines #97 to #104 (of course after step 0. from here).
Then, restart the welcome container with docker-compose restart welcome.
Please let us know what it gives.

Definitively, something happened at some point when running the postinstall script …

1 Like

Running line# 97 gives the following:

Welcome to Postfixadmin-CLI v0.3
---------------------------------------------------------------
fsockopen failed - errno: 111 - errstr: Connection refused

The mailbox drive@sixshooterz.cloud has been added to the mailbox table.

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

and similarly, line 98 gives:

Welcome to Postfixadmin-CLI v0.3
---------------------------------------------------------------

The mailbox welcome@sixshooterz.cloud has been added to the mailbox table.

---------------------------------------------------------------
fsockopen failed - errno: 111 - errstr: Connection refused

Lines 102-104 ran without error or any output. I restarted the welcome container. Unfortunately, I still get the error in the image above. Are there any logs I can inspect to see what is causing the server-side error?

Thank you for your time and patience!

Hmmm … errors 111 for fsockopen are weird :frowning:

Could you please try docker-compose exec -T postfixadmin tail -100 /postfixadmin/config.local.php, and check that :

  • database_host is “mariadb”
  • smtp_server is “mail.yourdomain.tld”

Also, please check that evety password (database & admin) match the ones in /mnt/repo-base/.env file.

1 Like

Also, there may be a problem with Docker’s internal IPAM and DNS.
Best way to get rid of this kind of problem is to reboot the server :wink:

May I ask details about your infra, like:

  • host OS and networking
  • virtualization solution
  • guest OS, including source image and virtualized networking
    ?
1 Like

When I look into the config.local.php file in postfixadmin, the lines appear to be repeated over and over… several times. I’m going to attempt to clean that up but I’m thinking I might be best served starting over.

Absolutely! I’m running Ubuntu Focal 20.04 on VMware ESXi. The host is behind a firewall and the only open ports, currently, are 80 and 443. I haven’t opened any of the mail ports inbound.

Yes, that’s what I’ll do, too …

Thanks :slight_smile:
As you likely to have a private RFC1918 IP address range for your VM, please ensure that it doesn’t interfere with Docker (you can check with docker network ls then docker network inspect with each bridge network).
Or you’ve set up a Port Group with public IP addresses ?

Also, how is your DNS ? If you wish to get email to work in the future, there are probably some things needing extra care here …
For now, please ensure that the Docker instances can resolve the correct MX record, as well as a PTR reverse entry matching your server IP (this should be tested by install script anyway). Note : hosts file entries may not work OOTB.

Please be aware that some Docker inter-instances network traffic may use the “public” DNS records and/or address (the host IP of your VM). For example, some may use the MX records.
This causes traffic to loop-back through host IP address (never go out the VM, anyway).

In current state, you should have a private DNS server, with every entries for you domain zone resolving to your private VM IP address, as well reverse PTR to your DNS mail name, right ?

1 Like

I should’ve specified, my apologies! This host is running in a datacenter. The firewall has all of the public IPs and NATs them to the VM properly. Nothing else is running on the VM I’ve dedicated for eCloud, it was set up with a base install of Ubuntu with prereqs added for eCloud, then I ran everything step by step from the gitlab page we’ve referenced in earlier posts. I don’t have private DNS set up for this VM (as outlined on gitlab and the setup script), everything is done via Cloudflare and, just to ensure no issues, I have proxy turned off for each entry until everything functions as it should. :slight_smile: Once it’s up and running, I can bork it myself and know what I did and undo it.

I know there’s more to do with the firewall rules to get the sending and receiving of email to work as well as IMAP and such, I’ll sort that out once I’m able to actually create my account. :slight_smile:

I’ll revert my VM back and run through the setup again, verifying each step along the way to make sure it’s run in it’s entirety.

Again, thank you so much for your help!

Thanks for sharing all details ! :smiley_cat:

Yes, I think that your problem could be related to this.
But hosts file may not be the solution, as some scripts/programs may forcibly use DNS requests.

After running step #0, what gives
docker-compose exec mariadb mysql --user=root --password=$MYSQL_ROOT_PASSWORD -e "select * from postfix.domain;"
docker-compose exec mariadb mysql --user=root --password=$MYSQL_ROOT_PASSWORD -e "select * from postfix.admin;"
docker-compose exec mariadb mysql --user=root --password=$MYSQL_ROOT_PASSWORD -e "select * from postfix.domain_admins;"
?

I’m running low on free time right now, I’ll think about your problem and post back later …

1 Like

No worries, thank you for all the time you’ve put into helping me resolve!

Running the above commands gave the following output:

root@sixshooterz:/mnt/repo-base# docker-compose exec mariadb mysql --user=root --password=$MYSQL_ROOT_PASSWORD -e "select * from postfix.domain;"
+-------------------+-------------+---------+-----------+----------+-------+-----------+----------+---------------------+---------------------+--------+-----------------+
| domain            | description | aliases | mailboxes | maxquota | quota | transport | backupmx | created             | modified            | active | password_expiry |
+-------------------+-------------+---------+-----------+----------+-------+-----------+----------+---------------------+---------------------+--------+-----------------+
| sixshooterz.cloud |             |      10 |        10 |       10 |  2048 | virtual   |        0 | 2022-03-30 22:54:09 | 2022-03-30 22:54:09 |      1 |               0 |
+-------------------+-------------+---------+-----------+----------+-------+-----------+----------+---------------------+---------------------+--------+-----------------+
root@sixshooterz:/mnt/repo-base# docker-compose exec mariadb mysql --user=root --password=$MYSQL_ROOT_PASSWORD -e "select * from postfix.admin;"
+------------------------------+--------------------------------------------------------------------------------------------------------------------------+---------------------+---------------------+--------+------------+-------+-------------+-------+---------------------+
| username                     | password                                                                                                                 | created             | modified            | active | superadmin | phone | email_other | token | token_validity      |
+------------------------------+--------------------------------------------------------------------------------------------------------------------------+---------------------+---------------------+--------+------------+-------+-------------+-------+---------------------+
| postmaster@sixshooterz.cloud | password-removed | 2022-03-30 22:53:30 | 2022-03-30 22:53:30 |      1 |          1 |       |             |       | 2022-03-30 22:53:30 |
+------------------------------+--------------------------------------------------------------------------------------------------------------------------+---------------------+---------------------+--------+------------+-------+-------------+-------+---------------------+
root@sixshooterz:/mnt/repo-base# docker-compose exec mariadb mysql --user=root --password=$MYSQL_ROOT_PASSWORD -e "select * from postfix.domain_admins;"
+------------------------------+--------+---------------------+--------+
| username                     | domain | created             | active |
+------------------------------+--------+---------------------+--------+
| postmaster@sixshooterz.cloud | ALL    | 2022-03-30 22:53:30 |      1 |
+------------------------------+--------+---------------------+--------+

Didn’t realize the password was in the first response… and didn’t realize that anyone can see edits. :man_facepalming:

Sorry, I’ve should have warned you :frowning:
Anyway:

I’m currently trying to install a similar setup as yours.
Not easy, I have access to hundreds of ESXi but no public network allowing me to use a DNS domain of my own, with PTR record …

1 Like

By the way, your SQL tables content seems OK to me :slight_smile:

1 Like

The SQL tables looking correct is definitely a good thing!

Shouldn’t there be a log file for the welcome container that’s written to when the server-side error is generated? I’ve looked around and I can’t seem to find one.

In fact, there are only HTTP logs in welcome container’s, not PHP.

You may find the entry point create.php of interest, including the “required” files.
What we can see, is calls to Nextcloud APIs, using the public DNS/IP address.

So, you could try

  • to activate HTTPS from the public IP address to your VM
  • and/or uncomment lines 2 to 4 in create.php (you may find Docker cp useful, path would be welcome:/var/www/html/create.php), then show live logs with docker-compose logs -f -t --tail 1 welcome then retry account validation

That may bring you a step forward !

Sorry, I couldn’t find enough time to get my hands on an network infrastructure similar to yours :frowning:

1 Like

No worries! I greatly appreciate all of your help so far!

I have a busy weekend ahead with my son so I will give this all a try in the coming days and report back.

Reporting back. Here’s what I’ve tried.

  • I couldn’t connect when replacing the CNAME of the welcome subdomain with an IP address, it errors because nginx is in front expecting a server name (not IP), I would imagine?
  • I uncommented lines 2-4 in the create.php file and see an error 500 when trying to create the account. There isn’t much more to the error, as I can see.
  • Changing create.php to point directly to the nextcloud container instead of the public IP. For creating an account, it shouldn’t have to reach out and back, welcome should be able to talk directly to nextcloud. No change to the error
  • Installed ping into the welcome container. I am able to ping the public IP address as well as the domain and all associated CNAME created before starting.

I can’t post a link to the pastebin of the log files. There’s not much of interest, I don’t think.

PS-- I just had three of my legitimate posts, one on a device request which is now available, and two on this thread, marked as spam by the community. That’s pretty shady, imo!! If the community feels me requesting a device that was unavailable at the time and reaching out for assistance in self-hosting is spam, I don’t need to be a part of this community.

IMHO, self-hosted /e/ Cloud is designed to be installed with a public IP address.
So, apart from running your own private DNS server to “fake” DNS resolve from the inside, the only solution I could see is to allow traffic from the Internet to your VM …

Maybe @manoj could explain what happened ? :pray:

I have already responded to the mail sent by @sixshooterz …new users posting threads with external links is marked as spam by the system. The process works with spammers, but at times genuine posts gets caught in this.
The user has deleted two of the posts, so they are not available now.

1 Like