Bug#961412: fetchmail: restart silently fails, then start doesn't help

2020-11-02 Thread Leszek Dubiel



W dniu 01.11.2020 o 21:30, Matthias Andree pisze:

Hi Leszek,

Unfortunately, this has two issues:

1. part of it is in Polish, a language I cannot understand,

2. apparently the debug-run masks the bug. Please

2a. try creating a logfile,

2b. then configure fetchmail to log to the logfile (and not to syslog)

2c. run fetchmail, restart, whatever you need to do to reproduce the
problem;

2d. post the log, and for the past few lines, translate them to English
please. Doesn't have to be exact.

That may help find the issue.

If in the future, fetchmail 6.4.13 appears in backports (gcs@ suggested
he might want to do that, but it's not yet ready), it is worth trying to
see if the issue goes away, there were both lock file (pid file) fixes
as well as logging fixes when logging to syslog in daemon mode.

Regards,
Matthias



I have made logfile:

root@orion:# touch /var/log/fetchmail.log
root@orion:# chmod a+rwx /var/log/fetchmail.log


Configured fetchmail:

root@orion:/etc# egrep logfi ./fetchmailrc
set logfile /var/log/fetchmail.log


Then started, restarted, many times.
Normally it worked, but finally no fetchmail was running.

Here is session of starting/restarting:


root@orion:/etc# service fetchmail restart
root@orion:/etc# pgrep fetchmail
21121
root@orion:/etc# service fetchmail stop
root@orion:/etc# pgrep fetchmail
root@orion:/etc# service fetchmail restart
root@orion:/etc# pgrep fetchmail
22644
root@orion:/etc# service fetchmail stop
root@orion:/etc# pgrep fetchmail
root@orion:/etc# service fetchmail start
root@orion:/etc# pgrep fetchmail
23454
root@orion:/etc# service fetchmail restart
root@orion:/etc# pgrep fetchmail    # !!!
root@orion:/etc# pgrep fetchmail
root@orion:/etc# echo "dead" >> /var/log/fetchmail.log
root@orion:/etc# service fetchmail start
root@orion:/etc# pgrep fetchmail    # !!!
root@orion:/etc# service fetchmail stop
root@orion:/etc# pgrep fetchmail  # !!!
root@orion:/etc# service fetchmail start
root@orion:/etc# pgrep fetchmail
5673
root@orion:/etc# service fetchmail restart
root@orion:/etc# pgrep fetchmail
5999
root@orion:/etc# service fetchmail restart
root@orion:/etc# pgrep fetchmail
6036
root@orion:/etc#



Here is logfile:

fetchmail: uruchamianie fetchmaila 6.4.0.beta4 w trybie demona
fetchmail: 1 list dla andxelvitrum.pl na 
naboo.endor.pl(7515398 bajtów).
fetchmail: pobieram list andrzej.dub...@dubielvitrum.pl@naboo.endor.pl:1 
z 1 (7515398 bajtów) skasowany

fetchmail: przerwany sygnałem 15
fetchmail: uruchamianie fetchmaila 6.4.0.beta4 w trybie demona
fetchmail: przerwany sygnałem 15
fetchmail: uruchamianie fetchmaila 6.4.0.beta4 w trybie demona
fetchmail: przerwany sygnałem 15
fetchmail: uruchamianie fetchmaila 6.4.0.beta4 w trybie demona
fetchmail: przerwany sygnałem 15
fetchmail: uruchamianie fetchmaila 6.4.0.beta4 w trybie demona
fetchmail: przerwany sygnałem 15
fetchmail: uruchamianie fetchmaila 6.4.0.beta4 w trybie demona
fetchmail: przerwany sygnałem 15
fetchmail: uruchamianie fetchmaila 6.4.0.beta4 w trybie demona
fetchmail: przerwany sygnałem 15
dead
fetchmail: uruchamianie fetchmaila 6.4.0.beta4 w trybie demona
fetchmail: 1 list dla zax...@bielvitrum.pl na naboo.endor.pl(100074 bajtów).



So it sometimes starts and sometimes not.



Anyway... My debian is stable and maybe new version doesn't have such 
problems.

Maybe I'm the only one with such problem.

So please close the bug. After upgrading Debian i will check for error 
again.






Bug#961412: fetchmail: restart silently fails, then start doesn't help

2020-11-01 Thread Matthias Andree
Hi Leszek,

Unfortunately, this has two issues:

1. part of it is in Polish, a language I cannot understand,

2. apparently the debug-run masks the bug. Please

2a. try creating a logfile,

2b. then configure fetchmail to log to the logfile (and not to syslog)

2c. run fetchmail, restart, whatever you need to do to reproduce the
problem;

2d. post the log, and for the past few lines, translate them to English
please. Doesn't have to be exact.

That may help find the issue.

If in the future, fetchmail 6.4.13 appears in backports (gcs@ suggested
he might want to do that, but it's not yet ready), it is worth trying to
see if the issue goes away, there were both lock file (pid file) fixes
as well as logging fixes when logging to syslog in daemon mode.

Regards,
Matthias



Bug#961412: fetchmail: restart silently fails, then start doesn't help

2020-10-31 Thread Leszek Dubiel




W dniu 31.10.2020 o 09:29, Matthias Andree pisze:

Control: tags -1 + moreinfo

fetchmail 6.4.13 contains some additional PID handling fixes, but it's
unclear whether those fixes address the issue described here. The logs
provided are insufficient. Please provide logs with full debug trace.



Sorry for missing email in May.
Version on Debian is 6.4.0.beta4+GSS+NTLM+SDPS+SSL-SSLv2-SSLv3+NLS+KRB5.



Here is the output of

/etc/init.d/fetchmail debug-run


:



Script started on 2020-10-31 11:31:00+01:00 [TERM="xterm-256color" TTY="/dev/pts/0" 
COLUMNS="104" LINES="53"]
root@orion:/tmp# pgrep fetchmail
8707
root@orion:/tmp# service fetchmail restart


 no PID after restart



root@orion:/tmp# pgrep fetchmail
root@orion:/tmp# /etc/init.d/fetchmail debug-run
/etc/init.d/fetchmail: Initiating debug run of system-wide fetchmail service...
/etc/init.d/fetchmail: script will be run in debug mode, all output to forced to
/etc/init.d/fetchmail: stdout. This is not enough to debug failures that only
/etc/init.d/fetchmail: happen in daemon mode.
/etc/init.d/fetchmail: You might want to direct output to a file, and tail -f 
it.
/etc/init.d/fetchmail: Stopping the service...
[] Stopping fetchmail (via systemctl): fetchmail.service[ ok .
/etc/init.d/fetchmail: exit status of service stop was: 0
/etc/init.d/fetchmail: RUNUSER is fetchmail
/etc/init.d/fetchmail: OPTIONS would be  -f /etc/fetchmailrc --pidfile 
/var/run/fetchmail/fetchmail.pid --syslog
/etc/init.d/fetchmail: Starting service in nodetach mode, hit ^C (SIGINT/intr) 
to finish run...
Old UID list from besthosting.atthost24.asdafsadfasdp:
 

Old UID list from besthosting.atthost24.asdafsadfasdp:
 


... LESZEK DUIBEL HAS CUT HERE MANY SIMILAR LINES


Old UID list from naboo.endor.asdafsadfasdp:
 

Old UID list from naboo.endor.asdafsadfasdp:
 

Old UID list from naboo.endor.asdafsadfasdp:
 

Old UID list from naboo.endor.asdafsadfasdp:
 

Old UID list from naboo.endor.asdafsadfasdp:
 

Old UID list from naboo.endor.asdafsadfasdp:
 

Old UID list from naboo.endor.asdafsadfasdp:
 

Old UID list from naboo.endor.asdafsadfasdp:
 

Scratch list of UIDs:
 

fetchmail: uruchamianie fetchmaila 6.4.0.beta4 w trybie demona
fetchmail: 6.4.0.beta4 łączy się z besthosting.atthost24.asdafsadfasdp 
(protokół POP3) o godzinie sob, 31 paź 2020, 11:31:30: odpytywanie rozpoczęte
Próba połączenia z 185.255.40.42/995...połączono.
fetchmail: Loaded OpenSSL library 0x1010104f newer than headers 0x1010101f, 
trying to continue.
fetchmail: SSL verify callback depth 2: preverify_ok == 1, err = 0, ok
fetchmail: Łańcuch certyfikatów od korzenia do serwera, począwszy od głębokości 
2:
fetchmail: Organizacja wystawcy: The USERTRUST Network
fetchmail: CommonName wystawcy: USERTrust RSA Certification Authority
fetchmail: CommonName podmiotu: USERTrust RSA Certification Authority
fetchmail: SSL verify callback depth 1: preverify_ok == 1, err = 0, ok
fetchmail: Certyfikat na głębokości 1:
fetchmail: Organizacja wystawcy: The USERTRUST Network
fetchmail: CommonName wystawcy: USERTrust RSA Certification Authority
fetchmail: CommonName podmiotu: Sectigo RSA Domain Validation Secure Server CA
fetchmail: SSL verify callback depth 0: preverify_ok == 1, err = 0, ok
fetchmail: Certyfikat serwera:
fetchmail: Organizacja wystawcy: Sectigo Limited
fetchmail: CommonName wystawcy: Sectigo RSA Domain Validation Secure Server CA
fetchmail: CommonName podmiotu: atthost.asdafsadfasdp
fetchmail: Alternatywna nazwa podmiotu: atthost.asdafsadfasdp
fetchmail: Alternatywna nazwa podmiotu: *.atthost.asdafsadfasdp
fetchmail: Alternatywna nazwa podmiotu: *.atthost24.asdafsadfasdp
fetchmail: Alternatywna nazwa podmiotu: *.atthouse.asdafsadfasdp
fetchmail: Odcisk klucza besthosting.atthost24.asdafsadfasdp: 
CD:1A:2A:17:A0:1F:71:59:52:25:A8:6F:92:08:2B:BC
fetchmail: SSL/TLS: using protocol TLSv1.2, cipher ECDHE-RSA-AES256-GCM-SHA384, 
256/256 secret/processed bits
fetchmail: POP3< +OK AttHost mail system.
fetchmail: POP3> CAPA
fetchmail: POP3< +OK
fetchmail: POP3< CAPA
fetchmail: POP3< TOP
fetchmail: POP3< UIDL
fetchmail: POP3< RESP-CODES
fetchmail: POP3< PIPELINING
fetchmail: POP3< AUTH-RESP-CODE
fetchmail: POP3< USER
fetchmail: POP3< SASL PLAIN LOGIN
fetchmail: POP3< .
fetchmail: POP3> 
USERinfo@asdfasfqrewqrqwreqwrqwxxxlxustra.asdafsadfasdp
fetchmail: POP3< +OK
fetchmail: POP3> PASS *
fetchmail: POP3< +OK Logged in.
fetchmail: ponowna próba połączenia z domyślnym folderem
fetchmail: POP3> STAT
fetchmail: POP3< +OK 0 0
fetchmail: Nie ma poczty 
dlainfo@asdfasfqrewqrqwreqwrqwxxxlustra.asdafsadfasdp
  na besthosting.atthost24.asdafsadfasdp
fetchmail: POP3> QUIT
fetchmail: POP3< +OK Logging out.
fetchmail: 6.4.0.beta4 łączy się z besthosting.atthost24.asdafsadfasdp 
(protokół POP3) o godzinie sob, 31 p

Bug#961412: fetchmail: restart silently fails, then start doesn't help

2020-10-31 Thread Matthias Andree
Control: tags -1 + moreinfo

fetchmail 6.4.13 contains some additional PID handling fixes, but it's
unclear whether those fixes address the issue described here. The logs
provided are insufficient. Please provide logs with full debug trace.



Bug#961412: fetchmail: restart silently fails, then start doesn't help

2020-05-24 Thread Matthias Andree
README.Debian mentions:

  /etc/init.d/fetchmail debug-run 

what does this get you?



Bug#961412: fetchmail: restart silently fails, then start doesn't help

2020-05-24 Thread Leszek Dubiel

Package: fetchmail
Version: 6.4.0~beta4-3
Severity: normal

I restarted fetchmail with command:

    # service fetchmail restart

but it didn't start. Then I tried:

   # service fetchmail stop
   # service fetchmail start
   # invoke-rc.d fetchmail stop
   # invoke-rc.d fetchmail start
   # invoke-rc.d fetchmail restart


and none of these commands succeeded

   # pgrep fetchmail


showed nothing.

Then mail.log:

   # egrep fetchmail /var/log/mail.log


there was nohting completely. In syslog it looked like this:

   # egrep fetchmail /var/log/syslog ...

   May 14 14:58:29 orion fetchmail[762]: 1 list dla i...@...elvitrum.pl
   na naboo.xydor.pl(143510 bajtów).
   May 14 14:58:30 orion fetchmail[762]: pobieram list
   i...@...elvitrum.pl@...o.xydor.pl:1 z 1 (143510 bajtów) skasowany
   May 14 14:58:31 orion fetchmail[762]: 1 list dla
   zamowie...@...elvitrum.pl na naboo.xydor.pl(122960 bajtów).
   May 14 14:58:32 orion fetchmail[762]: pobieram list
   zamowie...@...elvitrum.pl@...o.xydor.pl:1 z 1 (122960 bajtów) skasowany
   May 14 14:58:39 orion fetchmail[762]: 1 list dla
   leszek.dub...@...elvitrum.pl na naboo.xydor.pl(144073 bajtów).
   May 14 14:58:40 orion fetchmail[762]: pobieram list
   leszek.dub...@...elvitrum.pl@...o.xydor.pl:1 z 1 (144073 bajtów)
   skasowany
   May 14 14:58:43 orion systemd[1]: Stopping LSB: init-Script for
   system wide fetchmail daemon...
   May 14 14:58:43 orion fetchmail[762]: przerwany sygnałem 15
   May 14 14:58:43 orion fetchmail[18151]: Stopping mail retriever
   agent: fetchmail.
   May 14 14:58:43 orion systemd[1]: fetchmail.service: Succeeded.
   May 14 14:58:43 orion systemd[1]: Stopped LSB: init-Script for
   system wide fetchmail daemon.
   May 14 14:58:43 orion systemd[1]: fetchmail.service: Found left-over
   process 762 (fetchmail) in control group while starting unit. Ignoring.
   May 14 14:58:43 orion systemd[1]: Starting LSB: init-Script for
   system wide fetchmail daemon...
   May 14 14:58:43 orion fetchmail[18159]: fetchmail already started;
   not starting. ... failed!
   May 14 14:58:43 orion systemd[1]: Started LSB: init-Script for
   system wide fetchmail daemon.


I have called for help of IT company. They looked around and told me 
that they

just restarted and fetchmail started to work immediately.

The same problem I have had quite a few times. I tried to check what is the
problem. Stopped, started, restarted fetchmail, found no solution -- no 
logged

erros. It looks as if fetchmail sometimes starts and sometimes not.

   # cat /var/run/fetchmail/fetchmail.pid 1116
   60

   # service fetchmail restart

   # cat /var/run/fetchmail/fetchmail.pid 8262
   60

   # pgrep fetchmail 8262

Some other people have had the similar issue:

   https://bugs.launchpad.net/ubuntu/+source/fetchmail/+bug/1683142

   https://bbs.archlinux.org/viewtopic.php?id=235478



I couldn't reproduce the problem on my system.
Maybe it has someting common with bug

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=694048


-- System Information:
Debian Release: 10.4
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.19.0-9-amd64 (SMP w/4 CPU cores)
Locale: LANG=pl_PL.UTF-8, LC_CTYPE=pl_PL.UTF-8 (charmap=UTF-8), 
LANGUAGE=pl_PL.UTF-8 (charmap=UTF-8)

Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages fetchmail depends on:
ii adduser 3.118
ii debianutils 4.8.6.1
ii libc6 2.28-10
ii libcom-err2 1.44.5-1+deb10u3
ii libgssapi-krb5-2 1.17-3
ii libk5crypto3 1.17-3
ii libkrb5-3 1.17-3
ii libssl1.1 1.1.1d-0+deb10u3
ii lsb-base 10.2019051400

Versions of packages fetchmail recommends:
ii ca-certificates 20190110

Versions of packages fetchmail suggests:
ii exim4-daemon-light [mail-transport-agent] 4.92-8+deb10u3
pn fetchmailconf 
pn resolvconf 

-- Configuration Files:
/etc/default/fetchmail changed:
START_DAEMON=yes


-- no debconf information