Can't Start Mailman3 Core on Fresh Install
Hi Everyone. I'm installing Mailman3 on a Ubunu 18.03 server using MySQL as the backend. After installing using the mailman3-full package and configuring it, I'm getting the following error when trying to start the mailman3 service:
l 21 04:28:44 eps mailman3[81963]: packet.raise_for_error() Jul 21 04:28:44 eps mailman3[81963]: File "/usr/local/lib/python3.8/dist-packages/pymysql/protocol.py", line 221, in raise_for_error Jul 21 04:28:44 eps mailman3[81963]: err.raise_mysql_exception(self._data) Jul 21 04:28:44 eps mailman3[81963]: File "/usr/local/lib/python3.8/dist-packages/pymysql/err.py", line 143, in raise_mysql_exception Jul 21 04:28:44 eps mailman3[81963]: raise errorclass(errno, errval) Jul 21 04:28:44 eps mailman3[81963]: sqlalchemy.exc.OperationalError: (pymysql.err.OperationalError) (1045, "Access denied for user 'mailman3'@'127.0.0.1' (using password: YES)") Jul 21 04:28:44 eps mailman3[81963]: (Background on this error at: http://sqlalche.me/e/e3q8)
I'm not sure why the access issue is happening. Mailman3-web is running fine and I can see the site at mailman3/postorius/lists (but it says Page Not Found).
Mail Person writes:
Hi Everyone. I'm installing Mailman3 on a Ubunu 18.03 server using MySQL as the backend. After installing using the mailman3-full package and configuring it, I'm getting the following error when trying to start the mailman3 service:
Jul 21 04:28:44 eps mailman3[81963]: sqlalchemy.exc.OperationalError: (pymysql.err.OperationalError) (1045, "Access denied for user 'mailman3'@'127.0.0.1' (using password: YES)")
I would guess that the password doesn't match. This can happen because some configuration is done with Python modules (.py files, the configuration is Python code) where strings are *delimited* by quote marks (which are not part of the value) and some (.cfg files) are .ini-style, where all values are read as strings, and so quote marks become part of the value.
The web database (mostly user information) and the mailing list database are separate (because not all Mailman installations use Postorius and HyperKitty). Are you sure you have the right user and password for the mailing list database configured in mailman.cfg?
Other reasons would be in this reference:
Jul 21 04:28:44 eps mailman3[81963]: (Background on this error at: http://sqlalche.me/e/e3q8)
I'm not sure why the access issue is happening. Mailman3-web is running fine and I can see the site at mailman3/postorius/lists (but it says Page Not Found).
"Page not found" is probably a consequence of the same access error. You can probably see it in the database logs.
I've triple checked the password in mailman.cfg and used the same username/password directly in MySQL and was able to get to the mailman3 database. I did run a test script in python3 using the PyMySQL connector and got the same error. Is there some permissions issue I need to look for? I ran the install as user root - perhaps the user running the python script doesn't have access somehow?
On Thu, Jul 21, 2022 at 7:48 AM Stephen J. Turnbull < stephenjturnbull@gmail.com> wrote:
Mail Person writes:
Hi Everyone. I'm installing Mailman3 on a Ubunu 18.03 server using MySQL as the backend. After installing using the mailman3-full package and configuring it, I'm getting the following error when trying to start the mailman3 service:
Jul 21 04:28:44 eps mailman3[81963]: sqlalchemy.exc.OperationalError: (pymysql.err.OperationalError) (1045, "Access denied for user 'mailman3'@'127.0.0.1' (using password: YES)")
I would guess that the password doesn't match. This can happen because some configuration is done with Python modules (.py files, the configuration is Python code) where strings are *delimited* by quote marks (which are not part of the value) and some (.cfg files) are .ini-style, where all values are read as strings, and so quote marks become part of the value.
The web database (mostly user information) and the mailing list database are separate (because not all Mailman installations use Postorius and HyperKitty). Are you sure you have the right user and password for the mailing list database configured in mailman.cfg?
Other reasons would be in this reference:
Jul 21 04:28:44 eps mailman3[81963]: (Background on this error at: http://sqlalche.me/e/e3q8)
I'm not sure why the access issue is happening. Mailman3-web is running fine and I can see the site at mailman3/postorius/lists (but it says Page Not Found).
"Page not found" is probably a consequence of the same access error. You can probably see it in the database logs.
On 7/21/22 10:09, Jonathan Green wrote:
I've triple checked the password in mailman.cfg and used the same username/password directly in MySQL and was able to get to the mailman3 database. I did run a test script in python3 using the PyMySQL connector and got the same error. Is there some permissions issue I need to look for? I ran the install as user root - perhaps the user running the python script doesn't have access somehow?
First, your primary support resource for the Debian/Ubuntu packages should be Debian.
That said, the database access credentials are also configured in the DATABASES setting in your Django settings, although your OP indicates this error is in core.
I'm not sure what running the install as root
will do in the
Debian/Ubuntu package, but with that package, the user that needs to
access things is list
and all the Mailman processes should run as list
.
Did your test script do pymysql.connect(user='list', ...)?
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
I created two new users, 'mailman3'@'127.0.0.01' and 'mailman3'@'127.0.0.1' with the same access and privileges and that fixed things. Now I've got a server error when running the web service.
Ok, I've got more progress. The initial server error was fixed by re-running the configurations for mailman3 and mailman3-web. I believe an error occurred because I changed the passwords for the mailman3 users and only updated them in the cfg files in /etc/mailman3 and they must be stored somewhere else. Now the web interface shows as working, but it is showing "example.com" and when I go to sign-in with the postorius super user, I get a server error.
On 7/21/22 10:59, Mail Person wrote:
Now the web interface shows as working, but it is showing "example.com" and when I go to sign-in with the postorius super user, I get a server error.
What's in your Django log?
What is your setting for SITE_ID
in your Django settings. This
determines which Django sites
table entry is displayed. See
https://docs.mailman3.org/en/latest/faq.html#the-domain-name-displayed-in-hy....
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
I got it all fixed by restoring the server from scratch and starting over again. The key fixes for using the mailman3-full install were:
- Prior to installing run apt install python3-pymysql python3-mysqldb
- After install, had to add 'mailman3'@'127.0.0.1' and 'mailman3web'@'127.0.0.1' and grant privileges instead of using @localhost
- In the Apache conf, had to remove the trailing forward slash in ProxyPass /mailman3 unix:/run/mailman3-web/uwsgi.sock|uwsgi://localhost
After that things were happy
participants (4)
-
Jonathan Green
-
Mail Person
-
Mark Sapiro
-
Stephen J. Turnbull