Closed armouredking closed 8 years ago
Well, install completed. Netstat shows typical ports are open, but it looks like things are still messy. Unclear to me at this point what it's all related to, so for the sake of completeness on finding a direction to head the entirety of the debug log from the install is attached.
The instance is broken on the web though. Ports open, but receive the internal server error. This: https://github.com/tonioo/modoboa/issues/834 looks like it might be related because the error is shown in here but on a fresh install with other items popping up in the log I'm not sure if it's the correct action to pursue.
So. Some sleep, another day, took another stab at this. Still getting errors. New log file:
In order to get here, I needed to do the following before using run.py:
apt-get install libssl-dev libmariadbclient-dev python-mysqldb
MySQL works just fine for the install as noted in the earlier post, but since I use MariaDB and the repos figured I'd just keep things the same.
Major issues that remain:
Processing triggers for libc-bin (2.19-18+deb8u3) ...
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2 "No such file or directory")
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2 "No such file or directory")
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2 "No such file or directory")
Why is it trying to do this? The config file ( as above ) is set to not install mysql server, the address is provided, and I can use mysql from the modoboa instance command line. No reason it should be trying to use localhost at all. phpmyadmin successfully installed and wrote to the cluster so I know that bit is working.
I think this is forecasting the other problems I'm running into - I check with both mariadb and mysql and ( though it shouldn't matter ) no databases, tables, or users are created on the cluster. So that's a problem.
Successfully installed chardet-2.3.0 future-0.15.2 lxml-3.5.0 modoboa-admin-1.1.2 modoboa-amavis-1.0.6 modoboa-pdfcredentials-1.0.1 modoboa-postfix-autoreply-1.1.3 modoboa-sievefilters-1.0.4 modoboa-stats-1.0.4 modoboa-webmail-1.0.3 pillow-3.1.1 pytz-2015.7 reportlab-3.3.0 sievelib-0.9.2
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 354, in execute_from_command_line
utility.execute()
File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 328, in execute
django.setup()
File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/__init__.py", line 18, in setup
apps.populate(settings.INSTALLED_APPS)
File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/apps/registry.py", line 115, in populate
app_config.ready()
File "/srv/modoboa/env/local/lib/python2.7/site-packages/modoboa/core/apps.py", line 68, in ready
load_core_settings()
File "/srv/modoboa/env/local/lib/python2.7/site-packages/modoboa/core/apps.py", line 56, in load_core_settings
parameters.register(GeneralParametersForm, ugettext_lazy("General"))
File "/srv/modoboa/env/local/lib/python2.7/site-packages/modoboa/lib/parameters.py", line 192, in register
form = formclass()
File "/srv/modoboa/env/local/lib/python2.7/site-packages/modoboa/core/app_settings.py", line 261, in __init__
super(GeneralParametersForm, self).__init__(*args, **kwargs)
File "/srv/modoboa/env/local/lib/python2.7/site-packages/modoboa/lib/parameters.py", line 62, in __init__
self._load_initial_values()
File "/srv/modoboa/env/local/lib/python2.7/site-packages/modoboa/lib/parameters.py", line 96, in _load_initial_values
if not db_utils.db_table_exists("lib_parameter"):
File "/srv/modoboa/env/local/lib/python2.7/site-packages/modoboa/lib/db_utils.py", line 24, in db_table_exists
raise Exception("unable to determine if the table '%s' exists" % table)
Exception: unable to determine if the table 'lib_parameter' exists
python manage.py migrate --noinput failed, check your configuration
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 354, in execute_from_command_line
utility.execute()
File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 328, in execute
django.setup()
File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/__init__.py", line 18, in setup
apps.populate(settings.INSTALLED_APPS)
File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/apps/registry.py", line 115, in populate
app_config.ready()
File "/srv/modoboa/env/local/lib/python2.7/site-packages/modoboa/core/apps.py", line 68, in ready
load_core_settings()
File "/srv/modoboa/env/local/lib/python2.7/site-packages/modoboa/core/apps.py", line 56, in load_core_settings
parameters.register(GeneralParametersForm, ugettext_lazy("General"))
File "/srv/modoboa/env/local/lib/python2.7/site-packages/modoboa/lib/parameters.py", line 192, in register
form = formclass()
File "/srv/modoboa/env/local/lib/python2.7/site-packages/modoboa/core/app_settings.py", line 261, in __init__
super(GeneralParametersForm, self).__init__(*args, **kwargs)
File "/srv/modoboa/env/local/lib/python2.7/site-packages/modoboa/lib/parameters.py", line 62, in __init__
self._load_initial_values()
File "/srv/modoboa/env/local/lib/python2.7/site-packages/modoboa/lib/parameters.py", line 96, in _load_initial_values
if not db_utils.db_table_exists("lib_parameter"):
File "/srv/modoboa/env/local/lib/python2.7/site-packages/modoboa/lib/db_utils.py", line 24, in db_table_exists
raise Exception("unable to determine if the table '%s' exists" % table)
Exception: unable to determine if the table 'lib_parameter' exists
python manage.py load_initial_data failed, check your configuration
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 354, in execute_from_command_line
utility.execute()
File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 328, in execute
django.setup()
File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/__init__.py", line 18, in setup
apps.populate(settings.INSTALLED_APPS)
File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/apps/registry.py", line 115, in populate
app_config.ready()
File "/srv/modoboa/env/local/lib/python2.7/site-packages/modoboa/core/apps.py", line 68, in ready
load_core_settings()
File "/srv/modoboa/env/local/lib/python2.7/site-packages/modoboa/core/apps.py", line 56, in load_core_settings
parameters.register(GeneralParametersForm, ugettext_lazy("General"))
File "/srv/modoboa/env/local/lib/python2.7/site-packages/modoboa/lib/parameters.py", line 192, in register
form = formclass()
File "/srv/modoboa/env/local/lib/python2.7/site-packages/modoboa/core/app_settings.py", line 261, in __init__
super(GeneralParametersForm, self).__init__(*args, **kwargs)
File "/srv/modoboa/env/local/lib/python2.7/site-packages/modoboa/lib/parameters.py", line 62, in __init__
self._load_initial_values()
File "/srv/modoboa/env/local/lib/python2.7/site-packages/modoboa/lib/parameters.py", line 96, in _load_initial_values
if not db_utils.db_table_exists("lib_parameter"):
File "/srv/modoboa/env/local/lib/python2.7/site-packages/modoboa/lib/db_utils.py", line 24, in db_table_exists
raise Exception("unable to determine if the table '%s' exists" % table)
Exception: unable to determine if the table 'lib_parameter' exists
python manage.py collectstatic --noinput failed, check your configuration
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 354, in execute_from_command_line
utility.execute()
File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 328, in execute
django.setup()
File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/__init__.py", line 18, in setup
apps.populate(settings.INSTALLED_APPS)
File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/apps/registry.py", line 115, in populate
app_config.ready()
File "/srv/modoboa/env/local/lib/python2.7/site-packages/modoboa/core/apps.py", line 68, in ready
load_core_settings()
File "/srv/modoboa/env/local/lib/python2.7/site-packages/modoboa/core/apps.py", line 56, in load_core_settings
parameters.register(GeneralParametersForm, ugettext_lazy("General"))
File "/srv/modoboa/env/local/lib/python2.7/site-packages/modoboa/lib/parameters.py", line 192, in register
form = formclass()
File "/srv/modoboa/env/local/lib/python2.7/site-packages/modoboa/core/app_settings.py", line 261, in __init__
super(GeneralParametersForm, self).__init__(*args, **kwargs)
File "/srv/modoboa/env/local/lib/python2.7/site-packages/modoboa/lib/parameters.py", line 62, in __init__
self._load_initial_values()
File "/srv/modoboa/env/local/lib/python2.7/site-packages/modoboa/lib/parameters.py", line 96, in _load_initial_values
if not db_utils.db_table_exists("lib_parameter"):
File "/srv/modoboa/env/local/lib/python2.7/site-packages/modoboa/lib/db_utils.py", line 24, in db_table_exists
raise Exception("unable to determine if the table '%s' exists" % table)
Exception: unable to determine if the table 'lib_parameter' exists
python manage.py set_default_site mail.deoremann.com failed, check your configuration
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2 "No such file or directory")
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2 "No such file or directory")
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2 "No such file or directory")
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2 "No such file or directory")
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2 "No such file or directory")
Creating/updating amavis user account...
Starting amavisd: head: cannot open ‘/etc/mailname’ for reading: No such file or directory
amavisd-new.
[....] Not starting amavisd-snmp-subagent - edit /etc/default/amavisd-snmp-subagent to ena[warnt ... (warning).
[warn] Not starting amavis-mc - edit /etc/default/amavis-mc to enable it ... (warning).
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2 "No such file or directory")
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2 "No such file or directory")
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2 "No such file or directory")
ERROR 1045 (28000): Access denied for user 'amavis'@'192.168.100.124' (using password: YES)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2 "No such file or directory")
Setting up sa-compile (3.4.0-6) ...
Running sa-compile (may take a long time)
Processing triggers for python-support (1.0.15) ...
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2 "No such file or directory")
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2 "No such file or directory")
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2 "No such file or directory")
ERROR 1045 (28000): Access denied for user 'spamassassin'@'192.168.100.124' (using password: YES)
This is the first time I see an IP address attempted, and 124 is one of the load balancers in front of the cluster.
Setting up clamav-freshclam (0.98.7+dfsg-0+deb8u1) ...
[ ok ] Starting ClamAV virus database updater: freshclam.
Setting up clamav (0.98.7+dfsg-0+deb8u1) ...
Setting up clamav-daemon (0.98.7+dfsg-0+deb8u1) ...
[FAIL] Clamav signatures not found in /var/lib/clamav ... failed!
[FAIL] Please retrieve them using freshclam ... failed!
[FAIL] Then run '/etc/init.d/clamav-daemon start' ... failed!
Setting up clamdscan (0.98.7+dfsg-0+deb8u1) ...
Processing triggers for libc-bin (2.19-18+deb8u3) ...
[FAIL] clamd is not running ... failed!
[FAIL] Clamav signatures not found in /var/lib/clamav ... failed!
[FAIL] Please retrieve them using freshclam ... failed!
[FAIL] Then run '/etc/init.d/clamav-daemon start' ... failed!
[ ok ] amavisd is running.
And that's everything. I can't tell yet if this is related to the bug noted earlier because nothing is getting installed on the database so maybe it can't find things just because they aren't there. Until the database gets built I can't really tackle the issue related to 834 unless there's a way to install a specific version using the install tool.
Hi, thanks for the complete feedback. The last error you see (Exception: unable to determine if the table 'lib_parameter' exists) is a bug introduced by 1.4.3. It is fixed but the 1.4.4 has not been released yet.
Looks like I also need to handle the case where the database server is not on the same host than modoboa.
Word of warning: I can't program my way out of a paper bag so this sort of stuff is generally above me unless I line by line it and then beat head against wall until something works.
With 1.4.4 released I've gotten it to create the information now, just hitting a last couple walls ( I hope ).
Changes made so far:
modoboa-installer/database.py:
cmd = "mysql -u {} -p{}".format(dbuser, dbpassword)
to cmd = "mysql -h 192.168.100.100 -u {} -p{}".format(dbuser, dbpassword)
"CREATE USER '{}'@'localhost' IDENTIFIED BY '{}'".format(
to "CREATE USER '{}'@'%' IDENTIFIED BY '{}'".format(
"GRANT ALL PRIVILEGES ON {}.* to '{}'@'localhost'"
to "GRANT ALL PRIVILEGES ON {}.* to '{}'@'%'"
--Edit-- Cleaned this out --Edit--
The modoboa database was created on the cluster, but it had no tables in it. I'm guessing the above is the problem? What other entry am I missing that needs a host definition to get it to stop using localhost?
--Edit-- Found it indeed there. So we change the following in modoboa-installer/scripts/modoboa.py:
"--dburl", "default:{0}://{1}:{2}@localhost/{1}".format(
to "--dburl", "default:{0}://{1}:{2}@192.168.100.100/{1}".format(
"amavis:{}://{}:{}@localhost/{}".format(
to "amavis:{}://{}:{}@192.168.100.100/{}".format(
SQL. So MariaDB and MySQL both have that stupid 767 byte
limitation that crops up anytime anyone dares to use anything that isn't latin collation. My defaults are utf8mb4 and I have my InnoDB setup to allow large_prefix but unfortunately MariaDB doesn't support innodb_default_row_format
option yet, so that automatically means I need to manually update the CREATE TABLE
statements to explicitly include a Barracuda ROW_FORMAT
entry and thus much head desking later:
[warn] Not starting amavis-mc - edit /etc/default/amavis-mc to enable it ... (warning).
ERROR 1709 (HY000) at line 170: Index column size too large. The maximum column size is 767 bytes.
Edit: Fixed by adjusting modoboa-installer/modoboa_installer/scripts/files/amavis sql files to have proper CREATE TABLE
settings for my environment.
SpamAssassin Mail Filter Daemon: disabled, see /etc/default/spamassassin
Setting up sa-compile (3.4.0-6) ...
Running sa-compile (may take a long time)
Processing triggers for python-support (1.0.15) ...
ERROR 1709 (HY000) at line 16: Index column size too large. The maximum column size is 767 bytes.
Fixed by adjusting /usr/share/doc/spamassassin/sql/bayes_mysql.sql to have the proper CREATE TABLE
settings for my environment.
Which just leaves the darn modoboa database. This one seems like it's going to be harder for me to figure out how to fix it. The sql appears to be written in python code? Is there a copy of it stored elsewhere I can use for manual entry? Basically several fields aren't writing into the modoboa table now ( some are, but again, 767 byte
issue ) and I need to find a way to get a "ROW_FORMAT=COMPRESSION"
or "ROW_FORMAT=DYNAMIC"
onto the end of the CREATE TABLE
function because of the lack of support for innodb_default_row_format
option / variable. It's either that, or set modoboa up as a latin table and go through the perilous task of converting it over to utf8mb4, and it'd be so much simpler to just build it correctly the first time than to try converting it I would think.
Edit2: I should note that even with a broken modoboa database / missing tables I can actually get an instance of modoboa loaded ( ie point my browser at the server and I see a login page now and not just a lovely white page with internal error text ). It's just broken because the database is missing pieces.
Edit3: So I have a full install now. At least it seems so, working insofar as I've tested ( albeit limited ). I made the modoboa database latin1_swedish_ci
just to get it running and propagating the data. It's late so I'll give transforming it to utf8mb4
a go tomorrow after sleep.
Just FYI to close this out. It's working after db conversion, had to do it that way for modoboa not smart enough to figure out how to do it another way. Only really important for others that are trying to support utf8mb4 at least on MySQL / MariaDB until we get the options feature in them. I don't think this affects PGSQL. Been running / using the mail server part for a few days, just gotta figure out the radicale part now.
Attempting to install modoboa using the installer. It's running on a Proxmox cluster LXC instance with 2 CPUs and 4GB dedicated ( so should meet prereqs ). Configured the file:
Sanitized the passwords obviously. The sql instance is a MariaDB galera and thus already created.
First attempted run was without --debug:
Looked into Modoboa bugs, found this one https://github.com/modoboa/modoboa-installer/issues/10 but wanted to see if it was the same so ran with --debug and got:
Doesn't appear to be the same. I did some google searching and found a few older notes Modoboa 1.1.1 http://unix.stackexchange.com/questions/128453/modoboa-1-1-1-deployment-errors that said Debian needed
before running it. It worked for that poster, but not me. The error remains the same. Tried again using the advice here:
http://stackoverflow.com/questions/5178292/pip-install-mysql-python-fails-with-environmenterror-mysql-config-not-found
Adding this appears to have worked. Install has moved past and is currently still ongoing so anything else that happens now shouldn't be related to this particular issue. Prereq not applied due to not installing mysql on this instance, or something else?