haraka / Haraka

A fast, highly extensible, and event driven SMTP server
https://haraka.github.io
MIT License
5.09k stars 661 forks source link

CTRL+C doesn't kill Haraka #1498

Closed darkpixel closed 8 years ago

darkpixel commented 8 years ago

Haraka version

2.8.5

Expected behavior

CTRL+C should stop new connections, drain existing connections, then exit.

Observed behavior

CTRL+C prints 'SIGINT received', hangs until CTRL+C pressed again with no connections.

baudehlo commented 8 years ago

Do you have a custom plugin that holds something open?

If nothing custom, please list your config/plugins here.

On Jun 5, 2016, at 4:09 PM, Aaron C. de Bruyn notifications@github.com wrote:

Haraka version

2.8.5

Expected behavior

CTRL+C should stop new connections, drain existing connections, then exit.

Observed behavior

CTRL+C prints 'SIGINT received', hangs until CTRL+C pressed again with no connections.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

darkpixel commented 8 years ago

This occurs with a bare minimum set of plugins:

root@collective:/opt/uitmail# haraka -c . -o
Returning boolean false for main.disabled=false
Returning boolean true for main.enable_tls=true
Returning boolean false for main.ipv6_enabled=false
Returning boolean true for main.always_split=true

Hook: init_master --------------------------------------------------------------
Plugin                              Method                              Prio T/O
--------------------------------------------------------------------------------
redis                               init_redis_connection                  0  30
process_title                       hook_init_master                       0  30

Hook: init_child ---------------------------------------------------------------
Plugin                              Method                              Prio T/O
--------------------------------------------------------------------------------
redis                               init_redis_connection                  0  30
process_title                       hook_init_child                        0  30

Hook: connect_init -------------------------------------------------------------
Plugin                              Method                              Prio T/O
--------------------------------------------------------------------------------
process_title                       hook_connect_init                      0  30

Hook: disconnect ---------------------------------------------------------------
Plugin                              Method                              Prio T/O
--------------------------------------------------------------------------------
process_title                       hook_disconnect                        0  30

Hook: data ---------------------------------------------------------------------
Plugin                              Method                              Prio T/O
--------------------------------------------------------------------------------
process_title                       hook_data                              0  30

Hook: log ----------------------------------------------------------------------
Plugin                              Method                              Prio T/O
--------------------------------------------------------------------------------
log.syslog                          syslog                                 0  30

Hook: lookup_rdns --------------------------------------------------------------
Plugin                              Method                              Prio T/O
--------------------------------------------------------------------------------
toobusy                             check_busy                             0  30

Hook: rcpt ---------------------------------------------------------------------
Plugin                              Method                              Prio T/O
--------------------------------------------------------------------------------
rcpt_to.in_host_list                hook_rcpt                              0  30

Hook: mail ---------------------------------------------------------------------
Plugin                              Method                              Prio T/O
--------------------------------------------------------------------------------
rcpt_to.in_host_list                hook_mail                              0  30

Hook: get_mx -------------------------------------------------------------------
Plugin                              Method                              Prio T/O
--------------------------------------------------------------------------------
queue/lmtp                          hook_get_mx                            0  30

Hook: queue --------------------------------------------------------------------
Plugin                              Method                              Prio T/O
--------------------------------------------------------------------------------
queue/lmtp                          hook_queue                             0  30

root@collective:/opt/uitmail# 
darkpixel commented 8 years ago

Removing all plugins causes the issue as well.

darkpixel commented 8 years ago

I just noticed the recent commit. I'll test with that.

darkpixel commented 8 years ago

Tested with the latest version, and it seems to work, but is a delay of 5 seconds (with no output) and then I get kicked back to the command line.

I think I'm hitting the timeout here: https://github.com/haraka/Haraka/blob/master/server.js#L107

baudehlo commented 8 years ago

If you don't want the 5s delay then run with nodes=cpus in smtp.ini.

On Jun 6, 2016, at 8:06 PM, Aaron C. de Bruyn notifications@github.com wrote:

Tested with the latest version, and it seems to work, but is a delay of 5 seconds (with no output) and then I get kicked back to the command line.

I think I'm hitting the timeout here: https://github.com/haraka/Haraka/blob/master/server.js#L107

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub, or mute the thread.

darkpixel commented 8 years ago

Right--I'm testing from the CLI, but in production it will be running under pm2.

baudehlo commented 8 years ago

Don't run Haraka under pm2. It's a bad idea. Just use nodes=cpus instead.

On Jun 6, 2016, at 8:20 PM, Aaron C. de Bruyn notifications@github.com wrote:

Right--I'm testing from the CLI, but in production it will be running under pm2.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub, or mute the thread.

darkpixel commented 8 years ago

How would you recommend launching it? Write an init script to call haraka -c /path & to background it?

I switched it to nodes=cpus and now shutdown hangs about 30 seconds for each worker:

[NOTICE] [-] [server] New uid: 1003
[DEBUG] [-] [server] running init_child hooks
[DEBUG] [-] [server] running init_child hook in redis plugin
[NOTICE] [-] [core] worker 16 listening on 0.0.0.0:2529
[DEBUG] [-] [connect.asn] origin.asn.cymru.com answers: 11233 | 209.216.160.0/19 | US | arin | 2001-03-07
[INFO] [-] [connect.asn] origin.asn.cymru.com succeeded
[DEBUG] [-] [core] registered hook lookup_rdns to connect.asn.lookup_asn priority 0
[DEBUG] [-] [connect.asn] origin.asn.spameatingmonkey.net answers: 209.216.160.0/19 | AS11233 | Gorge Networks Inc. | 1998-05-26 | US
[INFO] [-] [connect.asn] origin.asn.spameatingmonkey.net succeeded
[DEBUG] [-] [dnsbl] looking up: 2.0.0.127.dnsbl.sorbs.net.
[DEBUG] [-] [dnsbl] looking up: 2.0.0.127.dnsbl-1.uceprotect.net.
[DEBUG] [-] [dnsbl] looking up: 2.0.0.127.cbl.abuseat.org.
[DEBUG] [-] [dnsbl] looking up: 2.0.0.127.bl.spamcop.net.
[NOTICE] [-] [log.elasticsearch] connected
[INFO] [-] [redis] connected to redis://127.0.0.1:6379 v2.8.17
[DEBUG] [-] [server] hook=init_child plugin=redis function=init_redis_connection params="" retval=CONT msg=""
[DEBUG] [-] [server] running init_child hook in process_title plugin
[DEBUG] [-] [server] hook=init_child plugin=process_title function=hook_init_child params="" retval=CONT msg=""
[DEBUG] [-] [server] running init_child hook in greylist plugin
[INFO] [-] [greylist] [gl] Redis connected to undefined:0/11 v2.8.17
[DEBUG] [-] [server] hook=init_child plugin=greylist function=redis_onInit params="" retval=CONT msg=""
^C[NOTICE] [-] [core] SIGINT received
[NOTICE] [-] [core] SIGINT received
[NOTICE] [-] [core] SIGINT received
[NOTICE] [-] [core] SIGINT received
[NOTICE] [-] [core] SIGINT received
[NOTICE] [-] [core] SIGINT received
[NOTICE] [-] [core] SIGINT received
[NOTICE] [-] [core] SIGINT received
[NOTICE] [-] [core] SIGINT received
[NOTICE] [-] [core] SIGINT received
[NOTICE] [-] [core] SIGINT received
[NOTICE] [-] [core] SIGINT received
[NOTICE] [-] [core] SIGINT received
[NOTICE] [-] [core] SIGINT received
[NOTICE] [-] [core] SIGINT received
[NOTICE] [-] [core] SIGINT received
[NOTICE] [-] [core] SIGINT received
[NOTICE] [-] [core] Killing node: 1
[INFO] [-] [core] [outbound] Shutting down temp fail queue
[INFO] [-] [core] [cfreader] Shutting down enoent timer
[INFO] [-] [core] [plugins] Shutting down plugins
node_redis: Using .end() without the flush parameter is deprecated and throws from v.3.0.0 on.
Please check the doku (https://github.com/NodeRedis/node_redis) and explictly use flush.
node_redis: Using .end() without the flush parameter is deprecated and throws from v.3.0.0 on.
Please check the doku (https://github.com/NodeRedis/node_redis) and explictly use flush.
[NOTICE] [-] [core] Disconnect complete
--hangs for ~30 seconds--
[CRIT] [-] [core] Worker 1 failed to shutdown. Killing.
[NOTICE] [-] [core] Killing node: 2
[INFO] [-] [core] [outbound] Shutting down temp fail queue
[INFO] [-] [core] [cfreader] Shutting down enoent timer
[INFO] [-] [core] [plugins] Shutting down plugins
node_redis: Using .end() without the flush parameter is deprecated and throws from v.3.0.0 on.
Please check the doku (https://github.com/NodeRedis/node_redis) and explictly use flush.
node_redis: Using .end() without the flush parameter is deprecated and throws from v.3.0.0 on.
Please check the doku (https://github.com/NodeRedis/node_redis) and explictly use flush.
[NOTICE] [-] [core] Disconnect complete
--hangs for ~30 seconds--
[CRIT] [-] [core] Worker 2 failed to shutdown. Killing.
[NOTICE] [-] [core] Killing node: 3
[INFO] [-] [core] [outbound] Shutting down temp fail queue
[INFO] [-] [core] [cfreader] Shutting down enoent timer
[INFO] [-] [core] [plugins] Shutting down plugins
node_redis: Using .end() without the flush parameter is deprecated and throws from v.3.0.0 on.
Please check the doku (https://github.com/NodeRedis/node_redis) and explictly use flush.
node_redis: Using .end() without the flush parameter is deprecated and throws from v.3.0.0 on.
Please check the doku (https://github.com/NodeRedis/node_redis) and explictly use flush.
[NOTICE] [-] [core] Disconnect complete
--hangs for ~30 seconds--
[CRIT] [-] [core] Worker 3 failed to shutdown. Killing.
[NOTICE] [-] [core] Killing node: 4
[INFO] [-] [core] [outbound] Shutting down temp fail queue
[INFO] [-] [core] [cfreader] Shutting down enoent timer
[INFO] [-] [core] [plugins] Shutting down plugins
node_redis: Using .end() without the flush parameter is deprecated and throws from v.3.0.0 on.
Please check the doku (https://github.com/NodeRedis/node_redis) and explictly use flush.
node_redis: Using .end() without the flush parameter is deprecated and throws from v.3.0.0 on.
Please check the doku (https://github.com/NodeRedis/node_redis) and explictly use flush.
[NOTICE] [-] [core] Disconnect complete

Disabling the redis plugin still shows:

^C[NOTICE] [-] [core] SIGINT received
[NOTICE] [-] [core] SIGINT received
[NOTICE] [-] [core] SIGINT received
[NOTICE] [-] [core] SIGINT received
[NOTICE] [-] [core] SIGINT received
[NOTICE] [-] [core] SIGINT received
[NOTICE] [-] [core] SIGINT received
[NOTICE] [-] [core] SIGINT received
[NOTICE] [-] [core] SIGINT received
[NOTICE] [-] [core] SIGINT received
[NOTICE] [-] [core] SIGINT received
[NOTICE] [-] [core] SIGINT received
[NOTICE] [-] [core] SIGINT received
[NOTICE] [-] [core] SIGINT received
[NOTICE] [-] [core] SIGINT received
[NOTICE] [-] [core] SIGINT received
[NOTICE] [-] [core] SIGINT received
[NOTICE] [-] [core] Killing node: 1
[INFO] [-] [core] [outbound] Shutting down temp fail queue
[INFO] [-] [core] [cfreader] Shutting down enoent timer
[INFO] [-] [core] [plugins] Shutting down plugins
node_redis: Using .end() without the flush parameter is deprecated and throws from v.3.0.0 on.
Please check the doku (https://github.com/NodeRedis/node_redis) and explictly use flush.
node_redis: Using .end() without the flush parameter is deprecated and throws from v.3.0.0 on.
Please check the doku (https://github.com/NodeRedis/node_redis) and explictly use flush.
[NOTICE] [-] [core] Disconnect complete

...for each node, but there is no delay in shutting down.

baudehlo commented 8 years ago

OK, so the redis shutdown code is wrong somehow.

I don't have/run redis. Can you try changing the code in the plugin's shutdown() method to use .quit() instead of .end()?

On Mon, Jun 6, 2016 at 11:56 PM, Aaron C. de Bruyn <notifications@github.com

wrote:

How would you recommend launching it? Write an init script to call haraka -c /path & to background it?

I switched it to nodes=cpus and now shutdown hangs about 30 seconds for each worker:

[NOTICE] [-] [server] New uid: 1003 [DEBUG] [-] [server] running init_child hooks [DEBUG] [-] [server] running init_child hook in redis plugin [NOTICE] [-] [core] worker 16 listening on 0.0.0.0:2529 [DEBUG] [-] [connect.asn] origin.asn.cymru.com answers: 11233 | 209.216.160.0/19 | US | arin | 2001-03-07 [INFO] [-] [connect.asn] origin.asn.cymru.com succeeded [DEBUG] [-] [core] registered hook lookup_rdns to connect.asn.lookup_asn priority 0 [DEBUG] [-] [connect.asn] origin.asn.spameatingmonkey.net answers: 209.216.160.0/19 | AS11233 | Gorge Networks Inc. | 1998-05-26 | US [INFO] [-] [connect.asn] origin.asn.spameatingmonkey.net succeeded [DEBUG] [-] [dnsbl] looking up: 2.0.0.127.dnsbl.sorbs.net. [DEBUG] [-] [dnsbl] looking up: 2.0.0.127.dnsbl-1.uceprotect.net. [DEBUG] [-] [dnsbl] looking up: 2.0.0.127.cbl.abuseat.org. [DEBUG] [-] [dnsbl] looking up: 2.0.0.127.bl.spamcop.net. [NOTICE] [-] [log.elasticsearch] connected [INFO] [-] [redis] connected to redis://127.0.0.1:6379 v2.8.17 [DEBUG] [-] [server] hook=init_child plugin=redis function=init_redis_connection params="" retval=CONT msg="" [DEBUG] [-] [server] running init_child hook in process_title plugin [DEBUG] [-] [server] hook=init_child plugin=process_title function=hook_init_child params="" retval=CONT msg="" [DEBUG] [-] [server] running init_child hook in greylist plugin [INFO] [-] [greylist] [gl] Redis connected to undefined:0/11 v2.8.17 [DEBUG] [-] [server] hook=init_child plugin=greylist function=redis_onInit params="" retval=CONT msg="" ^C[NOTICE] [-] [core] SIGINT received [NOTICE] [-] [core] SIGINT received [NOTICE] [-] [core] SIGINT received [NOTICE] [-] [core] SIGINT received [NOTICE] [-] [core] SIGINT received [NOTICE] [-] [core] SIGINT received [NOTICE] [-] [core] SIGINT received [NOTICE] [-] [core] SIGINT received [NOTICE] [-] [core] SIGINT received [NOTICE] [-] [core] SIGINT received [NOTICE] [-] [core] SIGINT received [NOTICE] [-] [core] SIGINT received [NOTICE] [-] [core] SIGINT received [NOTICE] [-] [core] SIGINT received [NOTICE] [-] [core] SIGINT received [NOTICE] [-] [core] SIGINT received [NOTICE] [-] [core] SIGINT received [NOTICE] [-] [core] Killing node: 1 [INFO] [-] [core] [outbound] Shutting down temp fail queue [INFO] [-] [core] [cfreader] Shutting down enoent timer [INFO] [-] [core] [plugins] Shutting down plugins node_redis: Using .end() without the flush parameter is deprecated and throws from v.3.0.0 on. Please check the doku (https://github.com/NodeRedis/node_redis) and explictly use flush. node_redis: Using .end() without the flush parameter is deprecated and throws from v.3.0.0 on. Please check the doku (https://github.com/NodeRedis/node_redis) and explictly use flush. [NOTICE] [-] [core] Disconnect complete --hangs for ~30 seconds-- [CRIT] [-] [core] Worker 1 failed to shutdown. Killing. [NOTICE] [-] [core] Killing node: 2 [INFO] [-] [core] [outbound] Shutting down temp fail queue [INFO] [-] [core] [cfreader] Shutting down enoent timer [INFO] [-] [core] [plugins] Shutting down plugins node_redis: Using .end() without the flush parameter is deprecated and throws from v.3.0.0 on. Please check the doku (https://github.com/NodeRedis/node_redis) and explictly use flush. node_redis: Using .end() without the flush parameter is deprecated and throws from v.3.0.0 on. Please check the doku (https://github.com/NodeRedis/node_redis) and explictly use flush. [NOTICE] [-] [core] Disconnect complete --hangs for ~30 seconds-- [CRIT] [-] [core] Worker 2 failed to shutdown. Killing. [NOTICE] [-] [core] Killing node: 3 [INFO] [-] [core] [outbound] Shutting down temp fail queue [INFO] [-] [core] [cfreader] Shutting down enoent timer [INFO] [-] [core] [plugins] Shutting down plugins node_redis: Using .end() without the flush parameter is deprecated and throws from v.3.0.0 on. Please check the doku (https://github.com/NodeRedis/node_redis) and explictly use flush. node_redis: Using .end() without the flush parameter is deprecated and throws from v.3.0.0 on. Please check the doku (https://github.com/NodeRedis/node_redis) and explictly use flush. [NOTICE] [-] [core] Disconnect complete --hangs for ~30 seconds-- [CRIT] [-] [core] Worker 3 failed to shutdown. Killing. [NOTICE] [-] [core] Killing node: 4 [INFO] [-] [core] [outbound] Shutting down temp fail queue [INFO] [-] [core] [cfreader] Shutting down enoent timer [INFO] [-] [core] [plugins] Shutting down plugins node_redis: Using .end() without the flush parameter is deprecated and throws from v.3.0.0 on. Please check the doku (https://github.com/NodeRedis/node_redis) and explictly use flush. node_redis: Using .end() without the flush parameter is deprecated and throws from v.3.0.0 on. Please check the doku (https://github.com/NodeRedis/node_redis) and explictly use flush. [NOTICE] [-] [core] Disconnect complete

Disabling the redis plugin still shows:

^C[NOTICE] [-] [core] SIGINT received [NOTICE] [-] [core] SIGINT received [NOTICE] [-] [core] SIGINT received [NOTICE] [-] [core] SIGINT received [NOTICE] [-] [core] SIGINT received [NOTICE] [-] [core] SIGINT received [NOTICE] [-] [core] SIGINT received [NOTICE] [-] [core] SIGINT received [NOTICE] [-] [core] SIGINT received [NOTICE] [-] [core] SIGINT received [NOTICE] [-] [core] SIGINT received [NOTICE] [-] [core] SIGINT received [NOTICE] [-] [core] SIGINT received [NOTICE] [-] [core] SIGINT received [NOTICE] [-] [core] SIGINT received [NOTICE] [-] [core] SIGINT received [NOTICE] [-] [core] SIGINT received [NOTICE] [-] [core] Killing node: 1 [INFO] [-] [core] [outbound] Shutting down temp fail queue [INFO] [-] [core] [cfreader] Shutting down enoent timer [INFO] [-] [core] [plugins] Shutting down plugins node_redis: Using .end() without the flush parameter is deprecated and throws from v.3.0.0 on. Please check the doku (https://github.com/NodeRedis/node_redis) and explictly use flush. node_redis: Using .end() without the flush parameter is deprecated and throws from v.3.0.0 on. Please check the doku (https://github.com/NodeRedis/node_redis) and explictly use flush. [NOTICE] [-] [core] Disconnect complete

...for each node, but there is no delay in shutting down.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/haraka/Haraka/issues/1498#issuecomment-224166885, or mute the thread https://github.com/notifications/unsubscribe/AAobYydmOI9iWF7gk75ftzvNMZ9aveYtks5qJOvigaJpZM4IubxF .

baudehlo commented 8 years ago

Oh, and there are example init scripts for launching Haraka in the contrib folder.

On Tue, Jun 7, 2016 at 10:08 AM, Matt helpme@gmail.com wrote:

OK, so the redis shutdown code is wrong somehow.

I don't have/run redis. Can you try changing the code in the plugin's shutdown() method to use .quit() instead of .end()?

On Mon, Jun 6, 2016 at 11:56 PM, Aaron C. de Bruyn < notifications@github.com> wrote:

How would you recommend launching it? Write an init script to call haraka -c /path & to background it?

I switched it to nodes=cpus and now shutdown hangs about 30 seconds for each worker:

[NOTICE] [-] [server] New uid: 1003 [DEBUG] [-] [server] running init_child hooks [DEBUG] [-] [server] running init_child hook in redis plugin [NOTICE] [-] [core] worker 16 listening on 0.0.0.0:2529 [DEBUG] [-] [connect.asn] origin.asn.cymru.com answers: 11233 | 209.216.160.0/19 | US | arin | 2001-03-07 [INFO] [-] [connect.asn] origin.asn.cymru.com succeeded [DEBUG] [-] [core] registered hook lookup_rdns to connect.asn.lookup_asn priority 0 [DEBUG] [-] [connect.asn] origin.asn.spameatingmonkey.net answers: 209.216.160.0/19 | AS11233 | Gorge Networks Inc. | 1998-05-26 | US [INFO] [-] [connect.asn] origin.asn.spameatingmonkey.net succeeded [DEBUG] [-] [dnsbl] looking up: 2.0.0.127.dnsbl.sorbs.net. [DEBUG] [-] [dnsbl] looking up: 2.0.0.127.dnsbl-1.uceprotect.net. [DEBUG] [-] [dnsbl] looking up: 2.0.0.127.cbl.abuseat.org. [DEBUG] [-] [dnsbl] looking up: 2.0.0.127.bl.spamcop.net. [NOTICE] [-] [log.elasticsearch] connected [INFO] [-] [redis] connected to redis://127.0.0.1:6379 v2.8.17 [DEBUG] [-] [server] hook=init_child plugin=redis function=init_redis_connection params="" retval=CONT msg="" [DEBUG] [-] [server] running init_child hook in process_title plugin [DEBUG] [-] [server] hook=init_child plugin=process_title function=hook_init_child params="" retval=CONT msg="" [DEBUG] [-] [server] running init_child hook in greylist plugin [INFO] [-] [greylist] [gl] Redis connected to undefined:0/11 v2.8.17 [DEBUG] [-] [server] hook=init_child plugin=greylist function=redis_onInit params="" retval=CONT msg="" ^C[NOTICE] [-] [core] SIGINT received [NOTICE] [-] [core] SIGINT received [NOTICE] [-] [core] SIGINT received [NOTICE] [-] [core] SIGINT received [NOTICE] [-] [core] SIGINT received [NOTICE] [-] [core] SIGINT received [NOTICE] [-] [core] SIGINT received [NOTICE] [-] [core] SIGINT received [NOTICE] [-] [core] SIGINT received [NOTICE] [-] [core] SIGINT received [NOTICE] [-] [core] SIGINT received [NOTICE] [-] [core] SIGINT received [NOTICE] [-] [core] SIGINT received [NOTICE] [-] [core] SIGINT received [NOTICE] [-] [core] SIGINT received [NOTICE] [-] [core] SIGINT received [NOTICE] [-] [core] SIGINT received [NOTICE] [-] [core] Killing node: 1 [INFO] [-] [core] [outbound] Shutting down temp fail queue [INFO] [-] [core] [cfreader] Shutting down enoent timer [INFO] [-] [core] [plugins] Shutting down plugins node_redis: Using .end() without the flush parameter is deprecated and throws from v.3.0.0 on. Please check the doku (https://github.com/NodeRedis/node_redis) and explictly use flush. node_redis: Using .end() without the flush parameter is deprecated and throws from v.3.0.0 on. Please check the doku (https://github.com/NodeRedis/node_redis) and explictly use flush. [NOTICE] [-] [core] Disconnect complete --hangs for ~30 seconds-- [CRIT] [-] [core] Worker 1 failed to shutdown. Killing. [NOTICE] [-] [core] Killing node: 2 [INFO] [-] [core] [outbound] Shutting down temp fail queue [INFO] [-] [core] [cfreader] Shutting down enoent timer [INFO] [-] [core] [plugins] Shutting down plugins node_redis: Using .end() without the flush parameter is deprecated and throws from v.3.0.0 on. Please check the doku (https://github.com/NodeRedis/node_redis) and explictly use flush. node_redis: Using .end() without the flush parameter is deprecated and throws from v.3.0.0 on. Please check the doku (https://github.com/NodeRedis/node_redis) and explictly use flush. [NOTICE] [-] [core] Disconnect complete --hangs for ~30 seconds-- [CRIT] [-] [core] Worker 2 failed to shutdown. Killing. [NOTICE] [-] [core] Killing node: 3 [INFO] [-] [core] [outbound] Shutting down temp fail queue [INFO] [-] [core] [cfreader] Shutting down enoent timer [INFO] [-] [core] [plugins] Shutting down plugins node_redis: Using .end() without the flush parameter is deprecated and throws from v.3.0.0 on. Please check the doku (https://github.com/NodeRedis/node_redis) and explictly use flush. node_redis: Using .end() without the flush parameter is deprecated and throws from v.3.0.0 on. Please check the doku (https://github.com/NodeRedis/node_redis) and explictly use flush. [NOTICE] [-] [core] Disconnect complete --hangs for ~30 seconds-- [CRIT] [-] [core] Worker 3 failed to shutdown. Killing. [NOTICE] [-] [core] Killing node: 4 [INFO] [-] [core] [outbound] Shutting down temp fail queue [INFO] [-] [core] [cfreader] Shutting down enoent timer [INFO] [-] [core] [plugins] Shutting down plugins node_redis: Using .end() without the flush parameter is deprecated and throws from v.3.0.0 on. Please check the doku (https://github.com/NodeRedis/node_redis) and explictly use flush. node_redis: Using .end() without the flush parameter is deprecated and throws from v.3.0.0 on. Please check the doku (https://github.com/NodeRedis/node_redis) and explictly use flush. [NOTICE] [-] [core] Disconnect complete

Disabling the redis plugin still shows:

^C[NOTICE] [-] [core] SIGINT received [NOTICE] [-] [core] SIGINT received [NOTICE] [-] [core] SIGINT received [NOTICE] [-] [core] SIGINT received [NOTICE] [-] [core] SIGINT received [NOTICE] [-] [core] SIGINT received [NOTICE] [-] [core] SIGINT received [NOTICE] [-] [core] SIGINT received [NOTICE] [-] [core] SIGINT received [NOTICE] [-] [core] SIGINT received [NOTICE] [-] [core] SIGINT received [NOTICE] [-] [core] SIGINT received [NOTICE] [-] [core] SIGINT received [NOTICE] [-] [core] SIGINT received [NOTICE] [-] [core] SIGINT received [NOTICE] [-] [core] SIGINT received [NOTICE] [-] [core] SIGINT received [NOTICE] [-] [core] Killing node: 1 [INFO] [-] [core] [outbound] Shutting down temp fail queue [INFO] [-] [core] [cfreader] Shutting down enoent timer [INFO] [-] [core] [plugins] Shutting down plugins node_redis: Using .end() without the flush parameter is deprecated and throws from v.3.0.0 on. Please check the doku (https://github.com/NodeRedis/node_redis) and explictly use flush. node_redis: Using .end() without the flush parameter is deprecated and throws from v.3.0.0 on. Please check the doku (https://github.com/NodeRedis/node_redis) and explictly use flush. [NOTICE] [-] [core] Disconnect complete

...for each node, but there is no delay in shutting down.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/haraka/Haraka/issues/1498#issuecomment-224166885, or mute the thread https://github.com/notifications/unsubscribe/AAobYydmOI9iWF7gk75ftzvNMZ9aveYtks5qJOvigaJpZM4IubxF .

darkpixel commented 8 years ago

It looks like this.db is undefined in the shutdown function so this.db.end() doesn't get called. I verified the plugin connects to the redis server.

baudehlo commented 8 years ago

Looks like you probably need to call .quit() on server.notes.redis too.

On Tue, Jun 7, 2016 at 11:07 AM, Aaron C. de Bruyn <notifications@github.com

wrote:

It looks like this.db is undefined in the shutdown function so this.db.end() doesn't get called. I verified the plugin connects to the redis server.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/haraka/Haraka/issues/1498#issuecomment-224310639, or mute the thread https://github.com/notifications/unsubscribe/AAobY4VKHt76CKQJkSnVHE7N38RYFpORks5qJYkhgaJpZM4IubxF .