DIYMacServer » Everything else

8 posts

Starting greylisting at startup

started at 15 Nov 2008
started by dw
last reply from richard
  • dw
    15 Nov 2008
    #

    Trouble with sqlgrey starting at login. I've set up the StartupItem as described for Tiger, and when I start it manually from Terminal, it works. Here're the errors I receive:

    Nov 15 10:38:59 X sqlgrey: 2008/11/15-10:38:59 sqlgrey (type Net::Server::Multiplex) starting! pid(290)\n
    Nov 15 10:38:59 X sqlgrey: Binding to TCP port 2501 on host localhost\n\n
    Nov 15 10:38:59 X sqlgrey: Setting gid to "27 27"\n
    Nov 15 10:38:59 X sqlgrey: Setting uid to "103"\n
    Nov 15 10:39:00 X sqlgrey: dbaccess: can't connect to DB: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)\n
    Nov 15 10:39:00 X sqlgrey: dbaccess: error: couldn't get now() from DB: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)\n
    Nov 15 10:39:00 X sqlgrey: fatal: Can't call method "do" on an undefined value at /usr/sbin/sqlgrey line 308.\n
    Nov 15 10:40:51 X postfix/smtpd[326]: warning: connect to 127.0.0.1:2501: Connection refused
    Nov 15 10:40:51 X postfix/smtpd[326]: warning: problem talking to server 127.0.0.1:2501: Connection refused
    Nov 15 10:40:52 X postfix/smtpd[326]: warning: connect to 127.0.0.1:2501: Connection refused
    Nov 15 10:40:52 X postfix/smtpd[326]: warning: problem talking to server 127.0.0.1:2501: Connection refused

  • 15 Nov 2008
    #

    if you start it manually, do you start it with SUDO or as a regular user ?

  • dw
    15 Nov 2008
    #

    I use

    sudo sqlgrey -d &

  • 16 Nov 2008
    #

    It looks a lot like a permissioning problem to me ? If you run it from the command line and using the startup item do you see a difference in the user running the command when keeping an eye on the running processes?

  • dw
    18 Nov 2008
    #

    Hmm... looks like it may go back to my recent upgrade of postfix. Here is another error:

    Nov 17 17:07:44 X authdaemond: failed to connect to mysql server (server=localhost, userid=postfix): Can't connect to local MySQL server through socket '/private/tmp/mysql.sock' (2)

    If you have a quick idea, let me know. I'll be looking into it as soon as I can, too. (note: I can start both postfix and sqlgrey from the command line without a problem).

  • 19 Nov 2008
    #

    sorry, withut more info I'm just as lost as you are.

    Is the sock file present ? Is MySQL running ?

  • dw
    05 Jan 2009
    #

    Ah, I think I've tracked down the issue, which is occurring as well on my new Leopard installation. It looks like mysql is starting up just a little bit later than dspam or sqlgrey:


    1/4/09 6:30:06 AM com.diymacserver.dspam[53] 53: [01/04/2009 06:30:06] Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
    1/4/09 6:30:06 AM com.diymacserver.dspam[53] 53: [01/04/2009 06:30:06] Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
    1/4/09 6:30:06 AM com.diymacserver.dspam[53] 53: [01/04/2009 06:30:06] Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
    1/4/09 6:30:14 AM com.apple.SystemStarter[57] Starting MySQL database server

    I'm going to look into how to solve this, but if anyone has an idea off the bat...

  • 07 Jan 2009
    #

    I've noticed this as wel, but DSpam keeps trying to connect. Haven't seen this afecting sqlgrey yet. Could be by the fact I don't reboot that much.

    In the old start up scripts in Tiger you had the ability to specify a depends on setting where you could say it should start after other stuff had started. This option has been removed from the launchd stuff.

Reply

You must log in to post.