Apache Mod_jk troubleshooting

배찌 (배찌)·2023년 3월 7일
0

troubleshooting

목록 보기
1/1

문제 로그

Unable to start due to shared memory failure

이 문제는 내가 httpd.conf에 mod_jk를 불러오는 코드를 작성시에 생긴 문제였다.

LoadModule jk_module modules/mod_jk.so

원인

이 코드는 로그에서 볼 수 있듯이 mod_jk가 공유 memory에 접근할 수 없기 때문에 생기는 문제이다.

해결방안

해결 하기 위해서 다음의 방법을 사용해볼 수 있다.

vi /etc/selinux/targeted/contexts/files/file_contexts.local
/var/log/httpd(/.*)?    system_u:object_r:httpd_log_t:s0
/var/run/mod_jk\.shm    system_u:object_r:httpd_log_t:s0
touch /etc/httpd/logs/mod_jk.shm
chown apache:apache /etc/httpd/logs/mod_jk.shm
chmod 666 /etc/httpd/logs/mod_jk.shm
touch /run/mod_jk.shm
chown apache:apache /run/mod_jk.shm
restorecon -R /var/log/httpd /var/run/mod_jk.shm
setsebool -P httpd_read_user_content 1
setsebool -P httpd_can_network_connect 1
systemctl restart httpd

이 해결 방법은 구글링하여 찾아온 방법이다.

profile
Never give up Impossible is nothing

0개의 댓글