Skip to content

ommsql Can't Connect to mysql socket #236

@PilotST

Description

@PilotST

Guys, I hate to open this and find out it is [likely] a simple thing but I've been pulling my hair out trying to figure this out and it's just killing me. I'm sorry in advance for the person that looks at this and says "well, duh..." Any help anyone has would be more than appreciated.

I think I have everything installed correctly with my MariaDB:

● mariadb.service - MariaDB 10.11.11 database server
Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; preset: enabled)
Active: active (running) since Thu 2025-04-03 17:21:05 UTC; 8s ago
Docs: man:mariadbd(8)
https://mariadb.com/kb/en/library/systemd/
Process: 33109 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS)
Process: 33111 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
Process: 33113 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= || VAR=/usr/bin/galera_recovery; [ $? -eq 0 ] && systemctl set-environment _WSREP_START_POSITION=$VAR || exit 1 (code=exited, status=0>
Process: 33189 ExecStartPost=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
Process: 33191 ExecStartPost=/etc/mysql/debian-start (code=exited, status=0/SUCCESS)
Main PID: 33173 (mariadbd)
Status: "Taking your SQL requests now..."
Tasks: 15 (limit: 15423)
Memory: 118.0M (peak: 120.9M)
CPU: 496ms
CGroup: /system.slice/mariadb.service
└─33173 /usr/sbin/mariadbd

Apr 03 17:21:04 echelon.tmg.help mariadbd[33173]: 2025-04-03 17:21:04 0 [Note] Plugin 'FEEDBACK' is disabled.
Apr 03 17:21:04 echelon.tmg.help mariadbd[33173]: 2025-04-03 17:21:04 0 [Warning] You need to use --log-bin to make --expire-logs-days or --binlog-expire-logs-seconds work.
Apr 03 17:21:04 echelon.tmg.help mariadbd[33173]: 2025-04-03 17:21:04 0 [Note] Server socket created on IP: '127.0.0.1'.
Apr 03 17:21:04 echelon.tmg.help mariadbd[33173]: 2025-04-03 17:21:04 0 [Note] /usr/sbin/mariadbd: ready for connections.
Apr 03 17:21:04 echelon.tmg.help mariadbd[33173]: Version: '10.11.11-MariaDB-0ubuntu0.24.04.2' socket: '/var/run/mysqld/mysqld.sock' port: 3306 Ubuntu 24.04
Apr 03 17:21:05 echelon.tmg.help systemd[1]: Started mariadb.service - MariaDB 10.11.11 database server.
Apr 03 17:21:05 echelon.tmg.help /etc/mysql/debian-start[33194]: Upgrading MariaDB tables if necessary.
Apr 03 17:21:05 echelon.tmg.help /etc/mysql/debian-start[33209]: WARNING: mysql.user contains 1 root accounts without password!
Apr 03 17:21:05 echelon.tmg.help /etc/mysql/debian-start[33210]: Triggering myisam-recover for all MyISAM tables and aria-recover for all Aria tables
Apr 03 17:21:05 echelon.tmg.help mariadbd[33173]: 2025-04-03 17:21:05 0 [Note] InnoDB: Buffer pool(s) load completed at 250403 17:21:05

as well as rsyslog:

ubuntu@echelon:/etc$ sudo systmectl restart rsyslog
sudo: systmectl: command not found
ubuntu@echelon:/etc$ sudo systemctl restart rsyslog
ubuntu@echelon:/etc$ sudo systemctl status rsyslog
● rsyslog.service - System Logging Service
Loaded: loaded (/usr/lib/systemd/system/rsyslog.service; enabled; preset: enabled)
Active: active (running) since Thu 2025-04-03 17:21:37 UTC; 6s ago
TriggeredBy: ● syslog.socket
Docs: man:rsyslogd(8)
man:rsyslog.conf(5)
https://www.rsyslog.com/doc/
Process: 33267 ExecStartPre=/usr/lib/rsyslog/reload-apparmor-profile (code=exited, status=0/SUCCESS)
Main PID: 33272 (rsyslogd)
Tasks: 10 (limit: 2336)
Memory: 2.9M (peak: 5.3M)
CPU: 213ms
CGroup: /system.slice/rsyslog.service
└─33272 /usr/sbin/rsyslogd -n -iNONE

Apr 03 17:21:37 echelon.tmg.help rsyslogd[33272]: action 'action-8-ommysql' suspended (module 'ommysql'), retry 11. There should be messages before this one giving the reason for suspension. [v8.2312.0 try https://www.rsyslog>
Apr 03 17:21:37 echelon.tmg.help rsyslogd[33272]: action 'action-8-ommysql' suspended (module 'ommysql'), retry 12. There should be messages before this one giving the reason for suspension. [v8.2312.0 try https://www.rsyslog>
Apr 03 17:21:37 echelon.tmg.help rsyslogd[33272]: action 'action-8-ommysql' suspended (module 'ommysql'), retry 13. There should be messages before this one giving the reason for suspension. [v8.2312.0 try https://www.rsyslog>
Apr 03 17:21:37 echelon.tmg.help rsyslogd[33272]: action 'action-8-ommysql' suspended (module 'ommysql'), retry 14. There should be messages before this one giving the reason for suspension. [v8.2312.0 try https://www.rsyslog>
Apr 03 17:21:37 echelon.tmg.help rsyslogd[33272]: action 'action-8-ommysql' suspended (module 'ommysql'), retry 15. There should be messages before this one giving the reason for suspension. [v8.2312.0 try https://www.rsyslog>
Apr 03 17:21:37 echelon.tmg.help rsyslogd[33272]: action 'action-8-ommysql' suspended (module 'ommysql'), retry 16. There should be messages before this one giving the reason for suspension. [v8.2312.0 try https://www.rsyslog>
Apr 03 17:21:37 echelon.tmg.help rsyslogd[33272]: action 'action-8-ommysql' suspended (module 'ommysql'), retry 17. There should be messages before this one giving the reason for suspension. [v8.2312.0 try https://www.rsyslog>
Apr 03 17:21:37 echelon.tmg.help rsyslogd[33272]: action 'action-8-ommysql' suspended (module 'ommysql'), retry 18. There should be messages before this one giving the reason for suspension. [v8.2312.0 try https://www.rsyslog>
Apr 03 17:21:37 echelon.tmg.help rsyslogd[33272]: action 'action-8-ommysql' suspended (module 'ommysql'), retry 19. There should be messages before this one giving the reason for suspension. [v8.2312.0 try https://www.rsyslog>
Apr 03 17:21:37 echelon.tmg.help rsyslogd[33272]: action 'action-8-ommysql' suspended (module 'ommysql'), retry 20. There should be messages before this one giving the reason for suspension. [v8.2312.0 try https://www.rsyslog>

But, as you can see, I keep getting this damn socket connection error. I've tried what I think is everything, but I can't get rsyslog to correctly load. As such, I get no data in the syslog plugin

2025-04-03T17:21:37.715259+00:00 echelon rsyslogd: rsyslogd's groupid changed to 102
2025-04-03T17:21:37.715280+00:00 echelon rsyslogd: rsyslogd's userid changed to 102
2025-04-03T17:21:37.715302+00:00 echelon rsyslogd: [origin software="rsyslogd" swVersion="8.2312.0" x-pid="33272" x-info="https://www.rsyslog.com"] start
2025-04-03T17:21:37.756833+00:00 echelon rsyslogd: ommysql: db error (2002): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (13) [v8.2312.0]
2025-04-03T17:21:37.757196+00:00 echelon rsyslogd[33272]: rsyslogd: ommysql: db error (2002): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (13) [v8.2312.0]
2025-04-03T17:21:37.757293+00:00 echelon rsyslogd: action 'action-8-ommysql' suspended (module 'ommysql'), retry 0. There should be messages before this one giving the reason for suspension. [v8.2312.0 try https://www.rsyslog.com/e/2007 ]
2025-04-03T17:21:37.757312+00:00 echelon kernel: audit: type=1400 audit(1743700897.755:5683): apparmor="DENIED" operation="connect" class="file" info="Failed name lookup - disconnected path" error=-13 profile="rsyslogd" name="run/mysqld/mysqld.sock" pid=33272 comm=72733A6D61696E20513A526567 requested_mask="wr" denied_mask="wr" fsuid=102 ouid=113
2025-04-03T17:21:37.757315+00:00 echelon kernel: audit: type=1400 audit(1743700897.756:5684): apparmor="DENIED" operation="connect" class="file" info="Failed name lookup - disconnected path" error=-13 profile="rsyslogd" name="run/mysqld/mysqld.sock" pid=33272 comm=72733A6D61696E20513A526567 requested_mask="wr" denied_mask="wr" fsuid=102 ouid=113
2025-04-03T17:21:37.757390+00:00 echelon rsyslogd: action 'action-8-ommysql' suspended (module 'ommysql'), next retry is Thu Apr 3 17:22:07 2025, retry nbr 0. There should be messages before this one giving the reason for suspension. [v8.2312.0 try https://www.rsyslog.com/e/2007 ]
2025-04-03T17:21:37.757647+00:00 echelon rsyslogd: action 'action-8-ommysql' suspended (module 'ommysql'), retry 1. There should be messages before this one giving the reason for suspension. [v8.2312.0 try https://www.rsyslog.com/e/2007 ]
2025-04-03T17:21:37.758916+00:00 echelon kernel: audit: type=1400 audit(1743700897.757:5685): apparmor="DENIED" operation="connect" class="file" info="Failed name lookup - disconnected path" error=-13 profile="rsyslogd" name="run/mysqld/mysqld.sock" pid=33272 comm=72733A6D61696E20513A526567 requested_mask="wr" denied_mask="wr" fsuid=102 ouid=113
2025-04-03T17:21:37.758920+00:00 echelon kernel: audit: type=1400 audit(1743700897.757:5686): apparmor="DENIED" operation="connect" class="file" info="Failed name lookup - disconnected path" error=-13 profile="rsyslogd" name="run/mysqld/mysqld.sock" pid=33272 comm=72733A6D61696E20513A526567 requested_mask="wr" denied_mask="wr" fsuid=102 ouid=113
2025-04-03T17:21:37.758924+00:00 echelon kernel: audit: type=1400 audit(1743700897.757:5687): apparmor="DENIED" operation="connect" class="file" info="Failed name lookup - disconnected path" error=-13 profile="rsyslogd" name="run/mysqld/mysqld.sock" pid=33272 comm=72733A6D61696E20513A526567 requested_mask="wr" denied_mask="wr" fsuid=102 ouid=113
2025-04-03T17:21:37.758925+00:00 echelon kernel: audit: type=1400 audit(1743700897.758:5688): apparmor="DENIED" operation="connect" class="file" info="Failed name lookup - disconnected path" error=-13 profile="rsyslogd" name="run/mysqld/mysqld.sock" pid=33272 comm=72733A6D61696E20513A526567 requested_mask="wr" denied_mask="wr" fsuid=102 ouid=113
2025-04-03T17:21:37.758925+00:00 echelon kernel: audit: type=1400 audit(1743700897.758:5689): apparmor="DENIED" operation="connect" class="file" info="Failed name lookup - disconnected path" error=-13 profile="rsyslogd" name="run/mysqld/mysqld.sock" pid=33272 comm=72733A6D61696E20513A526567 requested_mask="wr" denied_mask="wr" fsuid=102 ouid=113
2025-04-03T17:21:37.759127+00:00 echelon rsyslogd: action 'action-8-ommysql' suspended (module 'ommysql'), retry 2. There should be messages before this one giving the reason for suspension. [v8.2312.0 try https://www.rsyslog.com/e/2007 ]
2025-04-03T17:21:37.759191+00:00 echelon kernel: audit: type=1400 audit(1743700897.758:5690): apparmor="DENIED" operation="connect" class="file" info="Failed name lookup - disconnected path" error=-13 profile="rsyslogd" name="run/mysqld/mysqld.sock" pid=33272 comm=72733A6D61696E20513A526567 requested_mask="wr" denied_mask="wr" fsuid=102 ouid=113
2025-04-03T17:21:37.759206+00:00 echelon rsyslogd: action 'action-8-ommysql' suspended (module 'ommysql'), retry 3. There should be messages before this one giving the reason for suspension. [v8.2312.0 try https://www.rsyslog.com/e/2007 ]
2025-04-03T17:21:37.759672+00:00 echelon rsyslogd: action 'action-8-ommysql' suspended (module 'ommysql'), retry 4. There should be messages before this one giving the reason for suspension. [v8.2312.0 try https://www.rsyslog.com/e/2007 ]
2025-04-03T17:21:37.759888+00:00 echelon rsyslogd: action 'action-8-ommysql' suspended (module 'ommysql'), retry 5. There should be messages before this one giving the reason for suspension. [v8.2312.0 try https://www.rsyslog.com/e/2007 ]
2025-04-03T17:21:37.760191+00:00 echelon kernel: audit: type=1400 audit(1743700897.759:5691): apparmor="DENIED" operation="connect" class="file" info="Failed name lookup - disconnected path" error=-13 profile="rsyslogd" name="run/mysqld/mysqld.sock" pid=33272 comm=72733A6D61696E20513A526567 requested_mask="wr" denied_mask="wr" fsuid=102 ouid=113
2025-04-03T17:21:37.760484+00:00 echelon rsyslogd: action 'action-8-ommysql' suspended (module 'ommysql'), retry 6. There should be messages before this one giving the reason for suspension. [v8.2312.0 try https://www.rsyslog.com/e/2007 ]
2025-04-03T17:21:37.760702+00:00 echelon rsyslogd: action 'action-8-ommysql' suspended (module 'ommysql'), retry 7. There should be messages before this one giving the reason for suspension. [v8.2312.0 try https://www.rsyslog.com/e/2007 ]
2025-04-03T17:21:37.761048+00:00 echelon rsyslogd: action 'action-8-ommysql' suspended (module 'ommysql'), retry 8. There should be messages before this one giving the reason for suspension. [v8.2312.0 try https://www.rsyslog.com/e/2007 ]
2025-04-03T17:21:37.761559+00:00 echelon rsyslogd: action 'action-8-ommysql' suspended (module 'ommysql'), retry 9. There should be messages before this one giving the reason for suspension. [v8.2312.0 try https://www.rsyslog.com/e/2007 ]
2025-04-03T17:21:37.762580+00:00 echelon rsyslogd: action 'action-8-ommysql' suspended (module 'ommysql'), retry 10. There should be messages before this one giving the reason for suspension. [v8.2312.0 try https://www.rsyslog.com/e/2007 ]
2025-04-03T17:21:37.763229+00:00 echelon rsyslogd: action 'action-8-ommysql' suspended (module 'ommysql'), retry 11. There should be messages before this one giving the reason for suspension. [v8.2312.0 try https://www.rsyslog.com/e/2007 ]
2025-04-03T17:21:37.763741+00:00 echelon rsyslogd: action 'action-8-ommysql' suspended (module 'ommysql'), retry 12. There should be messages before this one giving the reason for suspension. [v8.2312.0 try https://www.rsyslog.com/e/2007 ]

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions