メイン コンテンツに進む
  • すばやく簡単にご注文が可能
  • 注文内容の表示、配送状況をトラック
  • 会員限定の特典や割引のご利用
  • 製品リストの作成とアクセスが可能

Avamar 19.2 - logrotate non riesce restituendo l'errore logrotate_script: line 1: /etc/init.d/apache2: No such file or directory

この記事は次に適用されます: この記事は次には適用されません: この記事は、特定の製品に関連付けられていません。 すべての製品パージョンがこの記事に記載されているわけではありません。

現象

Aggiornamento dalla versione 19.1 alla 19.2

- Dopo l'aggiornamento di Avamar 19.1 alla versione 19.2, vengono segnalati errori di logrotate in /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'. 
- Leggendo i messaggi (/var/log/messages), questi errori risultano attivati quando non è possibile trovare il file /etc/init.d/apache2 per eseguire la prerotazione in logrotate.d per 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 19.2 in esecuzione con 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" 
- Se si esegue manualmente il comando per controllare la directory /etc/init.d/apache2, l'operazione non riesce restituendo l'errore "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 
 

原因

Bug del software, per cui logrotate per apache2 controllano i file init.d, che non esistono in SLES 12.
In SLES 11 viene utilizzato il servizio init.d, ma in SLES 12 viene utilizzato il servizio systemctl.

解決方法

Soluzione alternativa

1. Accedere all'utility node o al sistema a nodo singolo come utente amministratore e diventare root.
2. Spostare il file logrotate esistente a parte

mv /etc/logrotate.d/apache2 /tmp
 
3. Creare nuovamente il file mediante vi

vi /etc/logrotate.d/apache2
 
4. Copiare le seguenti righe in un editor di testo come Blocco note o Notepad++ (non utilizzare Word o Wordpad in quanto si introdurranno caratteri speciali)

/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. Incollare il testo dall'editor in un file di nuova creazione in un nodo Avamar.
6. Salvare le modifiche.
7. Impostare le autorizzazioni corrette per il file

chmod 644 /etc/logrotate.d/apache2
 
8. Testare la rotazione dei log come utente root.

logrotate -f /etc/logrotate.conf

Correzione permanente: il problema verrà corretto nella prossima versione di Avamar: 19.3.

対象製品

Avamar

製品

Avamar, Avamar Server
文書のプロパティ
文書番号: 000175097
文書の種類: Solution
最終更新: 20 11月 2020
バージョン:  2
質問に対する他のDellユーザーからの回答を見つける
サポート サービス
お使いのデバイスがサポート サービスの対象かどうかを確認してください。