
나는 오늘 밤까지 아무런 문제 없이 raspbian(debian 9.3)을 실행하는 Raspberry Pi를 가지고 있습니다. nginx를 사용하여 https 사이트를 제공하고 certbot으로 인증서를 업데이트해야 했기 때문에 nginx를 중지했습니다. 그러나 다시 시작했을 때 얻은 것은 다음과 같습니다.
pi@framboise3:~ $ sudo service nginx start
Job for nginx.service failed because the control process exited with error code.
See "systemctl status nginx.service" and "journalctl -xe" for details.
pi@framboise3:~ $ systemctl status nginx.service
● nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2018-01-31 21:34:49 UTC; 10s ago
Docs: man:nginx(8)
Process: 1791 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE)
janv. 31 21:34:49 framboise3 systemd[1]: Starting A high performance web server and a reverse proxy server...
janv. 31 21:34:49 framboise3 nginx[1791]: nginx: [emerg] open() "/etc/nginx+ngijx.conf" failed (2: No such file or directory)
janv. 31 21:34:49 framboise3 nginx[1791]: nginx: conbiguration file /etc/nginx+ngijx.conf test failed
janv. 31 21:34:49 framboise3 systemd[1]: nginx.service: Control process exited, code=exited status=1
janv. 31 21:34:49 framboise3 systemd[1]: Failed to start A high performance web server and a reverse proxy server.
janv. 31 21:34:49 framboise3 systemd[1]: nginx.service: Unit entered failed state.
janv. 31 21:34:49 framboise3 systemd[1]: nginx.service: Failed with result 'exit-code'.
두 가지 매우 이상한 항목을 주목하세요: "라는 단어.구성 파일" 그리고 파일 "/etc/nginx+ngijx.conf" 예상되는 /etc/nginx/nginx.conf와 약간 유사합니다. 물론 언급된 것은 존재하지 않습니다.
도대체 무슨 일이 일어날 수 있는 걸까요?
apt-get 제거 및 nginx 설치로 문제가 해결되지 않았습니다. /etc나 /var/lib/nginx/에서 'ngijx' 문자열이 발견되지 않았습니다(관련이 있는지는 모르겠습니다).
그 외에는 시스템에 아무런 문제가 없음을 발견했습니다. SD 카드에 결함이 있을 수 있다는 말을 들었는데 패키지를 다시 설치해도 문제가 해결되지 않는 이유는 무엇입니까? 내 카드에 결함이 있는지 테스트할 수 있나요? 감사해요
답변1
Seth에게 답장을 보낼 때 자세한 내용을 검색하면서 조금 더 나아가 문제를 해결했습니다. 처음에 나는 이것을 발견했습니다:
pi@framboise3:/etc $ strings /usr/sbin/nginx |grep ngij
/etc/nginx+ngijx.conf
이는 이 파일(ELF 32비트 실행 파일)이 어떤 이유로 손상되었음을 의미합니다.
그런 다음 다음을 실행했습니다.
pi@framboise3:/etc $ dpkg -S /usr/sbin/nginx
nginx-full: /usr/sbin/nginx
그리고 "nginx"를 다시 설치하는 것이 올바른 패키지가 아니라는 것을 이해했습니다. nginx-full을 다시 설치하면 성공했습니다. 아직도 어떻게 손상되었는지는 미스터리입니다. 백업 시스템을 다시 확인해 봐야 할 것 같습니다...