오픈소스 53

[syslog] kernel: NOHZ: local_softirq_pending 100

1. 에러 메시지: kernel: NOHZ: local_softirq_pending 100 2. 원인: - 시스템이 어떤 소프트웨어 interrupt 를 처리하는 대신 CPU 를 sleep 상태로 만드는 것 - 메시지 마지막의 숫자는 hexadecimal 로 표현되며, ‘100’ 은 HRTIMER_SOFTIRQ 를 의미 - HRTIMER_SOFTIRQ 는 High Resolution Timer(HRT) 에 대한 소프트웨어 interrupt(HRT에 대한 상세정보는 아래 참조 URL 참고) - 커널 버전 2.6.22 이후부터 add 된 debug 메시지 3. 조치 방안: - /etc/grub.conf 파일에 nohz=off 옵션을 설정하여 disable 가능(단, 커널 버전 2.6.32-431.el6 보다..

[syslog] JBD: barrier-based sync failed on xvda1-8 - disabling barriers

1. 에러 메시지: JBD: barrier-based sync failed on xvda1-8 - disabling barriers 2. 원인: - RedHat 이나 CentOS 등의 Linux 계열에서는 journaling 파일시스템을 사용하는데, 이 journaling 파일시스템 중 ext4 파일시스템에는 기본적으로 Write Barrier 라는 커널 매커니즘이 enable 되어 있음(barrier=1) - ext3 파일시스템은 Write Barrier 기능을 사용 가능하나, 기본 disable 되어 있어 위와 같은 메시지가 발생하지 않음 - Write Barrier 는 파일시스템의 메타데이터가 올바르게 기록되고 디스크에 제대로(심지어 디스크 전원이 나갈 지라도) 반영되게 하기 위한 커널 매커니즘 -..

Nginx 가상 호스트별 로그 설정

가상 호스트에 각각 로그를 설정하는 예제 입니다. http { ... server { listen 80; server_name www.example1.com ; access_log /var/log/nginx/example1.access.log; error_log /var/log/nginx/example1.error.log; ... } server { listen 80; server_name www.example2.com ; access_log /var/log/nginx/example2.access.log; error_log /var/log/nginx/example2.error.log; ... } server { listen 80; server_name www.exampl3.com; access_log /..

Nginx 다중 로그 설정

동적인 요청에 대한 로그는 main로그 포멧을 사용하고, 정적인 요청은 static_main 로그 포멧을 사용,에러로그는 error_main 로그포멧을 사용하는 예로 다음과 같이 설정이 가능합니다. http { log_format main '$remote_addr - $remote_user [$time_local] ' '"$request" $status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; #정적(static) 파일에 대해서는 다음과 같은 로그 포멧 사용 log_format static_main '$remote_addr [$time_local] ' '"$request" $status $body_by..

[syslog] daemon[PID]: warning: can't get client address: Connection reset by peer

1. 에러 메시지: daemon[PID]: warning: can't get client address: Connection reset by peer 2. 원인: - C/S 구조에서의 TCP 통신은 기본적으로 3-way handshake 방식을 통해 서로 세션을 연결하게 되는데, SYN/ACK 시퀀스가 Connection 이 완료되기 전에 torn down(해체) 되어 daemon 이 source system 을 확인할 수 없을 때 발생 - unauthorized user 가 daemon 을 통해 해당 시스템에 접근하려 했다가 정상적인 절차로 Connection 이 맺어지기 전에 세션이 terminate 되면 발생 - 서버에서 취약점 확인을 위한 스캔 시 발생 3. 조치 방안: - 단순 경고성 메시지이므..

PPAS 성능분석을 위한 DRITA설정 및 기본활용

성능분석 정보 수집을 위한 DRITA 설정 및 기본활용 PostgreSQL에서는 활용할 수 없는 기능이며, PPAS (PostgreSQL기업용)에서만 활용 가능합니다. 1. DTIRA사용을 위한 환경 설정 postgresql.conf 파일 변경 --> timed_statistics = on 설정이후 DBMS 재기동 필요 2. Snapshot 생성 select * from edbsnap(); 3. Snapshot 정보 조회 select * from get_snaps(); 4. SYSTEM Wait 정보 조회 select * from sys)rpt(1,2,20); 파라미터1 : Snapshot 시작 번호 파라미터2 : Snapshot 종료 번호 파라미터3 : Snapshot Top 이벤트 개수 5. 성능 분..

[syslog] kernel: type=1101 audit(1412069761.325:844941): user pid=23092 uid=0 auid=4294967295 msg='PAM: accounting acct="sysadm" : exe="/usr/sbin/crond" (hostname=?, addr=?, terminal=cron res=success)'

1. 에러 메시지:kernel: type=1101 audit(1412069761.325:844941): user pid=23092 uid=0 auid=4294967295 msg='PAM: accounting acct="sysadm" : exe="/usr/sbin/crond" (hostname=?, addr=?, terminal=cron res=success)'kernel: type=1103 audit(1412069761.325:844942): user pid=23092 uid=0 auid=4294967295 msg='PAM: setcred acct="sysadm" : exe="/usr/sbin/crond" (hostname=?, addr=?, terminal=cron res=success)' 2. 현상:..

[dmesg] kernel: type=1400 audit(1404149145.749:40): avc: denied { write } for pid=438 comm="ifconfig" path="/tmp/edscan.lck" dev=xvda3 ino=390926 scontext=system_u:system_r:ifconfig_t:s0 tcontext=system_u:object_r:initrc_tmp_t:s0 tclass=file

1. 에러 메시지:kernel: type=1400 audit(1404149145.749:40): avc: denied { write } for pid=438 comm="ifconfig" path="/tmp/edscan.lck" dev=xvda3 ino=390926 scontext=system_u:system_r:ifconfig_t:s0 tcontext=system_u:object_r:initrc_tmp_t:s0 tclass=file 2. 원인:- SELinux 설정값이 enforcing 으로 되어 있을 때 발생하는 메시지 3. 조치 방안:- setenforce 명령 실행 # setenforce 0 // SELinux 데몬 끄기(setenforce 1 은 켜기) - 위 명령이 정상 수행되지 않을 경우, /..