On Sun, Sep 21, 2003 at 07:44:05PM +0200, Andreas Aardal Hanssen ([EMAIL PROTECTED]) 
wrote:
> On Sun, 21 Sep 2003, Scott Schappell wrote:

> write doesn't finish - it hangs when writing to fd 2. This should have 
> worked fine. You could check your multilog processes and see if they're 
> hanging. Alternatively stop the log processes, perhaps kill off any 
> hanging multilogs, go into the log areas and delete the control files 
> (state and lock).
> 
> Then restart (svc -u?) the multilog processes and try connecting to the
> Binc SSL service.
WOAH, this does NOT look right:

arthur# ps -auwx | grep multilog
qmaill    67879  0.0  0.1   896  420  ??  I    Wed04PM   0:18.10
/usr/local/bin/multilog t /var/log/qmail/qmail-send
qmaill    67883  0.0  0.1   896  420  ??  I    Wed04PM   0:48.51
/usr/local/bin/multilog n24 s250000 t /var/log/qmail/qmail-smtpd/
root      68319  0.0  0.1   896  420  ??  I    Wed04PM   0:02.59 multilog t
n5 s1048576 /var/opt/log/bincimap
nobody    63892  0.0  0.3  2936 2028  ??  I     4:27PM   0:00.10
/usr/local/bin/bincimap-up --logtype=multilog --conf=/usr/local/et
root      65916  0.0  0.2  2824 1820  ??  I     4:46PM   0:00.04
/usr/local/bin/bincimap-up --logtype=multilog --conf=/usr/local/et
root      65977  0.0  0.2  2824 1820  ??  I     4:47PM   0:00.04
/usr/local/bin/bincimap-up --logtype=multilog --conf=/usr/local/et
root      66037  0.0  0.2  2824 1820  ??  I     4:48PM   0:00.04
/usr/local/bin/bincimap-up --logtype=multilog --conf=/usr/local/et
root      66968  0.0  0.2  2840 1820  ??  I     4:57PM   0:00.04
/usr/local/bin/bincimap-up --logtype=multilog --conf=/usr/local/et
root      66984  0.0  0.2  2840 1820  ??  I     4:57PM   0:00.04
/usr/local/bin/bincimap-up --logtype=multilog --conf=/usr/local/et
root      67052  0.0  0.2  2840 1820  ??  I     4:58PM   0:00.04
/usr/local/bin/bincimap-up --logtype=multilog --conf=/usr/local/et
root      67067  0.0  0.2  2840 1880  ??  I     4:58PM   0:00.04
/usr/local/bin/bincimap-up --logtype=multilog --conf=/usr/local/et
root      67233  0.0  0.2  2840 1884  ??  I     5:00PM   0:00.05
/usr/local/bin/bincimap-up --logtype=multilog --conf=/usr/local/et
root      67389  0.0  0.2  2840 1884  ??  I     5:00PM   0:00.04
/usr/local/bin/bincimap-up --logtype=multilog --conf=/usr/local/et
root      67567  0.0  0.2  2840 1884  ??  I     5:02PM   0:00.05
/usr/local/bin/bincimap-up --logtype=multilog --conf=/usr/local/et
root      67644  0.0  0.2  2840 1884  ??  I     5:02PM   0:00.05
/usr/local/bin/bincimap-up --logtype=multilog --conf=/usr/local/et
root      67661  0.0  0.2  2840 1884  ??  I     5:03PM   0:00.04
/usr/local/bin/bincimap-up --logtype=multilog --conf=/usr/local/et
root      67678  0.0  0.2  2840 1884  ??  I     5:03PM   0:00.05
/usr/local/bin/bincimap-up --logtype=multilog --conf=/usr/local/et
root      68000  0.0  0.2  2840 1884  ??  I     5:05PM   0:00.04
/usr/local/bin/bincimap-up --logtype=multilog --conf=/usr/local/et
root      68113  0.0  0.2  2840 1884  ??  I     5:07PM   0:00.05
/usr/local/bin/bincimap-up --logtype=multilog --conf=/usr/local/et
root      68254  0.0  0.2  2840 1884  ??  I     5:08PM   0:00.04
/usr/local/bin/bincimap-up --logtype=multilog --conf=/usr/local/et
root      68602  0.0  0.2  2840 1884  ??  I     5:11PM   0:00.04
/usr/local/bin/bincimap-up --logtype=multilog --conf=/usr/local/et
root      68734  0.0  0.2  2840 1884  ??  I     5:13PM   0:00.04
/usr/local/bin/bincimap-up --logtype=multilog --conf=/usr/local/et
root      69267  0.0  0.2  2840 1884  ??  I     5:18PM   0:00.05
/usr/local/bin/bincimap-up --logtype=multilog --conf=/usr/local/et
root      69525  0.0  0.2  2840 1884  ??  I     5:24PM   0:00.04
/usr/local/bin/bincimap-up --logtype=multilog --conf=/usr/local/et
root      69527  0.0  0.2  2840 1884  ??  I     5:24PM   0:00.05
/usr/local/bin/bincimap-up --logtype=multilog --conf=/usr/local/et
root      70008  0.0  0.2  2840 1884  ??  I     5:35PM   0:00.04
/usr/local/bin/bincimap-up --logtype=multilog --conf=/usr/local/et
root      70675  0.0  0.2  2848 1892  ??  I     5:46PM   0:00.05
/usr/local/bin/bincimap-up --logtype=multilog --conf=/usr/local/et
root      72071  0.0  0.2  2848 1892  ??  I     6:17PM   0:00.05
/usr/local/bin/bincimap-up --logtype=multilog --conf=/usr/local/et
root      72098  0.0  0.2  2848 1892  ??  I     6:19PM   0:00.05
/usr/local/bin/bincimap-up --logtype=multilog --conf=/usr/local/et
root      72108  0.0  0.2  2848 1892  ??  I     6:19PM   0:00.04
/usr/local/bin/bincimap-up --logtype=multilog --conf=/usr/local/et
root      72121  0.0  0.2  2848 1892  ??  I     6:20PM   0:00.05
/usr/local/bin/bincimap-up --logtype=multilog --conf=/usr/local/et
root      72315  0.0  0.2  2848 1892  ??  I     6:20PM   0:00.04
/usr/local/bin/bincimap-up --logtype=multilog --conf=/usr/local/et
root      72327  0.0  0.2  2848 1888  ??  I     6:21PM   0:00.05
/usr/local/bin/bincimap-up --logtype=multilog --conf=/usr/local/et
root      72340  0.0  0.2  2848 1888  ??  I     6:22PM   0:00.04
/usr/local/bin/bincimap-up --logtype=multilog --conf=/usr/local/et
root      76533  0.0  0.2  2848 1892  ??  I     7:59PM   0:00.04
/usr/local/bin/bincimap-up --logtype=multilog --conf=/usr/local/et
root      77569  0.0  0.2  2840 1884  ??  I     8:23PM   0:00.04
/usr/local/bin/bincimap-up --logtype=multilog --conf=/usr/local/et
root       8574  0.0  0.2  2840 1936  ??  I     8:03AM   0:00.05
/usr/local/bin/bincimap-up --logtype=multilog --conf=/usr/local/et
root       8576  0.0  0.2  2840 1936  ??  I     8:03AM   0:00.04
/usr/local/bin/bincimap-up --logtype=multilog --conf=/usr/local/et
root       8578  0.0  0.2  2840 1936  ??  I     8:03AM   0:00.05
/usr/local/bin/bincimap-up --logtype=multilog --conf=/usr/local/et
root       8585  0.0  0.2  2840 1936  ??  I     8:04AM   0:00.04
/usr/local/bin/bincimap-up --logtype=multilog --conf=/usr/local/et
root       8587  0.0  0.2  2840 1936  ??  I     8:04AM   0:00.05
/usr/local/bin/bincimap-up --logtype=multilog --conf=/usr/local/et
root      13137  0.0  0.2  2840 1936  ??  I     8:11AM   0:00.05
/usr/local/bin/bincimap-up --logtype=multilog --conf=/usr/local/et
root      13339  0.0  0.2  2840 1936  ??  I     8:16AM   0:00.05
/usr/local/bin/bincimap-up --logtype=multilog --conf=/usr/local/et
root      13343  0.0  0.2  2840 1936  ??  I     8:16AM   0:00.04
/usr/local/bin/bincimap-up --logtype=multilog --conf=/usr/local/et
root      13946  0.0  0.2  2840 1936  ??  I     8:31AM   0:00.04
/usr/local/bin/bincimap-up --logtype=multilog --conf=/usr/local/et
root      13969  0.0  0.2  2840 1936  ??  I     8:32AM   0:00.05
/usr/local/bin/bincimap-up --logtype=multilog --conf=/usr/local/et
root      14394  0.0  0.2  2840 1936  ??  I     8:43AM   0:00.05
/usr/local/bin/bincimap-up --logtype=multilog --conf=/usr/local/et
root      14414  0.0  0.2  2840 1936  ??  I     8:45AM   0:00.04
/usr/local/bin/bincimap-up --logtype=multilog --conf=/usr/local/et
root      14607  0.0  0.2  2840 1940  ??  I     8:48AM   0:00.05
/usr/local/bin/bincimap-up --logtype=multilog --conf=/usr/local/et
root      14619  0.0  0.2  2840 1940  ??  I     8:49AM   0:00.05
/usr/local/bin/bincimap-up --logtype=multilog --conf=/usr/local/et
root      14807  0.0  0.2  2840 1940  ??  I     8:51AM   0:00.05
/usr/local/bin/bincimap-up --logtype=multilog --conf=/usr/local/et
root      14812  0.0  0.2  2840 1940  ??  I     8:51AM   0:00.05
/l/bin/bincimap-up --logtype=multilog --conf=/usr/local/et
root      14815  0.0  0.2  2840 1944  ??  I     8:51AM   0:00.05
/usr/local/bin/bincimap-up --logtype=multilog --conf=/usr/local/et
root      15643  0.0  0.2  2840 1944  ??  I     9:13AM   0:00.04 bincimap-up
--logtype=multilog --conf=/usr/local/et
root      15646  0.0  0.2  2840 1936  ??  I     9:13AM   0:00.04
/usr/local/bin/bincimap-up --logtype=multilog --conf=/usr/local/et
root      15834  0.0  0.2  2840 1936  ??  I     9:15AM   0:00.05 /usr/l00.08
/usr/local/bin/bincimap-up --logtype=multilog --conf=/usr/local/et
nobody    19135  0.0  0.2  2848 1652  ??  I    10:40AM   0:00.09
/usr/local/bin/bincimap-up --logtype=multilog --conf=/usr/local/et

Should there be that many multilog processes!?

Answer: NO

> >Also I noticed the PID on tcpserver for the SSL imap daemon is changing,
> >since it's running under supervise, I can only surmise it's crashing at
> >some point.
> 
> Funny. If you do a "ps fax", what is the status of your tcpserver 
> processes? Are they crashing all the time?
> 
Looks okay, also found this:

root        445  0.0  0.0   864  272 con- I    27Aug03   0:03.53
readproctitle service errors: ...nable to lock directory
/var/opt/log/bincimap: temporary failure\nmultilog: fatal: unable to lock
directory /var/opt/log/bincimap: temporary failure\nmultilog: fatal: unable
to lock directory /var/opt/log/bincimap: temporary failure\nmultilog: fatal:
unable to lock directory /var/opt/log/bincimap: temporary failure\nmultilog:
fatal: unable to lock directory /var/opt/log/bincimap: temporary failure\n

/var/opt/log/bincimap is owned by nobody and writeable by nobody.

So I looked in /usr/local/etc/bincimap/supervise/imaps/log/supervise and
found multilog trying to write to the same file. Fixed that.

I did svc -d on all imap and imaps services and logs and a killall
bincimap-up.

ps -awux | grep multilog is much more reasonable now:

arthur# ps -auwx | grep multilog
qmaill    67879  0.0  0.1   896  420  ??  I    Wed04PM   0:18.10
/usr/local/bin/multilog t /var/log/qmail/qmail-send
qmaill    67883  0.0  0.1   896  420  ??  I    Wed04PM   0:48.52
/usr/local/bin/multilog n24 s250000 t /var/log/qmail/qmail-smtpd/

So I restarted the bincimap services:

svc -u /service/imap/log
svc -u /service/imap
svc -u /service/imaps/log
svc -u /service/imaps

And...

qmaill    67879  0.0  0.1   896  420  ??  I    Wed04PM   0:18.10
/usr/local/bin/multilog t /var/log/qmail/qmail-send
qmaill    67883  0.0  0.1   896  420  ??  I    Wed04PM   0:48.52
/usr/local/bin/multilog n24 s250000 t /var/log/qmail/qmail-smtpd/
root      19752  0.0  0.0   884  352  ??  S    10:57AM   0:00.01 multilog t
n5 s1048576 /var/opt/log/bincimap
root      19756  0.0  0.0   884  352  ??  S    10:57AM   0:00.02 multilog t
n5 s1048576 /var/opt/log/bincimap-ssl

ls -la /var/opt/log/bincimap-ssl:

arthur# ls -la /var/opt/log/bincimap-ssl
total 26
drwxr-xr-x  2 nobody  nobody    512 Sep 21 10:57 .
drwxr-xr-x  4 root    wheel     512 Aug  3 11:23 ..
-rw-r--r--  1 root    nobody  22111 Sep 21 10:57 current
-rw-------  1 root    nobody      0 Sep 21 10:57 lock
-rw-r--r--  1 root    nobody      0 Sep 21 10:57 state

Now we're getting somewhere!

Now for the test:

arthur# openssl s_client -connect arthur.silvertree.org:993 -crlf
CONNECTED(00000003)
depth=0 /C=US/ST=California/L=Dublin/O=Silvertree Communications
verify error:num=18:self signed certificate
verify return:1
depth=0 /C=US/ST=California/L=Dublin/O=Silvertree Communications
verify return:1
---
Certificate chain
 0 s:/C=US/ST=California/L=Dublin/O=Silvertree Communications
   i:/C=US/ST=California/L=Dublin/O=Silvertree Communications
---
Server certificate
-----BEGIN CERTIFICATE-----
MIIC1jCCAj+gAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJVUzET
MBEGA1UECBMKQ2FsaWZvcm5pYTEPMA0GA1UEBxMGRHVibGluMSIwIAYDVQQKExlT
aWx2ZXJ0cmVlIENvbW11bmljYXRpb25zMB4XDTAzMDkyMTE3MTY0MVoXDTA0MDky
MDE3MTY0MVowVzELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExDzAN
BgNVBAcTBkR1YmxpbjEiMCAGA1UEChMZU2lsdmVydHJlZSBDb21tdW5pY2F0aW9u
czCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAqgOLXfO/Xu4D/ECFGloRI+Ru
4Rso4774zDkzpglCbGu2ub0ACDNKEy/ZCdjq1YMYTWKOnK7oXlwpPqXSn29QmG8z
t/t+NqRePRCW4ACyGBB3L/4l9peyEwpv4+2PbmvCXOKYxDUDOKcmy6d/yE3zzCn2
I7ryPGRvAGoRgcMOsmUCAwEAAaOBsTCBrjAdBgNVHQ4EFgQUiYDvIwYjvuoQ/m+4
2r55rWQx8cgwfwYDVR0jBHgwdoAUiYDvIwYjvuoQ/m+42r55rWQx8cihW6RZMFcx
CzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMQ8wDQYDVQQHEwZEdWJs
aW4xIjAgBgNVBAoTGVNpbHZlcnRyZWUgQ29tbXVuaWNhdGlvbnOCAQAwDAYDVR0T
BAUwAwEB/zANBgkqhkiG9w0BAQQFAAOBgQBHs5BBV79wHZNTKG5SsrzubQDZTgus
/FkEoHZoohInuPUZ+HGAIJPpkrtpI2CSGtDRrxVCMu5PMZRqIm0Lszm3uUhG9a1m
teuJQkVB8XImqyBK1CUc4VvZ0TyZGKBsWOe/LZgE+g1e81b5ef9IZGiUhAgKx7tl
HGt3YvGnfU0McA==
-----END CERTIFICATE-----
subject=/C=US/ST=California/L=Dublin/O=Silvertree Communications
issuer=/C=US/ST=California/L=Dublin/O=Silvertree Communications
---
No client certificate CA names sent
---
SSL handshake has read 892 bytes and written 340 bytes
---
New, TLSv1/SSLv3, Cipher is AES256-SHA
Server public key is 1024 bit
SSL-Session:
    Protocol  : TLSv1
    Cipher    : AES256-SHA
    Session-ID:
7E0DA38AFED03C8B81F9B76EB00EB4C770759F547C0A2FB11997FF156AEF80FC
    Session-ID-ctx: 
    Master-Key:
CE92370444AAFC67F1ABF646B7DF23E6EEFC2EF8044F69818C99CCBE2622C4D6DC5955D4E65123B640073C32385DD767
    Key-Arg   : None
    Start Time: 1064167238
    Timeout   : 300 (sec)
    Verify return code: 18 (self signed certificate)
---
* OK Welcome to Binc IMAP v1.2.1 (c) Copyright 2002, 2003 Andreas Aardal
Hanssen at 2003-09-21 11:00:38 PDT

FIXED!!!!
-- 
PGP Key: http://archon.silvertree.org/pgp.txt
"Compassion and retribution are two sides of the same coin. Necessity
dictates on what side the coin will fall."
"Firearms stand next in importance to the Constitution itself. They are the
American people's liberty teeth and keystone under independence." 
-George Washington

Reply via email to