Mailtrain-org / mailtrain

Self hosted newsletter app
GNU General Public License v3.0
5.53k stars 692 forks source link

Service unavailable / password to long #1120

Closed mokkin closed 8 months ago

mokkin commented 3 years ago

I have installed mailtrain on a fresh Ubuntu 18.04 via bash script. The installation was successful, certificates were created. Unfortunately I cannot access the webinterface by error 503. In the syslog it says:

Jul 23 12:36:42 mailtrain node[5970]: ERR!     at Promise._settlePromiseFromHandler (/opt/mailtrain/server/node_modules/bluebird/js/release/promise.js:547:31)
Jul 23 12:36:42 mailtrain node[5970]: ERR!     at Promise._settlePromise (/opt/mailtrain/server/node_modules/bluebird/js/release/promise.js:604:18)
Jul 23 12:36:42 mailtrain node[5970]: ERR!     at Promise._settlePromise0 (/opt/mailtrain/server/node_modules/bluebird/js/release/promise.js:649:10) {
Jul 23 12:36:42 mailtrain node[5970]: ERR!   code: 'ER_TOO_LONG_KEY',
Jul 23 12:36:42 mailtrain node[5970]: ERR!   errno: 1071,
Jul 23 12:36:42 mailtrain node[5970]: ERR!   sqlMessage: 'Specified key was too long; max key length is 767 bytes',
Jul 23 12:36:42 mailtrain node[5970]: ERR!   sqlState: '42000',
Jul 23 12:36:42 mailtrain node[5970]: ERR!   index: 4,
Jul 23 12:36:42 mailtrain node[5970]: ERR!   sql: 'ALTER TABLE blacklist CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;ALTER TABLE campaign_links CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;ALTER TABLE campaign_lists CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;ALTER TABLE campaign_messages CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;ALTER TABLE campaigns CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;ALTER TABLE channel_lists CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;ALTER TABLE channels CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;ALTER TABLE confirmations CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;ALTER TABLE custom_fields CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;ALTER TABLE custom_forms CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;ALTER TABLE custom_forms_data CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;ALTER TABLE file_cache CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;ALTER TABLE files_campaign_attachment CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;ALTER TABLE files_campaign_file CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;ALTER TABLE files_mosaico_template_block CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;ALTER TABLE files_mosaico_template_file CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;ALTER TABLE files_template_file CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;ALTER TABLE generated_role_names CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;ALTER TABLE import_failed CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;ALTER TABLE import_runs CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;ALTER TABLE imports CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;ALTER TABLE knex_migrations CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;ALTER TABLE knex_migrations_lock CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;ALTER TABLE links CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;ALTER TABLE lists CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;ALTER TABLE mosaico_templates CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;ALTER TABLE namespaces CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;ALTER TABLE permissions_campaign CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;ALTER TABLE permissions_channel CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;ALTER TABLE permissions_custom_form CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;ALTER TABLE permissions_list CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;ALTER TABLE permissions_mosaico_template CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;ALTER TABLE permissions_namespace CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;ALTER TABLE permissions_report CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;ALTER TABLE permissions_report_template CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;ALTER TABLE permissions_send_configuration CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;ALTER TABLE permissions_template CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;ALTER TABLE queued CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;ALTER TABLE report_templates CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;ALTER TABLE reports CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;ALTER TABLE rss CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;ALTER TABLE segments CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;ALTER TABLE send_configurations CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;ALTER TABLE settings CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;ALTER TABLE shares_campaign CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;ALTER TABLE shares_channel CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;ALTER TABLE shares_custom_form CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;ALTER TABLE shares_list CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;ALTER TABLE shares_mosaico_template CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;ALTER TABLE shares_namespace CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;ALTER TABLE shares_report CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;ALTER TABLE shares_report_template CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;ALTER TABLE shares_send_configuration CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;ALTER TABLE shares_template CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;ALTER TABLE template_dep_campaigns CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;ALTER TABLE templates CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;ALTER TABLE test_messages CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;ALTER TABLE trigger_messages CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;ALTER TABLE triggers CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;ALTER TABLE tzoffset CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;ALTER TABLE users CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;'
Jul 23 12:36:42 mailtrain node[5970]: ERR! }
Jul 23 12:36:42 mailtrain systemd[1]: mailtrain.service: Main process exited, code=exited, status=1/FAILURE
Jul 23 12:36:42 mailtrain systemd[1]: mailtrain.service: Failed with result 'exit-code'.
Jul 23 12:36:52 mailtrain systemd[1]: mailtrain.service: Service hold-off time over, scheduling restart.
Jul 23 12:36:52 mailtrain systemd[1]: mailtrain.service: Scheduled restart job, restart counter is at 374.
Jul 23 12:36:52 mailtrain systemd[1]: Stopped Mailtrain server.
Jul 23 12:36:52 mailtrain systemd[1]: Started Mailtrain server.

I didn't make any modifications and the MySQL password in the production.yml has only 12 digits.

Do you know what might be wrong?

talheim-it commented 3 years ago

I installed in on an Ubuntu 20.04, already 3 machines without big issues. Is the database and permissions correctly set?

Maybe drop the database and users and run it again.

joker-x commented 3 years ago

I almost sure it is a bug with the version of MariaDB on Ubuntu 18.04. You can fix it with: https://github.com/Mailtrain-org/mailtrain/issues/1110#issuecomment-868257865

talheim-it commented 8 months ago

We are going to start with the development and testing of mailtrain v3 in the next weeks.

You are welcome to help us with the testing as soon as the first release candidate is available.