Sponsored Content
Top Forums UNIX for Advanced & Expert Users Server goes down regularly- Please help Post 302214296 by bsandeep_80 on Sunday 13th of July 2008 06:19:10 AM
Old 07-13-2008
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_uSmiliebject_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_uSmiliebject_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_uSmiliebject_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_uSmiliebject_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_uSmiliebject_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
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Changing date regularly..

Hi Guys, Plzz help me out in this!!!!!!!!!!!!!!!! I have a file which runs in the back ground using crontab for every monday at5 P.M. The problem is inside the file ... This is a sample content of a file Update the current and previous week: (Sunday to Sunday) %let... (4 Replies)
Discussion started by: aajan
4 Replies

2. Shell Programming and Scripting

Regularly checking with shell script

Hi, I am new in scripting and also in Linux. I wrote my first script recently. I have an external hdd connected to my debian machine. I am spinning it down using a spindown code (code.google.com/p/spindown/)when I am not using it ( automatically after 1 hour). The problem was I wanted to know when... (2 Replies)
Discussion started by: aspedisca
2 Replies

3. AIX

Java Runtime Execution require reboot of pSeries server regularly?

Dear all experts, Recently the daily batch run process (run using Java Runtime Execution)suddenly run slow. Our apps vendor came in and check and request to reboot the server. After rebooting of the server, the batch run back to normal. May I know is periodically rebooting of pSeries server is a... (9 Replies)
Discussion started by: kwliew999
9 Replies

4. UNIX for Dummies Questions & Answers

regularly copy files to different directory with different file extentions

I have a NAS and I upload my videos to it from time to time. the video format is 3gp but my media player PBO could only play avi. I want to copy these files to different directory and change the extention from 3gp to avi. (yes I want to keep the original version and create a duplicate version with... (0 Replies)
Discussion started by: momentum
0 Replies

5. Shell Programming and Scripting

cp command not functioning regularly

I have written a korn shell script . I copy a file from one mounted directory to other using cp command. This script runs daily at a time. But sporidally it fails to copy the files. So I have missing files at the destination directory for some days. Is my method a good one or is there some... (5 Replies)
Discussion started by: Golden Egg
5 Replies

6. Shell Programming and Scripting

KSH fetching files from server A onto server B and putting on server C

Dear Friends, Sorry for this basic request. But I just started learning Ksh recently and still I am a newbie in this field. Q: I have files on one server and the date format is 20121001000009_224625.in which has year (yyyy) month (mm) and date (dd). I have these files on server A. The task... (8 Replies)
Discussion started by: BrownBob
8 Replies

7. Shell Programming and Scripting

Remove regularly repeated lines

How can i delete some regular repeated lines in a file? example: in_file EDGE 1 2 12 EDGE 2 3 23 EDGE 3 4 34 EDGE 5 6 56 EDGE 6 7 67 EDGE 7 8 78 EDGE 9 10 910 EDGE 10 11 1011 EDGE 11 12 1112 EDGE 13 14 1314 EDGE 14 15 1415 EDGE 15 16 1516 EDGE 17 18 1718 EDGE 18 19 1819 EDGE 19... (8 Replies)
Discussion started by: saeed.soltani
8 Replies

8. Ubuntu

Resolv.conf not getting updated regularly!

Hi All! I am using Ubuntu 12.04 with LXDE. This is office's allocated laptop. I have a problem here now, my /etc/resolv.conf file is not getting updated automatically whenever I am switching network, i.e. home or office. I have to do it manually every-time, I manually input the office's DNS,... (3 Replies)
Discussion started by: nixhead
3 Replies

9. UNIX for Dummies Questions & Answers

Transfer file from server B to server C and running the script on server A

I have 3 servers A, B, C and server B is having some files in /u01/soa/ directory, these files i want to copy to server C, and i want to run the script from server A. Script(Server A) --> Files at Server B (Source server) --> Copy the files to Server C(Target Server). We dont have RSA key... (4 Replies)
Discussion started by: kiran_j
4 Replies

10. What is on Your Mind?

What Social Networks Do You Use Regularly?

What Online Social Networks Do You Use Regularly? I use Facebook and LinkedIn nearly everyday.... You? If your online social network is not listed, please do a "write in" vote.. Thanks! (39 Replies)
Discussion started by: Neo
39 Replies
AUDIT2ALLOW(1)								NSA							    AUDIT2ALLOW(1)

NAME
audit2allow - generate SELinux policy allow/dontaudit rules from logs of denied operations audit2why - translates SELinux audit messages into a description of why the access was denied (audit2allow -w) SYNOPSIS
audit2allow [options] OPTIONS
-a | --all Read input from audit and message log, conflicts with -i -b | --boot Read input from audit messages since last boot conflicts with -i -d | --dmesg Read input from output of /bin/dmesg. Note that all audit messages are not available via dmesg when auditd is running; use "ause- arch -m avc | audit2allow" or "-a" instead. -D | --dontaudit Generate dontaudit rules (Default: allow) -h | --help Print a short usage message -i <inputfile> | --input <inputfile> read input from <inputfile> -l | --lastreload read input only after last policy reload -m <modulename> | --module <modulename> Generate module/require output <modulename> -M <modulename> Generate loadable module package, conflicts with -o -p <policyfile> | --policy <policyfile> Policy file to use for analysis -o <outputfile> | --output <outputfile> append output to <outputfile> -r | --requires Generate require output syntax for loadable modules. -N | --noreference Do not generate reference policy, traditional style allow rules. This is the default behavior. -R | --reference Generate reference policy using installed macros. This attempts to match denials against interfaces and may be inaccurate. -w | --why Translates SELinux audit messages into a description of why the access was denied -v | --verbose Turn on verbose output DESCRIPTION
This utility scans the logs for messages logged when the system denied permission for operations, and generates a snippet of policy rules which, if loaded into policy, might have allowed those operations to succeed. However, this utility only generates Type Enforcement (TE) allow rules. Certain permission denials may require other kinds of policy changes, e.g. adding an attribute to a type declaration to sat- isfy an existing constraint, adding a role allow rule, or modifying a constraint. The audit2why(8) utility may be used to diagnose the reason when it is unclear. Care must be exercised while acting on the output of this utility to ensure that the operations being permitted do not pose a security threat. Often it is better to define new domains and/or types, or make other structural changes to narrowly allow an optimal set of opera- tions to succeed, as opposed to blindly implementing the sometimes broad changes recommended by this utility. Certain permission denials are not fatal to the application, in which case it may be preferable to simply suppress logging of the denial via a 'dontaudit' rule rather than an 'allow' rule. EXAMPLE
NOTE: These examples are for systems using the audit package. If you do not use the audit package, the AVC messages will be in /var/log/messages. Please substitute /var/log/messages for /var/log/audit/audit.log in the examples. Using audit2allow to generate module policy $ cat /var/log/audit/audit.log | audit2allow -m local > local.te $ cat local.te module local 1.0; require { class file { getattr open read }; type myapp_t; type etc_t; }; allow myapp_t etc_t:file { getattr open read }; <review local.te and customize as desired> Using audit2allow to generate module policy using reference policy $ cat /var/log/audit/audit.log | audit2allow -R -m local > local.te $ cat local.te policy_module(local, 1.0) gen_require(` type myapp_t; type etc_t; }; files_read_etc_files(myapp_t) <review local.te and customize as desired> Building module policy using Makefile # SELinux provides a policy devel environment under # /usr/share/selinux/devel including all of the shipped # interface files. # You can create a te file and compile it by executing $ make -f /usr/share/selinux/devel/Makefile local.pp # This make command will compile a local.te file in the current # directory. If you did not specify a "pp" file, the make file # will compile all "te" files in the current directory. After # you compile your te file into a "pp" file, you need to install # it using the semodule command. $ semodule -i local.pp Building module policy manually # Compile the module $ checkmodule -M -m -o local.mod local.te # Create the package $ semodule_package -o local.pp -m local.mod # Load the module into the kernel $ semodule -i local.pp Using audit2allow to generate and build module policy $ cat /var/log/audit/audit.log | audit2allow -M local Generating type enforcement file: local.te Compiling policy: checkmodule -M -m -o local.mod local.te Building package: semodule_package -o local.pp -m local.mod ******************** IMPORTANT *********************** In order to load this newly created policy package into the kernel, you are required to execute semodule -i local.pp Using audit2allow to generate monolithic (non-module) policy $ cd /etc/selinux/$SELINUXTYPE/src/policy $ cat /var/log/audit/audit.log | audit2allow >> domains/misc/local.te $ cat domains/misc/local.te allow cupsd_config_t unconfined_t:fifo_file { getattr ioctl }; <review domains/misc/local.te and customize as desired> $ make load AUTHOR
This manual page was written by Manoj Srivastava <srivasta@debian.org>, for the Debian GNU/Linux system. It was updated by Dan Walsh <dwalsh@redhat.com> The audit2allow utility has contributions from several people, including Justin R. Smith and Yuichi Nakamura. and Dan Walsh Security Enhanced Linux October 2010 AUDIT2ALLOW(1)
All times are GMT -4. The time now is 07:13 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy