Ubuntu 18 install issue

Hi,

I am a brand new user and I am not sure what’s going on. The Git page says the following:
Mail-in-a-Box turns a fresh Ubuntu 18.04 LTS 64-bit machine into a working mail server by installing and configuring various components.

So I spun an 18.04 LTS in UpCloud and lo and behold the script says it only support 14.04. I then deleted the server, spun an 14.04, installed Miab, upgraded through to 18.04, the NS records disappeared… somehow, I tried to rebuild and it again said it’s not compatible.

Is there a way to install v0.30 on 18.04 presently?

Hi,

There is a typo in the Git pages. You have a choice - either install the current v 0.30 under Ubuntu 14.04 or install the beta ubuntu_bionic branch. You cannot install v0.30 under Ubuntu 14.04 and then upgrade to 18.04.

I am working to get the Git page fixed …
@JoshData
Ok, it looks like the Git page has been updated in anticipation of the release of MailInABox for Ubuntu 18.04 which should be in the next few days…

Thanks!

Now the stupid user question: How do I install the beta?

Not the best link sorry … let me know if this is not clear.

So here is the instructions you should have followed:

$ git clone --single-branch -b ubuntu_bionic --depth=1 https://github.com/mail-in-a-box/mailinabox.git
$ cd mailinabox
# bash setup/start.sh

Thank you, alento!

I shall report success or failure in the next few hours.

Don’t get disappointed but Mail-in-a-box hangs at starting mail-in-a-Box daemon point of the script, when trying to install it in UpCloud servers (I can’t say you why, but fails). Try DigitalOcean, Linode (where should work by default) if fails for you, too …

If finally worked for you at UpCloud, please, let us know.

Hope this helps.

That flag is no longer necessary since I merged the branch into the master branch yesterday, but it’s fine(-ish). I plan to make an official release of the Ubuntu 18.04 work in the next couple of days, so this will all get cleared up very soon.

Yep, it sure did hang. I believe it has something to do with python encoding of special characters. Though I am not sure which special characters exactly. I was just leaving work when it happened. When I come back I’ll post the error here. I did not have any special characters in the admin email at all.

Here’s the error after the setup passed source setup/munin.sh. Checking the service status produced this. Also port 10222 was not open, I assume because the service starts it? Does this help?

xxxxx@ xxxxxxxxxxx:~# systemctl status mailinabox

  • mailinabox.service - Mail-in-a-Box System Management Service
    Loaded: loaded (/root/mailinabox/conf/mailinabox.service; enabled; vendor preset: enabled)
    Active: failed (Result: exit-code) since Thu 2019-01-10 17:37:13 EST; 11min ago
    Main PID: 18684 (code=exited, status=1/FAILURE)

Jan 10 17:37:08 xxxxxxxxxxx systemd[1]: Started Mail-in-a-Box System Management Service.
Jan 10 17:37:13 xxxxxxxxxxx start[18684]: Traceback (most recent call last):
Jan 10 17:37:13 xxxxxxxxxxx start[18684]: File “/root/mailinabox/management/daemon.py”, line 27, in
Jan 10 17:37:13 xxxxxxxxxxx start[18684]: for line in f:
Jan 10 17:37:13 xxxxxxxxxxx start[18684]: File “/usr/local/lib/mailinabox/env/lib/python3.6/encodings/ascii.py”, line 26, in decode
Jan 10 17:37:13 xxxxxxxxxxx start[18684]: return codecs.ascii_decode(input, self.errors)[0]
Jan 10 17:37:13 xxxxxxxxxxx start[18684]: UnicodeDecodeError: ‘ascii’ codec can’t decode byte 0xc3 in position 795: ordinal not in range(128)
Jan 10 17:37:13 xxxxxxxxxxx systemd[1]: mailinabox.service: Main process exited, code=exited, status=1/FAILURE
Jan 10 17:37:13 xxxxxxxxxxx systemd[1]: mailinabox.service: Failed with result ‘exit-code’.

Thanks Josh. I must admit I was stymied by these instructions on my 14.04 box, which prompted me to upgrade to v.30:

image

… only to see the setup.sh script reject my 18.04.1 LTS box in favor of 14.04:

image

I will wait patiently for the real support of 18.04. I suspect I am not the only one alarmed by the conflicting instructions from setup.sh on the two versions.

Apologies, I finally had some time to figure out why the installer is breaking. During the install, deamon.py on line 27 opens the country codes file (csr_country_codes.tsv) and when it reaches byte 0xc3 (position 795) of that file, namely the first letter of the wonderful Åland Islands, it just breaks. The real kicker is… UpCloud must be borking the 18.04 install as the VPS gets provisioned without a specified locale. So, running this ONCE the server is provisioned but BEFORE you install MiaB fixes it:

locale-gen en_US.UTF-8
update-locale LANG=en_US.UTF-8
reboot

This, clearly, set the locale, and, most importantly, sets the system-wide encoding to be used. After that, there are no issues with the install and everything proceeds as planned.

Guess I have to ping UpCloud to fix their deployments, or maybe it can be added as a script.

3 Likes

Hi yonkoc - thank you for this, I’ve spun up a new machine and also had the same problem and this resolved it for me.

@yonkoc thanks for confirming the issue with UpCloud and provide a (potential) fix. I have emailed UpCloud support about, as follows (providing the needed links) :

Dear Sirs,

Knowing Mail-in-a-Box deploys perfectly over DigitalOcean, Linode, Vultr... etc  I spent long time trying to install Mail-in-a-box (github)  mail server in your platform over your Ubuntu 18.04 LTS provided image but hangs half the way of the installation script ...
The issue has been told in this post at their forum, and seems finally the user @yonkoc got to debug why this happens and looks like, at least, your provided Ubuntu 18.04 LTS image has been provisioned  without a specified locale then, the needed patch is to have setup its default locale as follows:

locale-gen en_US.UTF-8
update-locale LANG=en_US.UTF-8

>> I would like you to FIX your provided images ASAP.

Thanks in advance for your attention / feedback,

best. 
  • I hope they will answer / fix it soon. I’d post again here if a feedback arrives.

Here their, just arrived, answer:

Thank you for your feedback, we will take this and consider it.

Regards,
~Long
UpCloud Support.
  • Not enough but worst is nothing!
1 Like

Hi just4t,

Thabks for reporting it to UC. I’d have gone with a softer approach, though. :slight_smile:

But, still, thanks!

1 Like

I am going to suggest that you open a issue on GitHub for this issue as I have encountered the same issue with other providers. Perhaps it can be added to the install script to set the locale. @JoshData

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.