|
From: Michael Z. <zi...@ve...> - 2006-11-30 22:49:43
Attachments:
zim.vcf
|
Dear list, after running a while sqlgrey stops working. The logs show, that it restarted, but it's port is closed after the restart. Running it with log-level 4 showed: optin: greylisting active for zi...@ve... grey: identified dynamic pattern (last IP byte): 12-226-48-61.client.mchsi.com, 12.226.48.61: Using full IP. grey: reconnect ok: 12.226.48.61(12.226.48.61), jo...@pi... -> zi...@ve... (00:05:05) grey: from awl: 12.226.48.61, jo...@pi... added request: ccert_fingerprint= ccert_issuer= ccert_subject= client_address=12.226.48.61 client_name=12-226-48-61.client.mchsi.com helo_name=friend instance=472.456e1830.0 protocol_name=ESMTP protocol_state=RCPT queue_id= rec...@ve... request=smtpd_access_policy sasl_method= sasl_sender= sasl_username= sen...@pi... size=0 action=PREPEND X-Greylist: delayed 00:05:05 by SQLgrey-1.7.4 2006/11/30-00:32:06 Server closing! 2006/11/30-00:32:06 HUP'ing server 2006/11/30-00:32:07 sqlgrey (type Net::Server::Multiplex) starting! pid(30268) Use of uninitialized value in unlink at /usr/sbin/sqlgrey line 2577. Binding open file descriptors Binding to TCP port 2501 on host localhost Setting gid to "66 66" other: Initial cleanup perf: spent 0s cleaning: from_awl (0) domain_awl (0) connect (0) -- after that sqlgrey's port is closed -- As the lines before the final stop + (unsuccessful) restart don't have a timestamp, I am not sure, that the last action did really occur just before the shutdown+restart. Hence the reason for the shutdown could well be something, which is not connected with the input (but perhaps with a timeout on the postfix side?). The sqlgrey is just started manually via a # nohup sqlgrey & or am I wrong about that, and the sqlgrey needs to be entered into the master.cf to be started as a postfix-service? Thanks for your ideas about that situation Michael |
|
From: Lionel B. <lio...@bo...> - 2006-11-30 23:17:08
|
Michael Zimmermann wrote the following on 30.11.2006 23:49 : > Dear list, > > after running a while sqlgrey stops working. The logs show, that it > restarted, but it's > port is closed after the restart. It could be the old sqlgrey process still living and bound to the socket when the new one comes up (the underlying Net::Server::Multiplex library has already demonstrated this behaviour on my systems). My solution was to : 1/ add a long enough sleep between the TERM signal (sqlgrey -k or killall sqlgrey for example) and the restart. 2/ use Nagios to monitor the port (check_tcp) and be warned if it goes down. > > X-Greylist: delayed 00:05:05 by SQLgrey-1.7.4 Good I know the version -:) > Use of uninitialized value in unlink at /usr/sbin/sqlgrey line 2577. Odd : it seems the pidfile location is undefined when trying to kill the daemon. > > The sqlgrey is just started manually via a > # nohup sqlgrey & > Ok I know why SQLgrey doesn't find a pidfile: it doesn't know it is running as a daemon. You should start it with 'sqlgrey -d' and kill it with 'sqlgrey -k' both as root (they need read/write access to /var/run/sqlgrey.pid and change to sqlgrey's uid later anyway). > or am I wrong about that, and the sqlgrey needs to be entered into the > master.cf to be started as a postfix-service? > No, it doesn't support running from master.cf (until someone codes the support for this). To sum up : - first try the 'sqlgrey -d' / 'sqlgrey -k' start/stop method, - then if you still have problems when restarting SQLgrey, make a short pause (one second should be enough, increase if you still have problems) between the stop and the start. Anyway, why do you need to restart SQLgrey? There are reasons such as DBD-driver leaks with some versions of the PostgreSQL DBD driver for example, but they should be exceptions. Lionel. |
|
From: Michael Z. <zi...@ve...> - 2006-12-01 01:40:56
Attachments:
zim.vcf
|
Hi Lionel, thanks for your help. > Anyway, why do you need to restart SQLgrey? There are reasons such as > DBD-driver leaks with some versions of the PostgreSQL DBD driver for > example, but they should be exceptions. > I didn't restart it. Sqlgrey did that on itself. I just observed that it did not do it's job after some time, recognized that port 2501 was closed , so I set a watchdog on localhost:2501 and checked what had happened, when the watchdog barked. But perhaps that problem was a consequence of not starting sqlgrey as a daemon. I will see and come back with the results, after it runs a day or two started correctly with the -d flag. :) greetings Michael |
|
From: Michael Z. <zi...@ve...> - 2006-12-03 09:47:40
Attachments:
zim.vcf
|
Just to let you all know: The problem disappeared after starting sqlgrey correctly with the -d (deamonize) flag. Have a nice day, thanks for your help. Michael |
|
From: Dan F. <da...@ha...> - 2006-12-01 16:57:54
|
Lionel Bouton wrote: > Michael Zimmermann wrote the following on 30.11.2006 23:49 : > >> after running a while sqlgrey stops working. The logs show, that it >> restarted, but it's >> port is closed after the restart. >> > > It could be the old sqlgrey process still living and bound to the socket > when the new one comes up (the underlying Net::Server::Multiplex library > has already demonstrated this behaviour on my systems). My solution was to : > 1/ add a long enough sleep between the TERM signal (sqlgrey -k or > killall sqlgrey for example) and the restart. > My other policy daemon actually did this from time to time, though i dont recall sqlgrey doing it. My solution was first the "sleep 2" thingie, but i then solved it by adding "Reuse => 1" to the creation of Net::Server. It seemed that the socket wasnt released fast enough and adding "Reuse" should allow it to... Well.. Reuse the socket ;) Ive also had a similar problem with postgrey back in the days, which was due to the cleanup running for to long time which made postfix believe it was offline. (though i dont remember if the socket actually died). If Michaels problem persists, socket "Reuse" might be worth a try. - Dan Faerch |