Single Server Ubunt...
 
Notifications
Clear all

Single Server Ubuntu Script Failed out on extra options

5 Posts
3 Users
1 Reactions
2,069 Views
(@anomaly0617)
Active Member
Joined: 3 years ago
Posts: 20
Topic starter  

Hi all,

I installed a new virtual machine containing Ubuntu Server 22.04 the other day, giving the main OS 160 GB and the /opt directory specifically 1 TB for email storage. It has 8 CPU and 16 GB of RAM. The SAN contains solid state drives.

I ran this script specifically, following the steps on the page.

It failed out with the error:

service-discover: error: unable to open /etc/zextras/service-discover/cluster-credentials.tar.gpg: cannot find Cluster credential in /etc/zextras/service-discover/cluster-credentials.tar.gpg, please copy the file from the existing server
cannot access to bootstrap token.

I would really suggest that someone on the Zextras team do the same build I did and see what errors appear, and then evaluate how to fix it for future installers. If you really need someone to, I'll do it myself and then send you the screen recording of exactly what I do and you can evaluate what I'm doing wrong, if anything.

Anywho, back on topic:

I googled it, found this page, googled around the broken link, fixed my hosts file, and got my cluster password and the file it needed set. Re-ran the service-discover tool and it failed out on something else, but I got to carbonio-bootstrap and generally got a server up and running. But now I'm wondering "what isn't working that should be?"

My understanding is that I should be able to go to port 10000 on this server (not sure if that's http://127.0.0.1:10000 , or http://192.168.xxx.yyy:10000 , or http://fqdn.domain.com:10000 or what) and I cannot. The port appears to be open on some oddball 127.78.0.xxx IPs according to "netstat -an | grep 10000", but not on my 192.168.xxx.yyy address nor on anything that would respond via my public http://fqdn.domain.com domain name.

So, how can I determine the health of my new install?

Thanks, in advance!

-P


   
Quote
(@anomaly0617)
Active Member
Joined: 3 years ago
Posts: 20
Topic starter  

An update to my own entry:
With the help of the following two links, I got this resolved:

  1. Resetting the Postgres password. No idea what the carbonio_adm password was originally set to, but I had to reset it.
  2. Single Server Installation Checklist. Even though this was written for Ubuntu 20.04 and Postgres 12, and I'm on Ubuntu 22.04 and Postgres 16, it still proved very useful and easy to follow.

So, this one can be marked "solved"!

 

Thanks!

-P

 


   
Sharif reacted
ReplyQuote
(@sharif)
Honorable Member Admin
Joined: 4 years ago
Posts: 976
 

@anomaly0617 

Hi,

Thank for your feedback. Let me share a simple procedure to change.reset the postgres password:

zextras@mail:~$ su - postgres
postgres@mail:~$ psql
psql (12.17 (Ubuntu 12.17-0ubuntu0.20.04.1))
Type "help" for help.

postgres=#
postgres=# ALTER ROLE carbonio_adm WITH PASSWORD '654321';
postgres=# exit
postgres@mail:~$ exit
logout
root@mail:~#

Though now you can reset service wise password but that's another talk for another day!

Have a great weekend and stay blessed.

Regards,

Sharif


   
ReplyQuote
(@hodfords)
Active Member
Joined: 3 years ago
Posts: 24
 

127.78.0.xxx is the internal address used by some of carbonio's services..... I just ran into exactly the same issue but on further analysis; 

 /etc/zextras/service-discover/cluster-credentials.tar.gpg <= this is for multi-server environments which is why on a single server installation it is missing... 


   
ReplyQuote
(@hodfords)
Active Member
Joined: 3 years ago
Posts: 24
 
service-discover: error: unable to open /etc/zextras/service-discover/cluster-credentials.tar.gpg: cannot find Cluster credential in /etc/zextras/service-discover/cluster-credentials.tar.gpg, please copy the file from the existing server
cannot access to bootstrap token.

This happens a lot with the scripted installation; it's really annoying; it took me a while to work out how to get around it. 

run these as root; you basically need to completely delete all of the previously configured stuff. 

systemctl stop service-discover
rm -f /etc/zextras/service-discover/config.json
rm -f /etc/zextras/service-discover/main.json
rm -f /etc/zextras/service-discover/cluster-credentials.tar.gpg
rm -f /var/lib/service-discover/password
rm -f /var/lib/service-discover/*.pem
rm -rf /var/lib/service-discover/data
mkdir -p /var/lib/service-discover/data
chown -R service-discover:service-discover /var/lib/service-discover

 

Followed by 

# Type a strong password when prompted (it will not echo)
read -s -p "Insert Mesh Password: " MESH_SECRET
echo

# Confirm it is not empty
echo "Password length: ${#MESH_SECRET}"

# Run the first-instance setup
service-discover setup $(hostname -i) --first-instance --password="$MESH_SECRET"

hostname -i should yield your IP address; alternatively - you can hard-code your IP address with 

service-discover setup xx.xxx.xxx.xxx --first-instance --password="$MESH_SECRET"

if this fails - you can try 

service-discover setup-wizard

 


   
ReplyQuote