1 (edited by jstewart 2021-04-21 20:49:23)

Topic: Newsletter subscription page internal server error

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.4.0
- Deployed with iRedMail Easy or the downloadable installer? Installer
- Linux/BSD distribution name and version: Centos 7
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP
- Web server (Apache or Nginx): nginx
- Manage mail accounts with iRedAdmin-Pro? Yes
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

When trying to create the newsletter style mailing list I get an error when trying to access the signup form.
I have "Enable newsletter-style mailing list" enabled, text entered in the "Text to introduce this newsletter on subscription page" box, and that is saved.

When I obtain a link from the "Get a newsletter signup form" and try to access it, I get an "internal server error"

The only log entry I see is in the nginx access.log:


192.168.104.68 - - [21/Apr/2021:07:57:36 -0400] "GET /newsletter/subscribe/1fdf00c7-34ab-4ae4-bdc5-ba791cd5d734 HTTP/1.1" 500 32 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:87.0) Gecko/20100101 Firefox/87.0"

All packages are up to date, version 3.1 of mlmmjadmin installed.

log from /var/log/messages when restarting:

Apr 21 07:59:56 mail systemd[1]: Stopping RESTful API server used to manage mlmmj mailing list manager...
Apr 21 07:59:58 mail systemd[1]: Stopped RESTful API server used to manage mlmmj mailing list manager.
Apr 21 07:59:58 mail systemd[1]: Starting RESTful API server used to manage mlmmj mailing list manager...
Apr 21 07:59:58 mail systemd[1]: Started RESTful API server used to manage mlmmj mailing list manager.
Apr 21 07:59:58 mail uwsgi[28490]: [uWSGI] getting INI configuration from /opt/mlmmjadmin/rc_scripts/uwsgi/rhel.ini

So I don't see any problem there.

From the Chrome inspection tab (console):
Failed to load resource: the server responded with a status of 500 (Internal Server Error)
/favicon.ico:1 Failed to load resource: the server responded with a status of 404 (Not Found)
1fdf00c7-34ab-4ae4-bdc5-ba791cd5d734:1 Failed to load resource: the server responded with a status of 500 (Internal Server Error)

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Newsletter subscription page internal server error

Any related error in /var/log/messages? or /var/log/nginx/error.log?

3

Re: Newsletter subscription page internal server error

yes, I had missed some entries in /var/log/messages - nothing in the nginx error.log

Restarted mariadb, then tried the connection again:

Apr 22 07:14:27 mail systemd[1]: Starting MariaDB 10.2.37 database server...
Apr 22 07:14:27 mail mysqld[29529]: 2021-04-22  7:14:27 139632402036928 [Note] /usr/sbin/mysqld (mysqld 10.2.37-MariaDB) starting as process 29529 ...
Apr 22 07:14:27 mail mysqld[29529]: 2021-04-22  7:14:27 139632402036928 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
Apr 22 07:14:27 mail mysqld[29529]: 2021-04-22  7:14:27 139632402036928 [Note] InnoDB: Uses event mutexes
Apr 22 07:14:27 mail mysqld[29529]: 2021-04-22  7:14:27 139632402036928 [Note] InnoDB: Compressed tables use zlib 1.2.7
Apr 22 07:14:27 mail mysqld[29529]: 2021-04-22  7:14:27 139632402036928 [Note] InnoDB: Using Linux native AIO
Apr 22 07:14:27 mail mysqld[29529]: 2021-04-22  7:14:27 139632402036928 [Note] InnoDB: Number of pools: 1
Apr 22 07:14:27 mail mysqld[29529]: 2021-04-22  7:14:27 139632402036928 [Note] InnoDB: Using SSE2 crc32 instructions
Apr 22 07:14:27 mail mysqld[29529]: 2021-04-22  7:14:27 139632402036928 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
Apr 22 07:14:27 mail mysqld[29529]: 2021-04-22  7:14:27 139632402036928 [Note] InnoDB: Completed initialization of buffer pool
Apr 22 07:14:27 mail mysqld[29529]: 2021-04-22  7:14:27 139631840909056 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
Apr 22 07:14:27 mail mysqld[29529]: 2021-04-22  7:14:27 139632402036928 [Note] InnoDB: Highest supported file format is Barracuda.
Apr 22 07:14:27 mail mysqld[29529]: 2021-04-22  7:14:27 139632402036928 [Note] InnoDB: 128 out of 128 rollback segments are active.
Apr 22 07:14:27 mail mysqld[29529]: 2021-04-22  7:14:27 139632402036928 [Note] InnoDB: Creating shared tablespace for temporary tables
Apr 22 07:14:27 mail mysqld[29529]: 2021-04-22  7:14:27 139632402036928 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
Apr 22 07:14:27 mail mysqld[29529]: 2021-04-22  7:14:27 139632402036928 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
Apr 22 07:14:27 mail mysqld[29529]: 2021-04-22  7:14:27 139632402036928 [Note] InnoDB: Waiting for purge to start
Apr 22 07:14:28 mail mysqld[29529]: 2021-04-22  7:14:28 139632402036928 [Note] InnoDB: 5.7.33 started; log sequence number 498399081618
Apr 22 07:14:28 mail mysqld[29529]: 2021-04-22  7:14:28 139631265838848 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
Apr 22 07:14:28 mail mysqld[29529]: 2021-04-22  7:14:28 139632402036928 [Note] Plugin 'FEEDBACK' is disabled.
Apr 22 07:14:28 mail mysqld[29529]: 2021-04-22  7:14:28 139632402036928 [Warning] Failed to setup SSL
Apr 22 07:14:28 mail mysqld[29529]: 2021-04-22  7:14:28 139632402036928 [Warning] SSL error: SSL_CTX_set_default_verify_paths failed
Apr 22 07:14:28 mail mysqld[29529]: 2021-04-22  7:14:28 139632402036928 [Warning] SSL error: error:0200100D:system library:fopen:Permission denied
Apr 22 07:14:28 mail mysqld[29529]: 2021-04-22  7:14:28 139632402036928 [Warning] SSL error: error:2006D002:BIO routines:BIO_new_file:system lib
Apr 22 07:14:28 mail mysqld[29529]: 2021-04-22  7:14:28 139632402036928 [Warning] SSL error: error:0B084002:x509 certificate routines:X509_load_cert_crl_file:system lib
Apr 22 07:14:28 mail mysqld[29529]: 2021-04-22  7:14:28 139632402036928 [Note] Server socket created on IP: '::'.
Apr 22 07:14:28 mail mysqld[29529]: 2021-04-22  7:14:28 139632402036928 [Note] Reading of all Master_info entries succeeded
Apr 22 07:14:28 mail mysqld[29529]: 2021-04-22  7:14:28 139632402036928 [Note] Added new Master_info '' to hash table
Apr 22 07:14:28 mail mysqld[29529]: 2021-04-22  7:14:28 139632402036928 [Note] /usr/sbin/mysqld: ready for connections.
Apr 22 07:14:28 mail mysqld[29529]: Version: '10.2.37-MariaDB'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MariaDB Server
Apr 22 07:14:28 mail systemd[1]: Started MariaDB 10.2.37 database server.
Apr 22 07:14:28 mail mysqld[29529]: 2021-04-22  7:14:28 139631265838848 [Note] InnoDB: Buffer pool(s) load completed at 210422  7:14:28
Apr 22 07:14:34 mail python3[9578]: Exception during reset or similar
Apr 22 07:14:34 mail python3[9578]: Traceback (most recent call last):
Apr 22 07:14:34 mail python3[9578]: File "/usr/lib64/python3.6/site-packages/sqlalchemy/pool.py", line 687, in _finalize_fairy
Apr 22 07:14:34 mail python3[9578]: fairy._reset(pool)
Apr 22 07:14:34 mail python3[9578]: File "/usr/lib64/python3.6/site-packages/sqlalchemy/pool.py", line 829, in _reset
Apr 22 07:14:34 mail python3[9578]: pool._dialect.do_rollback(self)
Apr 22 07:14:34 mail python3[9578]: File "/usr/lib64/python3.6/site-packages/sqlalchemy/dialects/mysql/base.py", line 1525, in do_rollback
Apr 22 07:14:34 mail python3[9578]: dbapi_connection.rollback()
Apr 22 07:14:34 mail python3[9578]: File "/usr/lib/python3.6/site-packages/pymysql/connections.py", line 430, in rollback
Apr 22 07:14:34 mail python3[9578]: self._read_ok_packet()
Apr 22 07:14:34 mail python3[9578]: File "/usr/lib/python3.6/site-packages/pymysql/connections.py", line 394, in _read_ok_packet
Apr 22 07:14:34 mail python3[9578]: pkt = self._read_packet()
Apr 22 07:14:34 mail python3[9578]: File "/usr/lib/python3.6/site-packages/pymysql/connections.py", line 684, in _read_packet
Apr 22 07:14:34 mail python3[9578]: packet.check_error()
Apr 22 07:14:34 mail python3[9578]: File "/usr/lib/python3.6/site-packages/pymysql/protocol.py", line 220, in check_error
Apr 22 07:14:34 mail python3[9578]: err.raise_mysql_exception(self._data)
Apr 22 07:14:34 mail python3[9578]: File "/usr/lib/python3.6/site-packages/pymysql/err.py", line 109, in raise_mysql_exception
Apr 22 07:14:34 mail python3[9578]: raise errorclass(errno, errval)
Apr 22 07:14:34 mail python3[9578]: pymysql.err.InternalError: (1927, 'Connection was killed')
Apr 22 07:15:33 mail iredadmin: [192.168.104.68] GET /newsletter/subscribe/1fdf00c7-34ab-4ae4-bdc5-ba791cd5d734 500 84 "-"
Apr 22 07:15:33 mail mysqld[29529]: 2021-04-22  7:15:33 139631670990592 [Warning] Aborted connection 54 to db: 'iredadmin' user: 'iredadmin' host: 'localhost' (Got an error reading communication packets)

4

Re: Newsletter subscription page internal server error

jstewart wrote:

Apr 22 07:14:34 mail python3[9578]: pymysql.err.InternalError: (1927, 'Connection was killed')
Apr 22 07:15:33 mail iredadmin: [192.168.104.68] GET /newsletter/subscribe/1fdf00c7-34ab-4ae4-bdc5-ba791cd5d734 500 84 "-"
Apr 22 07:15:33 mail mysqld[29529]: 2021-04-22  7:15:33 139631670990592 [Warning] Aborted connection 54 to db: 'iredadmin' user: 'iredadmin' host: 'localhost' (Got an error reading communication packets)

Seems temporary sql connection issue, does it work if you re-subscribe?