メイン コンテンツに進む
  • すばやく簡単にご注文が可能
  • 注文内容の表示、配送状況をトラック
  • 会員限定の特典や割引のご利用
  • 製品リストの作成とアクセスが可能
  • 「Company Administration(会社情報の管理)」では、お使いのDell EMCのサイトや製品、製品レベルでのコンタクト先に関する情報を管理できます。

Avamar 19.2 - logrotate_script: line 1: /etc/init.d/apache2: No such file or director가 표시되며 로그 회전 실패

この記事は自動翻訳されたものである可能性があります。品質に関するフィードバックがある場合は、このページの下部にあるフォームを使用してお知らせください。

文書の内容


現象

19.1에서 19.2로 업그레이드

- Avamar 19.1에서 19.2로 업그레이드한 후 /var/log/messages에 로그 회전 오류가 나타납니다.
admin@avamar:~/>: grep -i "logrotate.service" /var/log/messages Feb 1 00:00:01 avamar systemd[1]: logrotate.service: Main process exited, code=exited, status=1/FAILURE Feb 1 00:00:01 avamar systemd[1]: logrotate.service: Unit entered failed state. Feb 1 00:00:01 avamar systemd[1]: logrotate.service: Failed with result 'exit-code'. Feb 2 00:00:03 avamar systemd[1]: logrotate.service: Main process exited, code=exited, status=1/FAILURE Feb 2 00:00:03 avamar systemd[1]: logrotate.service: Unit entered failed state. Feb 2 00:00:03 avamar systemd[1]: logrotate.service: Failed with result 'exit-code'. Feb 3 00:00:01 avamar systemd[1]: logrotate.service: Main process exited, code=exited, status=1/FAILURE Feb 3 00:00:01 avamar systemd[1]: logrotate.service: Unit entered failed state. Feb 3 00:00:01 avamar systemd[1]: logrotate.service: Failed with result 'exit-code'. 
- (/var/log/messages)를 읽을 때 이러한 오류는 /etc/init.d/apache2 파일을 찾지 못할 경우 apache2에 대한 logrotate.d에서 사전 회전을 실행하도록 트리거됩니다.
Feb 2 16:30:02 avamar logrotate: ALERT exited abnormally with [1] Feb 2 16:30:02 avamar logrotate: logrotate_script: line 1: /etc/init.d/apache2: No such file or directory Feb 2 16:30:02 avamar logrotate: error: error running non-shared prerotate script for /var/log/apache2/access_log of '/var/log/apache2/access_log ' Feb 2 16:30:02 avamar logrotate: logrotate_script: line 1: /etc/init.d/apache2: No such file or directory Feb 2 16:30:02 avamar logrotate: error: error running non-shared prerotate script for /var/log/apache2/ssl_request_log of '/var/log/apache2/ssl_request_log ' Feb 3 00:00:01 avamar logrotate[14221]: logrotate_script: line 1: /etc/init.d/apache2: No such file or directory Feb 3 00:00:01 avamar logrotate[14221]: error: error running non-shared prerotate script for /var/log/apache2/access_log of '/var/log/apache2/access_log ' Feb 3 00:00:01 avamar logrotate[14221]: logrotate_script: line 1: /etc/init.d/apache2: No such file or directory Feb 3 00:00:01 avamar logrotate[14221]: error: error running non-shared prerotate script for /var/log/apache2/ssl_request_log of '/var/log/apache2/ssl_request_log ' Feb 3 00:00:01 avamar systemd[1]: logrotate.service: Main process exited, code=exited, status=1/FAILURE Feb 3 00:00:01 avamar systemd[1]: logrotate.service: Unit entered failed state. Feb 3 00:00:01 avamar systemd[1]: logrotate.service: Failed with result 'exit-code'. 
- Avamar Server가 SLES 12 SP 4와 함께 19.2를 실행 중입니다.
admin@avamar:~/>: cat /etc/*release* SUSE Linux Enterprise Server 12 (x86_64) VERSION = 12 PATCHLEVEL = 4 # This file is deprecated and will be removed in a future service pack or release. # Please check /etc/os-release for details about this release. NAME="SLES" VERSION="12-SP4" VERSION_ID="12.4" PRETTY_NAME="SUSE Linux Enterprise Server 12 SP4" ID="sles" ANSI_COLOR="0;32" CPE_NAME="cpe:/o:suse:sles:12:sp4" 
- 명령을 수동으로 실행하여 디렉토리를 확인합니다. "No such file or directory"가 표시되며 /etc/init.d/apache2가 실패합니다.
admin@avamar:~/>: ls -ltrh /etc/init.d/apache2 ls: cannot access '/etc/init.d/apache2': No such file or directory 
 

原因

소프트웨어 버그로 인해 apache2 로그 회전이 발생하여 init.d 파일이 SLES 12에 없는 것이 확인되었습니다.
SLES 11에서는 init.d 서비스가 사용되었지만 SLES 12에서는 systemctl 서비스가 사용됩니다.

解決方法

해결 방법

1. 관리자 사용자로 유틸리티 노드 또는 단일 노드 시스템으로 로그인하여 루트가 됩니다.
2. 기존 로그 회전 파일을 옆으로 이동합니다.

mv /etc/logrotate.d/apache2 /tmp
 
3. vi를 사용하여 파일을 다시 생성합니다.

vi /etc/logrotate.d/apache2
 
4. 다음 줄을 Notepad 또는 Notepad++와 같은 텍스트 편집기에 복사합니다(특수 문자를 사용할 수 있으므로 Word 또는 Wordpad 사용 금지).

/var/log/apache2/access_log /var/log/apache2/ssl_request_log {
compress
dateext
maxage 365
rotate 99
size=+4096k
notifempty
missingok
create 640 wwwrun www
sharedscripts
postrotate
systemctl reload apache2.service
sleep 60
endscript
}

/var/log/apache2/error_log /var/log/apache2/suexec.log /var/log/apache2/ssl_engine_log /var/log/apache2/deflate.log {
compress
dateext
maxage 365
rotate 99
size=+1024k
notifempty
missingok
create 640 wwwrun www
sharedscripts
postrotate
systemctl reload apache2.service
sleep 60
endscript
}


5. 편집기에서 Avamar 노드에 새로 생성된 파일에 텍스트를 붙여넣습니다.
6. 변경 내용을 저장합니다.
7. 파일에 올바른 사용 권한을 설정합니다.

chmod 644 /etc/logrotate.d/apache2
 
8. 로그 관리를 루트로 테스트합니다.

logrotate -f /etc/logrotate.conf

영구 수정: 이 문제는 다음 Avamar 버전에서 해결될 것입니다. 19.3.

文書のプロパティ


影響を受ける製品

Avamar

製品

Avamar, Avamar Server

最後に公開された日付

20 11月 2020

バージョン

2

文書の種類

Solution