Discussion:
[SM-imapproxy] Imapproxy times out on Debian testing (Stretch)
Thomas Barth
2016-08-02 06:17:06 UTC
Permalink
Hello,

I ve upgraded my Debian Jessie to testing (Stretch). Now imapproxy
timesout after some time. When the system is waiting for the running
state, imapproxy is working normal. I can connect to my mailsystem with
webmail client. But it ends after the timeout.

Here are the messages of systemd-devel

● imapproxy.service - IMAP proxy
Loaded: loaded (/lib/systemd/system/imapproxy.service; static;
vendor preset: enabled)
Active: failed (Result: timeout) since Tue 2016-08-02 08:08:13 CEST;
14s ago
Docs: man:imapproxyd(8)
Process: 10514 ExecStart=/usr/sbin/imapproxyd -f /etc/imapproxy.conf
(code=killed, signal=TERM)

Aug 02 08:06:42 txbweb.de systemd[1]: Starting IMAP proxy...
Aug 02 08:06:42 txbweb.de imapproxyd[10514]: main(): Using configuration
file '/etc/imapproxy.conf'
Aug 02 08:06:42 txbweb.de imapproxyd[10514]: Using syslog facility
'LOG_MAIL' for logging.
Aug 02 08:06:42 txbweb.de in.imapproxyd[10514]: Masking syslog priority
up to LOG_WARNING.
Aug 02 08:08:13 txbweb.de systemd[1]: imapproxy.service: Start operation
timed out. Terminating.
Aug 02 08:08:13 txbweb.de systemd[1]: Failed to start IMAP proxy.
Aug 02 08:08:13 txbweb.de systemd[1]: imapproxy.service: Unit entered
failed state.
Aug 02 08:08:13 txbweb.de systemd[1]: imapproxy.service: Failed with
result 'timeout'.

Do you know how to fix this? Version of imapproxy is 1.2.7-1.2 What is
imapprox waiting for?
Jens Wahnes
2016-08-02 09:20:29 UTC
Permalink
Post by Thomas Barth
I ve upgraded my Debian Jessie to testing (Stretch). Now imapproxy
timesout after some time. When the system is waiting for the running
state, imapproxy is working normal. I can connect to my mailsystem with
webmail client. But it ends after the timeout.
Ah, so Debian is launching imapproxyd via systemd? What does the unit
file look like? I've been trying to create a unit file for myself and
asked for help here, but unfortunately there was to reply yet.

In my setup, imapproxyd is running for about a month now in a systemd
environment, but this is a very small installation, mainly used for
testing, with few users. Plus, I am not very much satisfied the way this
works, with imapproxy claiming it is running in foreground mode and so
forth.


Jens
Thomas Barth
2016-08-02 10:30:12 UTC
Permalink
Hi!

The unit file is:

/lib/systemd/system/imapproxy.service

[Unit]
Documentation=man:imapproxyd(8)
Description=IMAP proxy
After=network-online.target
Wants=network-online.target

[Service]
Type=forking
ExecStart=/usr/sbin/imapproxyd -f /etc/imapproxy.conf
Post by Jens Wahnes
Post by Thomas Barth
I ve upgraded my Debian Jessie to testing (Stretch). Now imapproxy
timesout after some time. When the system is waiting for the running
state, imapproxy is working normal. I can connect to my mailsystem with
webmail client. But it ends after the timeout.
Ah, so Debian is launching imapproxyd via systemd? What does the unit
file look like? I've been trying to create a unit file for myself and
asked for help here, but unfortunately there was to reply yet.
In my setup, imapproxyd is running for about a month now in a systemd
environment, but this is a very small installation, mainly used for
testing, with few users. Plus, I am not very much satisfied the way this
works, with imapproxy claiming it is running in foreground mode and so
forth.
Jens
Jens Wahnes
2016-08-02 10:45:17 UTC
Permalink
Post by Thomas Barth
/lib/systemd/system/imapproxy.service
[Unit]
Documentation=man:imapproxyd(8)
Description=IMAP proxy
After=network-online.target
Wants=network-online.target
[Service]
Type=forking
ExecStart=/usr/sbin/imapproxyd -f /etc/imapproxy.conf
I see. So the main difference between my unit file and this one seems to
be the "type" of service. Previously, I had tried "Type=forking" as
well, but since that didn't work out very well, I went to try
"Type=simple". For me, this is doing the trick so far, but as I pointed
out before, I'm terribly satisfied with this approch. Well, you still
may want to give that a shot anyway and see if it works for you.


Jens
Thomas Barth
2016-08-02 11:11:45 UTC
Permalink
Thanks for the trick! No timeout with type simple. It s ok for me. Main
thing is that it works.
Post by Jens Wahnes
Post by Thomas Barth
/lib/systemd/system/imapproxy.service
[Unit]
Documentation=man:imapproxyd(8)
Description=IMAP proxy
After=network-online.target
Wants=network-online.target
[Service]
Type=forking
ExecStart=/usr/sbin/imapproxyd -f /etc/imapproxy.conf
I see. So the main difference between my unit file and this one seems
to be the "type" of service. Previously, I had tried "Type=forking" as
well, but since that didn't work out very well, I went to try
"Type=simple". For me, this is doing the trick so far, but as I
pointed out before, I'm terribly satisfied with this approch. Well,
you still may want to give that a shot anyway and see if it works for
you.
Jens
------------------------------------------------------------------------------
-----
squirrelmail-imapproxy mailing list
Posting guidelines: http://squirrelmail.org/postingguidelines
List archives: http://news.gmane.org/gmane.mail.squirrelmail.imapproxy
List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-imapproxy
Paul Lesniewski
2016-09-12 18:48:48 UTC
Permalink
Post by Thomas Barth
Thanks for the trick! No timeout with type simple. It s ok for me. Main
thing is that it works.
Post by Jens Wahnes
Post by Thomas Barth
/lib/systemd/system/imapproxy.service
[Unit]
Documentation=man:imapproxyd(8)
Description=IMAP proxy
After=network-online.target
Wants=network-online.target
[Service]
Type=forking
ExecStart=/usr/sbin/imapproxyd -f /etc/imapproxy.conf
I see. So the main difference between my unit file and this one seems
to be the "type" of service. Previously, I had tried "Type=forking" as
well, but since that didn't work out very well, I went to try
"Type=simple". For me, this is doing the trick so far, but as I
pointed out before, I'm terribly satisfied with this approch. Well,
you still may want to give that a shot anyway and see if it works for
you.
The problem here is that systemd apparently starts services from PID 1,
and there was a check in the code to make sure the parent wasn't PID 1
because in other contexts, that would have meant the parent was already
detached and imapproxy was in fact daemonized already.

I removed that check which fixes this issue, hoping that that it wasn't
really feasible in any other context that the code could have come to
try to re-daemonize anyway.

I'll probably add this unit file as well:


[Unit]
Description=SquirrelMail IMAP proxy server
After=network.target network-online.target local-fs.target syslog.target
remote-fs.target nss-lookup.target

[Service]
Type=forking
ExecStart=/usr/local/sbin/in.imapproxyd
Restart=always
RestartSec=5

[Install]
WantedBy=multi-user.target
--
Paul Lesniewski
SquirrelMail Team
Please support Open Source Software by donating to SquirrelMail!
http://squirrelmail.org/donate_paul_lesniewski.php

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. http://sdm.link/zohodev2dev
-----
squirrelmail-imapproxy mailing list
Posting guidelines: http://squirrelmail.org/postingguidelines
List address: squirrelmail-***@lists.sourceforge.net
List archives: http://news.gmane.org/gmane.mail.squirrelmail.imapproxy
List info (subscribe/unsubscribe/change options): https://lis
Loading...