Article delegate-en/2876 of [1-5169] on the server localhost:119
  upper oldest olders older1 this newer1 newers latest
search
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]
[Reference:<_A2873@delegate-en.ML_>]
Newsgroups: mail-lists.delegate-en

[DeleGate-En] Re: problems with delegate version 8.11.1
29 Mar 2005 16:15:34 GMT Daniel Spratlen <pgufqbdyi-q4vsjhrqirvr.ml@ml.delegate.org>


On Tue, 2005-03-29 at 05:37 +0900, Yutaka Sato wrote:
> On 03/29/05(00:47) you Daniel Spratlen <daniel.spratlen@cox..> wrote
> in <_A2871@delegate-en.ML_>
>  |We start delegated with the following options.  This comes from our
>  |delegate init script, 'daemon' is a function available in RH init
>  |scripts.  Basically it detaches a process from the tty it was started
>  |on.  As I mentioned the exact same init script works as intended with
>  |delegate8.9.2.
>  |
>  |
>  |daemon delegated -S -Plocalhost:80 SERVER=http://xxxxx.xxx.xxx:80/
>  |LOGFILE=/var/log/delegate.80 PROTOLOG=/var/log/delegate.80
>  |MAXIMA=delegated:128,conpch:8 RESOLV=file PERMIT=\"*\" RELIABLE=\"*\"
>  |HTTPCONF=\"add-qhead: x-forwarded-for:%a\" URICONV=\"full:+,-HTTP-
>  |EQUIV/META\" ADMIN=\"support@xxx.xxx
>  |
>  |daemon delegated -S -Plocalhost:443 SERVER=tcprelay://xxxxx.xxx.xxx:443/
>  |LOGFILE=/var/log/delegate.443 PROTOLOG=/var/log/delegate.443
>  |MAXIMA=delegated:128,conpch:8 RESOLV=file PERMIT=\"*\" RELIABLE=\"*\"
>  |ADMIN=\"support@xxx.xxx
> 
> Does this script cause core dump when it is invoked in another way,
> for example when it is invoked from command line prompt ?  If so,
> running it in "gdb" and investigating with "where" command will
> show us hints.
> 
> By the way, I can't understand why you need to use " and to escape
> it by \ in your script, and what is passed to DeleGate.
> The complete logfile from the beginning of invocation will help ous
> to understand what is going.
> 
> At least it is strange that the value of your ADMIN parameter has
> unbalanced '"'

Ah, sorry about that.  As I mentioned the commands actually come from
our init scripts, which is why things are quoted in some places.  I
thought I had cleaned all that up, looks like I missed some.  Here is
the start and stop functions of our init script as it appears on the
server.  I did change the domain names and email addresses.  Though the
logs say that there is a core dump the files in the core dump directory
are all empty files.


. /etc/init.d/functions

#set env vars for logging
export LOGDIR="/var/log";
export LOGFILE='${LOGDIR}/delegate.${PORT}'

# source function library
RETVAL=0
prog="delegated"

start() {
        echo -n $"Starting $prog on port 80 (http): "
        daemon $prog -S -P${HOSTNAME}:80,localhost:80 \
        SERVER=http://xxxx.xxx.xxx:80/ \
        LOGFILE='${LOGDIR}/delegate.80' \
        PROTOLOG='${LOGDIR}/delegate.80.${PROTO}' \
        MAXIMA=delegated:128,conpch:8 \
        RESOLV=file \
        PERMIT=\"*\" \
        RELIABLE=\"*\" \
        HTTPCONF=\"add-qhead: x-forwarded-for:%a\" \
        URICONV=\"full:+,-HTTP-EQUIV/META\" \
        ADMIN=\"xxxx@xxx.xxx \"
        echo

        echo -n $"Starting $prog on port 443 (https): "
        daemon $prog -S -P${HOSTNAME}:443,localhost:443 \
        SERVER=tcprelay://xxxx.xxx.xxx:443/ \
        LOGFILE='${LOGDIR}/delegate.443' \
        PROTOLOG='${LOGDIR}/delegate.443.${PROTO}' \
        MAXIMA=delegated:128,conpch:8 \
        RESOLV=file \
        PERMIT=\"*\" \
        RELIABLE=\"*\" \
        ADMIN=\"xxxx@xxx.xxx \"
        echo
        return $RETVAL
}
stop() {
        echo -n $"Stopping $prog on port 80 (http): "
        daemon $prog -P${HOSTNAME}:80,localhost:80 -Fkill
        echo
        echo -n $"Stopping $prog on port 443 (https): "
        daemon $prog -P${HOSTNAME}:443,localhost:443 -Fkill
        echo
        return $RETVAL
}

Here is the log for port 443.  I've changed domains and email addresses
only.

03/29 11:36:02.01 [7399] 0+0: PORT> -Pbuildhost:443,localhost:443
03/29 11:36:02.01 [7399] 0+0: --INITIALIZATION START: 8.11.1 on
Linux/2.4.9-e.34smp--
03/29 11:36:02.01 [7399] 0+0: BINSHELL=/bin/sh
03/29 11:36:02.01 [7400] 0+0: -- Fork(daemon): 1 -> 7400
03/29 11:36:02.02 [7400] 0+0: server_open
(delegate,buildhost:443,listen=20)
03/29 11:36:02.02 [7400] 0+0: server_open: buildhost:443
03/29 11:36:02.02 [7400] 0+0: server_open(delegate,buildhost:443) BOUND
03/29 11:36:02.02 [7400] 0+0: FOUND: delegate [7] 127.0.0.1:443
03/29 11:36:02.02 [7400] 0+0: DGROOT=/var/spool/delegate-nobody^M
03/29 11:36:02.02 [7400] 0+0: <DeleGate/8.11.1> [7400] -Pbuildhost:443
READY^M03/29 11:36:02.02 [7400] 0+0: PORT=
buildhost:443/7,localhost:443/7 (0,21)
03/29 11:36:02.02 [7400] 0+0: OWNER=nobody => OWNER=nobody/nobody
(nobody/nobody)03/29 11:36:02.02 [7400] 0+0: default netmask 127.0.0.1/.
= FFFFFF00
03/29 11:36:02.02 [7400] 0+0: REMITTABLE = ftp-
data,ftp,ftps,telnet,telnets,smtp,smtp-
data,whois,domain,dns,gopher,finger,http,https,ssltunnel,pop,pop3s,imap,imaps,ident,nntp,nntps,news,nbt,prospero,archie,wais,tsp,ldap,ldaps,lpr,X,syslog,talk,socks,cuseeme,icp,http-proxy,pam,httpam,dgauth,delegate,tcprelay,udprelay,udprelay1,teleport,coupler,vsap,sockmux,thruway
03/29 11:36:02.02 [7400] 0+0: PATH: gzip -> /bin/gzip
03/29 11:36:02.02 [7400] 0+0: #### gzip = [/bin/gzip]gzip
03/29 11:36:02.02 [7400] 0+0: #### gunzip = [/bin/gzip]gzip -d
03/29 11:36:02.02 [7400] 0+0: ADMIN=xxxx@xxx..  protocol=tcprelay
(specialist)
03/29 11:36:02.02 [7400] 0+0: #### CACHE DISABLED #### Cache directory
seems not exist: /var/spool/delegate-nobody/cache
03/29 11:36:02.02 [7400] 0+0: WORKDIR=/var/spool/delegate-
nobody/work/21buildhost:443
03/29 11:36:02.02 [7400] 0+0: MOUNT[0]X[2] /-/builtin/icons/* = default
03/29 11:36:02.02 [7400] 0+0: MOUNT[1]X[3] /-/* =
forbidden,from=!.RELIABLE,default
03/29 11:36:02.02 [7400] 0+0: MOUNT[2]X[0] /-* = default
03/29 11:36:02.02 [7400] 0+0: MOUNT[3]X[1] /=* = default
03/29 11:36:02.02 [7400] 0+0: Stay open PIDFILE for accept() lock[fd=8]
03/29 11:36:02.02 [7400] 0+0: #{TR}# START accepting SIGCHLD
03/29 11:36:02.02 [7400] 0+0: env[4] LOGDIR=/var/log
03/29 11:36:02.02 [7400] 0+0: env[7] LOGFILE=${LOGDIR}/delegate.${PORT}
03/29 11:36:02.02 [7400] 0+0: env[31]
LIBPATH=.;/var/log;/var/spool/delegate-nobody/lib;.;/var/spool/delegate-
nobody/etc
03/29 11:36:02.02 [7400] 0+0: arg[3] SERVER=tcprelay://xxxx.xxx.xxx:443/
03/29 11:36:02.02 [7400] 0+0: arg[4] LOGFILE=${LOGDIR}/delegate.443
03/29 11:36:02.02 [7400] 0+0: arg[5] PROTOLOG=
${LOGDIR}/delegate.443.${PROTO}
03/29 11:36:02.02 [7400] 0+0: arg[6] MAXIMA=delegated:128,conpch:8
03/29 11:36:02.02 [7400] 0+0: arg[7] RESOLV=file
03/29 11:36:02.02 [7400] 0+0: arg[8] PERMIT=*
03/29 11:36:02.02 [7400] 0+0: arg[9] RELIABLE=*
03/29 11:36:02.02 [7400] 0+0: arg[10] ADMIN=xxxx@xxx..
03/29 11:36:02.02 [7400] 0+0: DELEGATE_Modified[1]: 424983f2
03/29 11:36:02.02 [7400] 0+0: --INITIALIZATION DONE: 8.11.1 on
Linux/2.4.9-e.34smp--
03/29 11:36:02.02 [7400] 0+0: E-A: ABORT: caught SIGSEGV [11]
03/29 11:36:02.02 [7400] 0+0: E-A: core will be at /var/spool/delegate-
nobody/work/21buildhost:443
03/29 11:36:02.02 [7400] 0+0: ####! EMERGENCY STOP !####
03/29 11:36:02.08 [7400] 0+0: Kill(7401,9)
03/29 11:36:02.08 [7400] 0+0: SMTP_POST at xxx.xxx:25 to:xxxx@xxx..
from:xxxx@xxx.. ^M
03/29 11:36:02.08 [7400] 0+0: gethostbyname(-MX.xxx.xxx) unknown[0.00s]
03/29 11:36:02.08 [7400] 0+0: gethostbyname(xxx.xxx) unknown[0.00s]
03/29 11:36:02.08 [7400] 0+0: ConnectToServer unknown host 'xxx.xxx'
03/29 11:36:02.08 [7400] 0+0: ERROR: cannot connect to smtp://xxx.xxx:25
- -1
03/29 11:36:02.08 [7400] 0+0: E-C: Can't connect: --Cant-GetPeerName:0
=> smtp://xxx.xxx (unknown)
03/29 11:36:02.08 [7400] 0+0: SMTP: cannot connect: xxx.xxx:25.^M
03/29 11:36:02.09 [7404] 0+0: -- Fork(FATAL): 7400 -> 7404
03/29 11:36:02.09 [7404] 0+0: E-A: ABORT: caught SIG??? [3]
03/29 11:36:02.09 [7404] 0+0: E-A: core will be at /var/spool/delegate-
nobody/work/buildhost:443
03/29 11:36:03.10 [7404] 0+0: Kill(7404,3)


And the same for port 80:

03/29 11:36:01.47 [7394] 0+0: PORT> -Pbuildhost:80,localhost:80
03/29 11:36:01.47 [7394] 0+0: --INITIALIZATION START: 8.11.1 on
Linux/2.4.9-e.34smp--
03/29 11:36:01.47 [7394] 0+0: BINSHELL=/bin/sh
03/29 11:36:01.47 [7395] 0+0: -- Fork(daemon): 1 -> 7395
03/29 11:36:01.48 [7395] 0+0: server_open
(delegate,buildhost:80,listen=20)
03/29 11:36:01.48 [7395] 0+0: server_open: buildhost:80
03/29 11:36:01.48 [7395] 0+0: server_open(delegate,buildhost:80) BOUND
03/29 11:36:01.48 [7395] 0+0: FOUND: delegate [7] 127.0.0.1:80
03/29 11:36:01.48 [7395] 0+0: DGROOT=/var/spool/delegate-nobody^M
03/29 11:36:01.48 [7395] 0+0: <DeleGate/8.11.1> [7395] -Pbuildhost:80
READY^M
03/29 11:36:01.48 [7395] 0+0: PORT= buildhost:80/7,localhost:80/7 (0,21)
03/29 11:36:01.48 [7395] 0+0: OWNER=nobody => OWNER=nobody/nobody
(nobody/nobody)03/29 11:36:01.48 [7395] 0+0: default netmask 127.0.0.1/.
= FFFFFF00
03/29 11:36:01.48 [7395] 0+0: REMITTABLE = ftp-
data,ftp,ftps,telnet,telnets,smtp,smtp-
data,whois,domain,dns,gopher,finger,http,https,ssltunnel,pop,pop3s,imap,imaps,ident,nntp,nntps,news,nbt,prospero,archie,wais,tsp,ldap,ldaps,lpr,X,syslog,talk,socks,cuseeme,icp,http-proxy,pam,httpam,dgauth,delegate,tcprelay,udprelay,udprelay1,teleport,coupler,vsap,sockmux,thruway
03/29 11:36:01.48 [7395] 0+0: PATH: gzip -> /bin/gzip
03/29 11:36:01.48 [7395] 0+0: #### gzip = [/bin/gzip]gzip
03/29 11:36:01.48 [7395] 0+0: #### gunzip = [/bin/gzip]gzip -d
03/29 11:36:01.48 [7395] 0+0: ADMIN=xxxx@xxx..  protocol=http
(specialist)
03/29 11:36:01.48 [7395] 0+0: #### CACHE DISABLED #### Cache directory
seems not exist: /var/spool/delegate-nobody/cache
03/29 11:36:01.48 [7395] 0+0: WORKDIR=/var/spool/delegate-
nobody/work/buildhost:80
03/29 11:36:01.48 [7395] 0+0: MOUNT[0]X[2] /-/builtin/icons/* = default
03/29 11:36:01.48 [7395] 0+0: MOUNT[1]X[3] /-/* =
forbidden,from=!.RELIABLE,default
03/29 11:36:01.48 [7395] 0+0: MOUNT[2]X[0] /-* = default
03/29 11:36:01.48 [7395] 0+0: MOUNT[3]X[1] /=* = default
03/29 11:36:01.48 [7395] 0+0: MOUNT[4]=[4] /* http://xxxx.xxx.xxx:80/*
default
03/29 11:36:01.48 [7395] 0+0: gethostbyname(xxxx.xxx.xxx) unknown[0.00s]
03/29 11:36:01.48 [7395] 0+0: ERROR MOUNT.rhost[1] xxxx.xxx.xxx ?
unknown
03/29 11:36:01.48 [7395] 0+0: #### stack size limit = 800000 (000000X)
03/29 11:36:01.48 [7395] 0+0: Stay open PIDFILE for accept() lock[fd=8]
03/29 11:36:01.48 [7395] 0+0: #{TR}# START accepting SIGCHLD
03/29 11:36:01.48 [7395] 0+0: env[4] LOGDIR=/var/log
03/29 11:36:01.48 [7395] 0+0: env[7] LOGFILE=${LOGDIR}/delegate.${PORT}
03/29 11:36:01.48 [7395] 0+0: env[31]
LIBPATH=.;/var/log;/var/spool/delegate-nobody/lib;.;/var/spool/delegate-
nobody/etc
03/29 11:36:01.48 [7395] 0+0: arg[3] SERVER=http://xxxx.xxx.xxx:80/
03/29 11:36:01.48 [7395] 0+0: arg[4] LOGFILE=${LOGDIR}/delegate.80
03/29 11:36:01.48 [7395] 0+0: arg[5] PROTOLOG=
${LOGDIR}/delegate.80.${PROTO}
03/29 11:36:01.48 [7395] 0+0: arg[6] MAXIMA=delegated:128,conpch:8
03/29 11:36:01.48 [7395] 0+0: arg[7] RESOLV=file
03/29 11:36:01.48 [7395] 0+0: arg[8] PERMIT=*
03/29 11:36:01.48 [7395] 0+0: arg[9] RELIABLE=*
03/29 11:36:01.48 [7395] 0+0: arg[10] HTTPCONF=add-qhead: x-forwarded-
for:%a
03/29 11:36:01.48 [7395] 0+0: arg[11] URICONV=full:+,-HTTP-EQUIV/META
03/29 11:36:01.48 [7395] 0+0: arg[12] ADMIN=xxxx@xxx..
03/29 11:36:01.48 [7395] 0+0: DELEGATE_Modified[1]: 424983f1
03/29 11:36:01.48 [7395] 0+0: --INITIALIZATION DONE: 8.11.1 on
Linux/2.4.9-e.34smp--
03/29 11:36:01.48 [7395] 0+0: #### restarting is set on config err.
03/29 11:36:01.48 [7395] 0+0: #### wait the first contact...






# ps -auwx |grep -i delegated
nobody    7395  0.0  0.1  4236 1856 ?        S    11:36   0:00 delegated
-{000+00}[http://xxxx.xxx.xxx/]-Pbuildhost
nobody    7400  0.0  0.1  4312 1964 ?        S    11:36   0:00 delegated
-{000}[INTRUDER !? SIG???]-Pbuildhost:443 -- ------------
nobody    7404  0.0  0.0     0    0 ?        Z    11:36   0:00
[delegated <defunct>]


Here is the output of gdb:


Attaching to process 7400
Reading symbols from /usr/bin/delegated...done.
Using host libthread_db library "/lib/libthread_db.so.1".
Reading symbols from /lib/libnsl.so.1...done.
Loaded symbols for /lib/libnsl.so.1
Reading symbols from /lib/libpam.so.0...done.
Loaded symbols for /lib/libpam.so.0
Reading symbols from /usr/lib/libstdc++-libc6.2-2.so.3...done.
Loaded symbols for /usr/lib/libstdc++-libc6.2-2.so.3
Reading symbols from /lib/i686/libc.so.6...done.
Loaded symbols for /lib/i686/libc.so.6
Reading symbols from /lib/libdl.so.2...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /lib/i686/libm.so.6...done.
Loaded symbols for /lib/i686/libm.so.6
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /lib/libnss_files.so.2...done.
Loaded symbols for /lib/libnss_files.so.2
Reading symbols from /lib/libnss_nisplus.so.2...done.
Loaded symbols for /lib/libnss_nisplus.so.2
Reading symbols from /lib/libnss_dns.so.2...done.
Loaded symbols for /lib/libnss_dns.so.2
Reading symbols from /lib/libresolv.so.2...done.
Loaded symbols for /lib/libresolv.so.2
0x4016fff4 in __libc_read () from /lib/i686/libc.so.6
(gdb) where
#0  0x4016fff4 in __libc_read () from /lib/i686/libc.so.6
#1  0x401c6034 in __DTOR_END__ () from /lib/i686/libc.so.6
#2  0x4010ba56 in _IO_file_read (fp=0x822fa28, buf=0x4001f000,
size=1024) at fileops.c:838
#3  0x4010ac5d in _IO_new_file_underflow (fp=0x822fa28) at fileops.c:542
#4  0x4010d4f9 in _IO_default_uflow (fp=0x822fa28) at genops.c:420
#5  0x4010c52f in __uflow (fp=0x822fa28) at genops.c:377
#6  0x40107973 in _IO_getc (fp=0x822fa28) at getc.c:41
#7  0x081656e2 in Xfgets ()
#8  0x0805d5cd in holder ()
#9  0x0805d9eb in exitFATAL ()
#10 0x0805dda9 in abort ()
#11 0x0804b36b in DELEGATE_sigFATAL ()
#12 <signal handler called>
#13 fileno (fp=0xffffffff) at fileno.c:37
#14 0x0806b587 in open_logtmpfile ()
#15 0x0806b7a8 in open_logfile ()
#16 0x0806bc7a in LOG_open ()
#17 0x0804d513 in setSTDLOG ()
#18 0x08055591 in _main ()
#19 0x08052a25 in _start ()
#20 0x0805407f in delegate_main ()
#21 0x08197c64 in alloca_call ()
#22 0x08180339 in randstack_call ()
#23 0x08059e0d in mainX ()
#24 0x0804ad76 in main ()



Attaching to process 7395
Reading symbols from /usr/bin/delegated...done.
Using host libthread_db library "/lib/libthread_db.so.1".
Reading symbols from /lib/libnsl.so.1...done.
Loaded symbols for /lib/libnsl.so.1
Reading symbols from /lib/libpam.so.0...done.
Loaded symbols for /lib/libpam.so.0
Reading symbols from /usr/lib/libstdc++-libc6.2-2.so.3...done.
Loaded symbols for /usr/lib/libstdc++-libc6.2-2.so.3
Reading symbols from /lib/i686/libc.so.6...done.
Loaded symbols for /lib/i686/libc.so.6
Reading symbols from /lib/libdl.so.2...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /lib/i686/libm.so.6...done.
Loaded symbols for /lib/i686/libm.so.6
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /lib/libnss_files.so.2...done.
Loaded symbols for /lib/libnss_files.so.2
Reading symbols from /lib/libnss_nisplus.so.2...done.
Loaded symbols for /lib/libnss_nisplus.so.2
Reading symbols from /lib/libnss_dns.so.2...done.
Loaded symbols for /lib/libnss_dns.so.2
Reading symbols from /lib/libresolv.so.2...done.
Loaded symbols for /lib/libresolv.so.2
0x40176cde in __select () from /lib/i686/libc.so.6
(gdb) where
#0  0x40176cde in __select () from /lib/i686/libc.so.6
#1  0xbffd6f00 in ?? ()
#2  0xbffd6f80 in ?? ()
#3  0xbffd6f00 in ?? ()
#4  0x0819805b in PollIns ()
#5  0x08060300 in pollServPort ()
#6  0x0805554b in _main ()
#7  0x08052a25 in _start ()
#8  0x0805407f in delegate_main ()
#9  0x08197c64 in alloca_call ()
#10 0x08180339 in randstack_call ()
#11 0x08059e0d in mainX ()
#12 0x0804ad76 in main ()

Obviously I can't use gdb on pid 7404 as it's defunct.  If you need any
other info please let me know.

thanks,
Daniel



  admin search upper oldest olders older1 this newer1 newers latest
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]
@_@V