서비스 실행하고 등록하기에서 오류가 생겼습니다.

현재 환경변수 파일 생성하고
서비스 파일 생성하기 까지 실습을 완료한 상태인데요

서비스 실행하고 등록하기에서 막혔습니다.

sudo systemctl start mysite.service
위 명령어를 입력하면

Warning: The unit file, source configuration file or drop-ins of mysite.service changed on disk. Run 'systemctl daemon-reload' to reload units.

이 오류가 바로 뜨더라고요.
어떻게 해야할지 모르겠습니다...
도와주시겠어요? ㅠㅜㅠ

alstndhffla 6211

2021년 3월 6일 10:27 오후

목록으로
1개의 답변이 있습니다. 1 / 1 Page

안녕하세요.

오류메시지 그대로 sudo systemctl daemon-reload 을 실행해 주시면 됩니다.

mysite.service 파일 내용이 바뀌어 서비스를 재 등록하라는 메시지 입니다.

박응용

2021년 3월 7일 12:13 오전

@박응용님 와...감사합니다...제가 아무 생각이 없었네요.... 정말 감사합니다. 근데, sudo systemctl status mysite.service 실행시 /var/log/syslog 에 eth0: DHCPv6 address 2406:da12:a03:2100:6293:53d2:5168:fe27/128 timeout preferred 150 valid 450 이런에러가 뜹니다... - alstndhffla님, 2021년 3월 7일 1:14 오전 추천 , 대댓글
@alstndhffla님 timeout 오류는 sudo 없이 실행한 내용이 syslog에 적혀 있는거 아닌가요? - 박응용님, 2021년 3월 7일 9:28 오전 추천 , 대댓글
@박응용님 장고 책 부분에서 서비스가 잘 실행되는지 확인하려면 sudo systemctl status mysite.service 명령을 실행하면 된다. 만약 다음과 같은 메시지가 나타나지 않으면 /var/log/syslog 파일에서 오류 원인을 확인하고 수정해야 한다. 위부분을 따라하는 중인데요... ● mysite.service - gunicorn daemon Loaded: loaded (/etc/systemd/system/mysite.service; disabled; vendor preset: enabled) Active: active (running) since Thu 2020-04-23 12:12:27 UTC; 1s ago Main PID: 26513 (gunicorn) Tasks: 3 (limit: 547) CGroup: /system.slice/mysite.service ├─26513 /home/ubuntu/venvs/mysite/bin/python3 /home/ubuntu/venvs/mysite/bin/gunicorn --workers 2 --bind unix:/tmp/gunicorn.sock config.wsgi:application ├─26534 /home/ubuntu/venvs/mysite/bin/python3 /home/ubuntu/venvs/mysite/bin/gunicorn --workers 2 --bind unix:/tmp/gunicorn.sock config.wsgi:application └─26536 /home/ubuntu/venvs/mysite/bin/python3 /home/ubuntu/venvs/mysite/bin/gunicorn --workers 2 --bind unix:/tmp/gunicorn.sock config.wsgi:application 이런 메세지가 출력이 안되서 /var/log/syslog 파일 로그를 봤는데 어디를 봐야하는지 모르겠습니다... 파일 최하단을 보면되는게 아니었나요? 제가 프로그래밍 경험이 적어서ㅠ.. 최하단은 Mar 6 21:38:59 ip-172-26-11-59 systemd-networkd[402]: eth0: DHCPv6 address 2406:da12:a03:2100:6293:53d2:5168:fe27/128 timeout preferred 150 valid 450 이 log 만 반복적으로 출력되어있어서요... - alstndhffla님, 2021년 3월 7일 9:35 오전 추천 , 대댓글
+1 @alstndhffla님 sudo systemctl start mysite.service 또는 sudo systemctl restart mysite.service 를 하신후에 sudo systemctl status mysite.service을 수행해 보세요. 그때 저런 메시지가 나오지 않으면 오류가 발생한 것이기 때문에 그때 syslog를 보라고 한 것입니다. - 박응용님, 2021년 3월 7일 9:46 오전 추천 , 대댓글
@박응용님 답변 감사합니다.. 해결했습니다.. 그냥 침착하게 읽고 생각하면 되는거였는데...마음이 급했네요. 잠깐 쉬어가야겠습니다. 제가 귀한 시간을 뺐었네요ㅠ 다시 한번 도움정말감사드립니다!! - alstndhffla님, 2021년 3월 7일 10:00 오전 추천 , 대댓글