stunnell log file has reached its limit


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers stunnell log file has reached its limit
# 1  
Old 09-12-2011
stunnell log file has reached its limit

Please help! I am really new to Linux, and my colleague who usually deals with these things isnt here to help me out.

We are running Scalix mail services on CentOS 6.0. Email users with IMAP folders are getting an error message stating the server cannot be reached, however POP3 mail users are fine.

Whilst restarting some services I found this:

Code:
[root@mail1 ~]# service stunnel restart
Shutting down stunnel: [FAILED]
Starting stunnel: 2011.09.12 08:20:48 LOG7[12257:3086513872]: Snagged 64 random bytes from /dev/urandom
2011.09.12 08:20:48 LOG7[12257:3086513872]: RAND_status claims sufficient entropy for the PRNG
2011.09.12 08:20:48 LOG6[12257:3086513872]: PRNG seeded successfully
2011.09.12 08:20:48 LOG7[12257:3086513872]: Certificate: /etc/stunnel/stunnel2.pem
2011.09.12 08:20:48 LOG7[12257:3086513872]: Key file: /etc/stunnel/stunnel2.pem
2011.09.12 08:20:48 LOG7[12257:3086513872]: SSL context initialized for service pop3s
2011.09.12 08:20:48 LOG7[12257:3086513872]: Certificate: /etc/stunnel/stunnel2.pem
2011.09.12 08:20:48 LOG7[12257:3086513872]: Key file: /etc/stunnel/stunnel2.pem
2011.09.12 08:20:48 LOG7[12257:3086513872]: SSL context initialized for service imaps
2011.09.12 08:20:48 LOG7[12257:3086513872]: Certificate: /etc/stunnel/stunnel2.pem
2011.09.12 08:20:48 LOG7[12257:3086513872]: Key file: /etc/stunnel/stunnel2.pem
2011.09.12 08:20:48 LOG7[12257:3086513872]: SSL context initialized for service ssmtp
/etc/init.d/stunnel: line 24: 12257 File size limit exceeded/usr/sbin/stunnel

Is it best to delete the contents of this file? If so how would I go about doing that? Please can someone tell me what to do? Smilie

Thanks in advance.

Moderator's Comments:
Mod Comment Please use [CODE] tags when posting command lines and console output

Last edited by pludi; 09-12-2011 at 08:59 AM..
# 2  
Old 09-12-2011
Check ulimit -a file size limit, write it down.
Use fuser to get which pids are using /usr/sbin/stunnel
Code:
fuser /usr/sbin/stunnel

Then, lsof -p those pids.

That will list open files, then check their size with du -sk /path/to/file, if the size of file is greater the ulimit file size value, that file is the problem.
If it's a log or alike file, you can make it 0 size with
Code:
0>file.log

DO NOT use rm on file if processes are using it.

After that i would be wise do increase it ulimit value for file size (if it's not large enough)

Hope this helps.
Regards.
This User Gave Thanks to Peasant For This Post:
# 3  
Old 09-12-2011
Thanks for the reply...I think I'm even more confused than earlier!

Ok, I started by doing the ulimit -a which gave me this:

Code:
 
[root@mail1 ~]# ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 77824
max locked memory (kbytes, -l) 32
max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 10240
cpu time (seconds, -t) unlimited
max user processes (-u) 77824
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited

fuser /usr/sbin/stunnel came back with nothing at all, just took me to the next line so I couldnt try the lsof -p as I had no pids.

Could you advise me further? I really appreciate your help.

Last edited by beckyboo; 09-12-2011 at 11:56 AM.. Reason: Entered code
# 4  
Old 09-12-2011
Is that a 32bit architecture ?
Check and see if the log is bigger then 2GB.

I don't know the location of stunnel logs, please check configuration of that service to find where it is logging.
You can also run thisto find all log files which are bigger then 1.9 GB, on the entire machine and list them with ls command.
Code:
find / -size +1900M -exec ls -lrt {} \;

Hope this helps
Regards
Peasant.
This User Gave Thanks to Peasant For This Post:
# 5  
Old 09-12-2011
Hi, thank you for being so patient with me, I really appreciate this.
Yes 32bit is correct, but its actually v 5.5 of CentOS.

Heres what I found, which I think shows the stunnel log file is the only one that is a problem:

Code:
 
[root@mail1 ~]# find / -size +1900M -exec ls -lrt {} \;
find: /proc/2904/task/2905/fd/15: No such file or directory
find: /proc/2904/task/2905/fd/16: No such file or directory
find: /proc/2904/task/2905/fd/17: No such file or directory
find: /proc/2904/task/2905/fd/19: No such file or directory
find: /proc/2904/task/2905/fd/20: No such file or directory
find: /proc/2904/task/2905/fd/21: No such file or directory
find: /proc/2904/task/2905/fd/26: No such file or directory
find: /proc/2904/task/2905/fd/28: No such file or directory
find: /proc/2904/task/2905/fd/29: No such file or directory
find: /proc/2904/task/2905/fd/30: No such file or directory
find: /proc/12751: No such file or directory
find: /proc/12754/task/12754/fd/4: No such file or directory
find: /proc/12754/fd/4: No such file or directory
find: /var/opt/scalix/m1/s/temp/imap-core.309.lck: No such file or directory
find: /var/opt/scalix/m1/s/temp/imap-admin.31487: No such file or directory
find: /var/opt/scalix/m1/s/temp/025i5b2: No such file or directory
find: /var/opt/scalix/m1/s/temp/025i5b1: No such file or directory
find: /var/opt/scalix/m1/s/temp/imap-core.309: No such file or directory
-rw-r----- 1 root root 2147483647 Sep 9 15:44 /var/log/stunnel.log
[root@mail1 ~]#


Last edited by beckyboo; 09-12-2011 at 11:57 AM..
# 6  
Old 09-12-2011
If you require /var/log/stunnel.log, copy it somewhere else with cp.
Then redirect 0 into it, and restart required application
Code:
0>/var/log/stunnel.log

Regards
Peasant.
This User Gave Thanks to Peasant For This Post:
# 7  
Old 09-12-2011
Hi :-(
I have tried what you suggested, it all looked to be going well until I tried to restart stunnel...its still failing.

Code:
 
[root@mail1 ~]# cp /var/log/stunnel.log /var/log/stunnel_backup.log
[root@mail1 ~]# 0>/var/log/stunnel.log
[root@mail1 ~]# service stunnel restart
Shutting down stunnel:                                     [FAILED]
Starting stunnel:
[root@mail1 ~]#

 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to confirm that I've reached the nproc limit?

Hi, I am getting the error su: cannot set user id: Resource temporarily unavailable. In limits.conf, it shows soft nproc 2047 for this user. ps H -u | wc -l shows 508 processes only. Linux flavour is Red Hat Enterprise Linux Server release 5.10 (Tikanga) Any advice will be much... (1 Reply)
Discussion started by: newbie_01
1 Replies

2. UNIX and Linux Applications

Autosys R11.3 : Error on log file size limit

Just had a migration from Autosys 4.5 to R11.3. After the migration to R11.3, Autosys jobs have been failing when the log file reaches a size of 800 MB. This did not happen before the migration, when Autosys 4.5 was used. Is there a way to configure the file size limit/cap in Autosys... (1 Reply)
Discussion started by: kimo222
1 Replies

3. Shell Programming and Scripting

Increment and find closest value until the end of the file is reached.

Hi all, I have a file which looks like: 0 1.1985506 1 1.2237930 2 1.2159038 3 1.2668828 4 1.2650216 5 1.2474344 6 1.2817688 7 1.2721698 8 1.2665005 9 1.2826315 10 1.2797879 11 1.3201736 12 1.3116595 13 1.3361583 14 1.3309238 (2 Replies)
Discussion started by: ezitoc
2 Replies

4. Shell Programming and Scripting

Check space of directories and send email if it has reached threshold limit

Hi, I need help in writing unix script for checking space of some directories on the system and also send an email when it reaches the threshold limit. I have written the followng code; #!/bin/ksh ADMIN="me@somewhere.com" # set alert level 80% is default THRESHOLD=80 df | grep -E... (5 Replies)
Discussion started by: jmathew99
5 Replies

5. Shell Programming and Scripting

Log Size Exceeds Limit

Everytime I try to start Discreet Flame on my Octane2 machine it keeps giving me an error message "initial log size exceeds limit--aborting" Can anyone please help me how to fix this problem. Thanks. Octane2 IRIX64 Release 6.5 Flame 2007 (6 Replies)
Discussion started by: dewaraja
6 Replies

6. UNIX for Advanced & Expert Users

Log Size Exceeds Limit

Everytime I try to start Discreet Flame on my Octane2 machine it keeps giving me an error message "initial log size exceeds limit--aborting" Can anyone please help me how to fix this problem. Thanks. Octane2 IRIX64 Release 6.5 Flame 2007 (0 Replies)
Discussion started by: dewaraja
0 Replies

7. UNIX for Dummies Questions & Answers

Log Size Exceeds Limit

Everytime I try to start Discreet Flame on my Octane2 machine it keeps giving me an error message "initial log size exceeds limit--aborting" Can anyone please help me how to fix this problem. Thanks. Octane2 IRIX64 Release 6.5 Flame 2007 (0 Replies)
Discussion started by: dewaraja
0 Replies

8. Linux

Limit size of log file from syslog

Hi, I'm using Linux 2.6 cross compiled for a embedded powerpc. Earlier we were using busybox syslogd for logging the messages, but as the flexibilty is less, we decided to move to standard syslog. Now I want to limit the size of the log file (/var/log/messages) to 128K. I couldn't find... (4 Replies)
Discussion started by: jockey007
4 Replies

9. SCO

cpio: Ulimit reached for file output

I am trying run cpio backing up to tape, but I get the above error. Can anyone assist please as I am sleeping at work today. I tried setting the ulimit to unlimited but when I rebooted the server it came back with another value and I cannot run my backup now.... (0 Replies)
Discussion started by: dustytina
0 Replies

10. Shell Programming and Scripting

tar: 0511-194 Reached end-of-file before expected.

Hello everyone! I wrote a script for backing up a folder. It goes fine but today it started to spit out this error, when a folder is taring: tar: 0511-194 Reached end-of-file before expected. I didn't make any changes! - OS: UNIX AIX ibm 3 - the folder I'm trying to tar is 11Gb large... (4 Replies)
Discussion started by: Funky_ass
4 Replies
Login or Register to Ask a Question