Score:0

Service unable to use mysql when starting up

pe flag

I'm having an odd error. i've setup Postfix & ASSP, ASSP to use mysql databases and all is well. If I run perl assp.pl no worries life is good.

But however if I setup assp to run as a service (so that it auto starts) it does start, but none of the tables are imported, it either doesn't have access to perl, or it doesn't have access to mysql...

I've tried elevating the permissions, and just about everything I can think off... What might be causing this?

/etc/systemd/system/assp.service

[Unit]
Description=AntiSpam SMTP Proxy
After=mysql.service network.target
[Service]
Type=oneshot
RemainAfterExit=true
ExecStart=/usr/bin/perl /var/db/assp/assp.pl /var/db/assp/
ExecStop=/usr/bin/killall /usr/bin/perl
User=root
[Install]
WantedBy=multi-user.target

Any advice would be very much appreciated :)

Startup Log The startup log actually shows the error. But I am unsure if it's a perl or mysql permission error.

Jul-06-21 00:52:41 [Worker_10001] Whitelist database error: Can't locate object method "connect" via package "DBI" at sub main::checkDBCon line 63.
Jul-06-21 00:52:41 [Worker_10001] Persblack database error: Can't locate object method "connect" via package "DBI" at sub main::checkDBCon line 63.
Jul-06-21 00:52:41 [Worker_10001] Redlist database error: Can't locate object method "connect" via package "DBI" at sub main::checkDBCon line 63.
Jul-06-21 00:52:41 [Worker_10001] Delaydb database error: Can't locate object method "connect" via package "DBI" at sub main::checkDBCon line 63.
Jul-06-21 00:52:41 [Worker_10001] Delaydb.white database error: Can't locate object method "connect" via package "DBI" at sub main::checkDBCon line 63.
Jul-06-21 00:52:41 [Worker_10001] Pbdb.white.db database error: Can't locate object method "connect" via package "DBI" at sub main::checkDBCon line 63.
Jul-06-21 00:52:41 [Worker_10001] Pbdb.black.db database error: Can't locate object method "connect" via package "DBI" at sub main::checkDBCon line 63.
Jul-06-21 00:52:41 [Worker_10001] Pbdb.rbl.db database error: Can't locate object method "connect" via package "DBI" at sub main::checkDBCon line 63
Michael Hampton avatar
cz flag
What is logged when you start the service?
Marcel avatar
pe flag
Well everything as normal, Except for the table import @MichaelHamptonm I've added it above
Michael Hampton avatar
cz flag
This looks like an installation problem. Exactly how did you install ASSP?
Marcel avatar
pe flag
@MichaelHampton I installed it following a guide for centos... There's no major strange thing about the install. Only odd thing (that's not really that odd) is that I use myql for the storage of the records
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.