Server goes down regularly- Please help

Hi ,

I need a clarification on an issue that we have been facing for two weeks now.

From past one year we had issue with space on our Linux machine on which our application ( View VC, CVS) hosted on it. Due to swap memeory configuration being 0 and very less space on the server, the server used to go down on a regular basis.

To resolve this issue we installed CVS and View on a new hardware upgraded( with more space about 100 GB more) Linux machine with 10 GB of Swap memory for the same.

The issue were in the server going down got resolved after this.

But lately from past few days we are encountering the same problem. The Application goes down regularly and server becomes inaccessible.we have to restart the server and our applications by hard booting . I am not sure why this is happening and when i check /var/log/messages file i see the following error.

This is what i see in the error logs

Jul 13 05:09:21 smbd[20970]: [2008/07/13 05:09:21, 0] lib/username.c:map_username(128)
Jul 13 05:09:21 smbd[20970]: can't open username map None. Error No such file or directory
Jul 13 05:27:16 kernel: audit(1215907036.162:8127): avc: denied { getattr } for pid=20987 comm="viewvc.cgi" name="var" dev=sda1 ino=1163265 scontext=user_u:system_r:httpd_sys_script_t tcontext=system_u:object_r:var_t tclass=dir
Jul 13 05:27:16 kernel: audit(1215907036.469:8128): avc: denied { execute } for pid=20988 comm="cvs" name="ld.so.cache" dev=sda1 ino=2608729 scontext=user_u:system_r:httpd_sys_script_t tcontext=system_u:object_r:ld_so_cache_t tclass=file
Jul 13 05:27:17 kernel: audit(1215907037.501:8129): avc: denied { getattr } for pid=20990 comm="viewvc.cgi" name="var" dev=sda1 ino=1163265 scontext=user_u:system_r:httpd_sys_script_t tcontext=system_u:object_r:var_t tclass=dir
Jul 13 05:27:18 kernel: audit(1215907038.465:8130): avc: denied { getattr } for pid=20991 comm="viewvc.cgi" name="var" dev=sda1 ino=1163265 scontext=user_u:system_r:httpd_sys_script_t tcontext=system_u:object_r:var_t tclass=dir
Jul 13 05:27:18 kernel: audit(1215907038.469:8131): avc: denied { getattr } for pid=20992 comm="viewvc.cgi" name="var" dev=sda1 ino=1163265 scontext=user_u:system_r:httpd_sys_script_t tcontext=system_u:object_r:var_t tclass=dir
Jul 13 06:21:18 smbd[21056]: [2008/07/13 06:21:18, 0] lib/username.c:map_username(128)
Jul 13 06:21:18 smbd[21056]: can't open username map None. Error No such file or directory
Jul 13 06:21:18 smbd[21056]: [2008/07/13 06:21:18, 0] lib/username.c:map_username(128)
Jul 13 06:21:18 smbd[21056]: can't open username map None. Error No such file or directory
Jul 13 06:21:18 smbd[21056]: [2008/07/13 06:21:18, 0] lib/username.c:map_username(128)

Can someone guide me on what needs to be done on this please, i will be very gratefull.

Thanks,
Sandy

The smbd messages indicate that Samba is running on your system. Looks like usename mapping is not configured. Check in youe Samba configuration file for a line like "username map = /etc/smbusers" and modify as necessary.

Thanks for the reply.

yes you are right , we have samba service running on the system.I will check that and let you know.

But one doubt i am still having is , is this causing the application to go down regularly?

please help!!!

thanks,
Sandy

I'd also check to see the status of your "selinux" subsystem. It has three states; [off|warn|on] and if it's turned on, acl's must be managed over and above the traditional unix permissions.

S.

Thanks,

But all these messages do not point me to the real reason for the server goinf down regularly. How do i check or make sure that i resolve this.

Please guide me:)

Thank,
Sandeep

Hi,

I was just googling and found that these kind of avc : permission denied occurs when an the application (running under httpd_sys_script_t) requires permissions on a specific executable in /usr/bin/ (bin_t) that it doesn't have permission.

Cureently our application has viewvc.cgi application running on the server and the error is pointing to the same.

Can anyone let me which file needs to be changed to avaoid this permission debied errors.

Please help , i and just hung on this issue and trying to find a way out but not able to.

Thanks,
Sandy

Are you using selinux rules / permissions on your host. If not please make sure selinux is turned off. check /etc/selinux/selinux.cnf.

When you say 10GB of swap memory, do you have 5 GB of RAM in your system? It recommended to have swap always double the RAM.

Hi Nilesh,

Thanks for the reply. This is what i see under /etc/selinux/config:

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - SELinux is fully disabled.
SELINUX=enforcing

Do i need to set this as disabled. Can you please explain me why we are doing this? will help me:)

Also the RAM size is 2 GB while the Swap memeory is 10 GB....

Please help

Thanks,
Sandeep