Re: [Clamav-users] 0.96.1: Error: daemonize() fail

2010-05-28 Thread Michael Feldmann

Sorry for my last scrambled postings.

In the meantime I have done a fresh install from source. But the problem
has not gone. I can start clamd in foreground, the nohup.out shows no
errors:

===

Limits: Global size limit set to 104857600 bytes.
Limits: File size limit set to 26214400 bytes.
Limits: Recursion level limit set to 16.
Limits: Files limit set to 1.
Limits: Core-dump limit is 0.
Archive support enabled.
Algorithmic detection enabled.
Portable Executable support enabled.
ELF support enabled.
Mail files support enabled.
OLE2 support enabled.
PDF support enabled.
HTML support enabled.
Self checking every 600 seconds.
Listening daemon: PID: 30374
MaxQueue set to: 100
Client disconnected (FD 14)
/root/spip_style.php3: OK


=
and I can clamdscan files, as the last two lines show.

Without the daemon, I can use the clamscan utility without problems:


===
h830101:/var/log #clamscan /var/log/apache2
...
/var/log/apache2/access_log: OK
/var/log/apache2/access_log-20100516.gz: OK
/var/log/apache2/access_log-20100113.gz: OK
/var/log/apache2/access_log-20091205.gz: OK
/var/log/apache2/access_log-20100422.gz: OK
/var/log/apache2/access_log-20091121.gz: OK
/var/log/apache2/access_log-20100312.gz: OK
/var/log/apache2/error_log-20100306.gz: OK
/var/log/apache2/error_log: OK
/var/log/apache2/access_log-20091221.gz: OK
/var/log/apache2/access_log-20100429: OK
/var/log/apache2/access_log-20100227.gz: OK
/var/log/apache2/access_log-20100202.gz: OK
/var/log/apache2/access_log-20100326.gz: OK
/var/log/apache2/access_log-20091124.gz: OK
/var/log/apache2/error_log-20091001.gz: OK
/var/log/apache2/oekoshop.log: OK

--- SCAN SUMMARY ---
Known viruses: 788152
Engine version: 0.96.1
Scanned directories: 1
Scanned files: 76
Infected files: 0
Data scanned: 520.18 MB
Data read: 56.18 MB (ratio 9.26:1)
Time: 75.357 sec (1 m 15 s)
You have new mail in /var/mail/root
h830101:/var/log #
===



But when I try to start in background, it stops after some seconds with
the infamous error command, no more info given. I tried the debug
option, to no avail, either. :(

There is a moodle server running on this machine, and I really am at a
loss, as moodle relies on calling clamdscan running in background when
checking upload activity, which will of course only work with a clamd
daemon running.


Mike
___
Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
http://www.clamav.net/support/ml


[Clamav-users] I did what you suggested. Then I get the following situation:, , , h830101:/etc # nohup /usr/local/sbin/clamd, [1] 19601, , [1]+ Stopped nohup /usr/loc

2010-05-27 Thread Michael Feldmann
Edwin,

I did what you suggested. Then I get the following situation:


 h830101:/etc # nohup /usr/local/sbin/clamd
 [1] 19601

 [1]+  Stopped nohup /usr/local/sbin/clamd
 h830101:/etc # ps axf|grep clam
 19601 pts/3T  0:00\_ nohup /usr/local/sbin/clamd
  h830101:/etc #

I cannot make anything out of this. Is the clamd running or not?

Mike
___
Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
http://www.clamav.net/support/ml


Re: [Clamav-users] 0.96.1: Error: daemonize() fail

2010-05-27 Thread Michael Feldmann
Am 27.05.2010 07:46, schrieb Michael Feldmann.
I did what you suggested. Then I get the following situation:


 h830101:/etc # nohup /usr/local/sbin/clamd
 [1] 19601

 [1]+  Stopped nohup /usr/local/sbin/clamd
 h830101:/etc # ps axf|grep clam
 19601 pts/3T  0:00  \_ nohup /usr/local/sbin/clamd
 h830101:/etc #



I cannot make anything out of this. Is the clamd running or not?
Mike


 Am 26.05.2010 18:53, schrieb Török Edwin:

 Can you try setting 'Foreground yes' in clamd.conf and tell your init
 script to background clamd. I know Debian's init script has a
 'supervised' mode which allows for this, OpenSUSE should have something
 similar.

 --Edwin
___
Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
http://www.clamav.net/support/ml


Re: [Clamav-users] 0.96.1: Error: daemonize() fail

2010-05-27 Thread Michael Feldmann
Am 26.05.2010 08:34, schrieb Török Edwin:

Looks like clamd stopped, that usually happens with terminal output.
Shouldn't happen with nohup though.

Type 'fg' to bring it to foreground, and see why it stopped.

I did so, here is the result:

===

h830101:/etc # nohup /usr/local/sbin/clamd 
[1] 9227

[1]+  Stopped nohup /usr/local/sbin/clamd
h830101:/etc # fg
nohup /usr/local/sbin/clamd
nohup: appending output to `nohup.out'



And the contents of nohup.out show nothing suspicious:


h830101:/etc # cat nohup.out
Limits: Global size limit set to 104857600 bytes.
Limits: File size limit set to 26214400 bytes.
Limits: Recursion level limit set to 16.
Limits: Files limit set to 1.
Limits: Core-dump limit is 0.
Archive support enabled.
Algorithmic detection enabled.
Portable Executable support enabled.
ELF support enabled.
Mail files support enabled.
OLE2 support enabled.
PDF support enabled.
HTML support enabled.
Self checking every 600 seconds.
Listening daemon: PID: 9227
MaxQueue set to: 100
Client disconnected (FD 14)
h830101:/etc #

=

Thanks again for your attempts to help
Mike
___
Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
http://www.clamav.net/support/ml


Re: [Clamav-users] 0.96.1: Error: daemonize() fail

2010-05-26 Thread Michael Feldmann
Am 26.05.2010 08:34, schrieb Török Edwin:
 On 05/25/2010 11:31 PM, Michael Feldmann wrote:
 Yes it really seems like a memory problem. When I start clamd only with
 the daily.cvd it starts without a problem, but adding the main.cvd
 brings back the error. As I definitely do not have a chance of setting
 up a swap file (the swapon returning operation not permitted) I can
 only hope that the clamAV engine will somehow sometime be rebuilt.

 
 Did you check the ulimit settings? That doesn't require setting up a
 swapfile.



This is the output:

h830101:~ # ulimit -a
core file size(blocks, -c) 0
data seg size (kbytes, -d) unlimited
file size (blocks, -f) unlimited
max locked memory (kbytes, -l) 32
max memory size   (kbytes, -m) unlimited
open files(-n) 1024
pipe size  (512 bytes, -p) 8
stack size(kbytes, -s) unlimited
cpu time (seconds, -t) unlimited
max user processes(-u) 16375
virtual memory(kbytes, -v) unlimited
h830101:~ #


Are there any values worth changing?
Mike
___
Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
http://www.clamav.net/support/ml


Re: [Clamav-users] 0.96.1: Error: daemonize() fail

2010-05-26 Thread Michael Feldmann
I have found Foreground Yes in the conf but I dont know what you mean
by background clamd. I dpn't have a special OpenSUSE init script, I
installed clam from source. As such, I don't have an init script except
for the one which is in the build directory, and which I am not supposed
to move. Thus, I have to start the clamd binary directly.

Mike





Am 26.05.2010 18:53, schrieb Török Edwin:
 Can you try setting 'Foreground yes' in clamd.conf and tell your init
 script to background clamd. I know Debian's init script has a
 'supervised' mode which allows for this, OpenSUSE should have something
 similar.
 
 --Edwin
 
 Best regards,
 --Edwin
 ___
 Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
 http://www.clamav.net/support/ml

___
Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
http://www.clamav.net/support/ml


[Clamav-users] 0.96.1: Error: daemonize() fail

2010-05-25 Thread Michael Feldmann
Hello list.

having upgraded to the current version 0.96.1 on a Suse Linux 10.3 the
clamd daemon won't start. I get the same error other users have
described some time ago:

==
Tue May 25 15:57:27 2010 - +++ Started at Tue May 25 15:57:27 2010
Tue May 25 15:57:27 2010 - clamd daemon 0.96.1 (OS: linux-gnu, ARCH:
i386, CPU: i686)
Tue May 25 15:57:27 2010 - Log file size limit disabled.
Tue May 25 15:57:27 2010 - Reading databases from /usr/local/share/clamav
Tue May 25 15:57:27 2010 - Not loading PUA signatures.
Tue May 25 15:57:34 2010 - Loaded 787256 signatures.
Tue May 25 15:57:34 2010 - LOCAL: Unix socket file /tmp/clamd.socket
Tue May 25 15:57:34 2010 - LOCAL: Setting connection queue length to 15
Tue May 25 15:57:34 2010 - ERROR: daemonize() failed
Tue May 25 15:57:34 2010 - Closing the main socket.
Tue May 25 15:57:34 2010 - Socket file removed.
===

In some other thread was a hint to inusufficient memory2 but in my
machine there seems a lot free:
===

h830101:/var/log # cat /proc/meminfo
MemTotal:  5122676 kB
MemFree:   4886028 kB
Buffers: 0 kB
Cached:  0 kB
SwapCached:  0 kB
Active:  0 kB
Inactive:0 kB
HighTotal: 3068392 kB
HighFree:  3068392 kB
LowTotal:  2054284 kB
LowFree:   1817636 kB
SwapTotal:   0 kB
SwapFree:0 kB
Dirty:   0 kB
Writeback:   0 kB
AnonPages:   0 kB
Mapped: 236648 kB
Slab:0 kB
PageTables:  0 kB
NFS_Unstable:0 kB
Bounce:  0 kB
CommitLimit: 0 kB
Committed_AS:   420200 kB
VmallocTotal:0 kB
VmallocUsed: 0 kB
VmallocChunk:0 kB
HugePages_Total: 0
HugePages_Free:  0
HugePages_Rsvd:  0
Hugepagesize: 2048 kB

==

Where to look now?

Mike

___
Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
http://www.clamav.net/support/ml


Re: [Clamav-users] 0.96.1: Error: daemonize() fail

2010-05-25 Thread Michael Feldmann
Edwin,

thanks very much for your quick response.

I did the strace you suggested,

There are quite a few open commands shown:


open(/etc/ld.so.cache, O_RDONLY)  = 3
open(/usr/local/lib/libclamav.so.6, O_RDONLY) = 3
open(/lib/tls/libpthread.so.0, O_RDONLY) = 3
open(/lib/tls/libc.so.6, O_RDONLY)= 3
open(/lib/libdl.so.2, O_RDONLY)   = 3
open(/lib/libz.so.1, O_RDONLY)= 3
open(/usr/lib/libbz2.so.1, O_RDONLY)  = 3
open(/lib/tls/libm.so.6, O_RDONLY)= 3
open(/usr/local/etc/clamd.conf, O_RDONLY) = 3
open(/usr/local/lib/libclamunrar_iface.so.6.1.3, O_RDONLY) = 3
open(/etc/ld.so.cache, O_RDONLY)  = 3
open(/usr/local/lib/libclamunrar.so.6, O_RDONLY) = 3
open(/usr/local/share/clamav,
O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 3
open(/usr/local/share/clamav/daily.cld, O_RDONLY) = 4
open(/usr/local/share/clamav/daily.cld, O_RDONLY) = 4
open(/usr/local/share/clamav/main.cvd, O_RDONLY) = 4
open(/usr/local/share/clamav/bytecode.cvd, O_RDONLY) = 4



and at the end there is the following:



umask(022)  = 0777
chmod(/tmp/clamd.socket, 0666)= 0
open(/dev/null, O_RDONLY) = 4
open(/dev/null, O_WRONLY) = 5
open(/dev/null, O_WRONLY) = 6
dup2(4, 0)  = 0
dup2(5, 1)  = 1
dup2(6, 2)  = 2
close(4)= 0
close(5)= 0
close(6)= 0
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x40291028) = -1 ENOMEM (
write(2, ERROR: daemonize() failed\n, 26) = 26
close(3)= 0
unlink(/tmp/clamd.socket) = 0
fstat64(1, {st_mode=S_IFCHR|0666, st_rdev=makedev(1, 3), ...}) = 0
ioctl(1, SNDCTL_TMR_TIMEBASE or TCGETS, 0xbfada9b4) = -1 ENOTTY
(Inappropriate ioctl for device)
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x4001b000
write(1, Socket file removed.\n, 21)  = 21
brk(0x9c3a000)  = 0x9c3a000
brk(0x9bfb000)  = 0x9bfb000
munmap(0x40aa7000, 135168)  = 0
munmap(0x48249000, 262144)  = 0
munmap(0x48209000, 192512)  = 0
munmap(0x481c9000, 262144)  = 0
munmap(0x48189000, 262144)  = 0
munmap(0x48149000, 262144)  = 0
munmap(0x48109000, 262144)  = 0
munmap(0x480c9000, 262144)  = 0
munmap(0x48089000, 262144)  = 0
munmap(0x48049000, 262144)  = 0
munmap(0x48009000, 262144)  = 0
munmap(0x47fc9000, 262144)  = 0
munmap(0x47f89000, 262144)  = 0
munmap(0x47f49000, 262144)  = 0
munmap(0x47f09000, 262144)  = 0
munmap(0x47ec9000, 262144)  = 0

(followed by another heap of munmap lines )



Is here anything visible regarding my problem?

Thanks
Mike




On 25.05.2010 17:52, Török Edwin wroute:
 On 05/25/2010 06:27 PM, Michael Feldmann wrote:
 Hello list.

 having upgraded to the current version 0.96.1 on a Suse Linux 10.3 the
 clamd daemon won't start. I get the same error other users have
 described some time ago:

 ==
 Tue May 25 15:57:27 2010 - +++ Started at Tue May 25 15:57:27 2010
 Tue May 25 15:57:27 2010 - clamd daemon 0.96.1 (OS: linux-gnu, ARCH:
 i386, CPU: i686)
 Tue May 25 15:57:27 2010 - Log file size limit disabled.
 Tue May 25 15:57:27 2010 - Reading databases from /usr/local/share/clamav
 Tue May 25 15:57:27 2010 - Not loading PUA signatures.
 Tue May 25 15:57:34 2010 - Loaded 787256 signatures.
 Tue May 25 15:57:34 2010 - LOCAL: Unix socket file /tmp/clamd.socket
 Tue May 25 15:57:34 2010 - LOCAL: Setting connection queue length to 15
 Tue May 25 15:57:34 2010 - ERROR: daemonize() failed
 Tue May 25 15:57:34 2010 - Closing the main socket.
 Tue May 25 15:57:34 2010 - Socket file removed.
 ===
 
 Try 'strace /usr/sbin/clamd 2log'. Then see what fails (well its either
 open(), dup2(), or fork()), and paste the relevant lines here.
 Or just paste the last 50 or so lines of output from strace.
 
 --Edwin
 ___
 Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
 http://www.clamav.net/support/ml

___
Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
http://www.clamav.net/support/ml


Re: [Clamav-users] 0.96.1: Error: daemonize() fail

2010-05-25 Thread Michael Feldmann
Edwin,

If you are right then I am at a dead end, because this is a virtual
server, and to my knowledge I have no chance of setting up a swap file.
All the memory allocation is handled by the host. I wouldn't have
thought memory a problem because there is so much free left (cf. my
first post). :(

Mike





 close(6)= 0
 clone(child_stack=0,
 flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
 child_tidptr=0x40291028) = -1 ENOMEM (
 
 The kernel thinks you don't have enough memory.
 Maybe because your swap is zero, and it needs some swap to back up the
 fork()?
 
 Best regards,
 ---Edwin
 ___
___
Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
http://www.clamav.net/support/ml


Re: [Clamav-users] 0.96.1: Error: daemonize() fail

2010-05-25 Thread Michael Feldmann
Yes it really seems like a memory problem. When I start clamd only with
the daily.cvd it starts without a problem, but adding the main.cvd
brings back the error. As I definitely do not have a chance of setting
up a swap file (the swapon returning operation not permitted) I can
only hope that the clamAV engine will somehow sometime be rebuilt.

Thanks for your hints, though
Mike


Am 25.05.2010 19:47, schrieb Török Edwin:
 On 05/25/2010 08:45 PM, Michael Feldmann wrote:
 Edwin,

 If you are right then I am at a dead end, because this is a virtual
 server, and to my knowledge I have no chance of setting up a swap file.
 All the memory allocation is handled by the host. I wouldn't have
 thought memory a problem because there is so much free left (cf. my
 first post). :(

 
 You can create a file, and use that as swap, doesn't have to be a
 device. Please try to see if that solves the problem.
 
 It might also be a ulimit setting (check ulimit -a), either a global
 one, or one in an init script.
 
 Best regards,
 --Edwin
 ___
 Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
 http://www.clamav.net/support/ml

___
Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
http://www.clamav.net/support/ml