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

Avamar 19.2 - échec du processus logrotate avec logrotate_script: line 1: /etc/init.d/apache2: No such file or directory

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

文書の内容


現象

Mise à niveau de la version 19.1 vers la version 19.2

- Après la mise à niveau de la version 19.1 vers la version 19.2 d’Avamar, des erreurs du processus logrotate s’affichent dans /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'. 
- Reading through (/var/log/messages), these errors are triggered after it fails to find file: /etc/init.d/apache2 to run prerotate in the logrotate.d for apache2
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 is running 19.2, with SLES 12 SP 4:
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" 
- Running the command manually, to check for directory: /etc/init.d/apache2 fails with "No such file or directory".
admin@avamar:~/>: ls -ltrh /etc/init.d/apache2 ls: cannot access '/etc/init.d/apache2': No such file or directory 
 

原因

En raison d’un bug logiciel, logrotate pour apache2 vérifie les fichiers init.d, bien qu’ils n’existent pas dans SLES 12.
Dans SLES 11, le service init.d était utilisé. Dans SLES 12, en revanche, il s’agit du service systemctl.

解決方法

Solution de contournement

1. Connectez-vous au nœud utilitaire ou au système à nœud unique en tant qu’utilisateur admin et passez en mode root.
2. Déplacez le fichier logrotate existant vers

mv/etc/logrotate.d/apache2/tmp
 
3. Recréez le fichier à l’aide de vi

vi/etc/logrotate.d/apache2
 
4. Copiez les lignes suivantes dans un éditeur de texte (par exemple, le Bloc-notes ou Notepad++. N’utilisez pas Word ou WordPad car ces programmes introduiraient des caractères spéciaux)

/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. Collez le texte de l’éditeur dans un nouveau fichier sur un nœud Avamar
6. Enregistrez vos modifications
7. Définissez les autorisations appropriées pour le fichier

chmod 644 /etc/logrotate.d/apache2
 
8. Testez la rotation de logs en tant qu’utilisateur root.

logrotate -f /etc/logrotate.conf

Solution permanente : Ce problème sera résolu dans la prochaine version d’Avamar : 19.3.

文書のプロパティ


影響を受ける製品

Avamar

製品

Avamar, Avamar Server

最後に公開された日付

20 11月 2020

バージョン

2

文書の種類

Solution