Roki
падает
Roki
iptv polkitd(authority=local)[1282]: Operator of unix-process:22060:26615952 successfully authenticated as unix-user:rns to gain ONE-SHOT authorization for action org.freedesktop.systemd1.manage-units for system-bus-name::1.145 [systemctl start astra] (owned by unix-user:rns)
сен 18 23:05:31 iptv systemd[1]: Started Astra.
Roki
jornalctl
maniac
а убери —daemon и посмотри
maniac
ну это я так, в небо пальцем.
Alexander 🐕
Type по дефолту, если я верно помню, simple
Alexander 🐕
Пока в сигруппе что-то живо, сервис считается живым
Alexander 🐕
Нет, вру
Alexander 🐕
If set to forking, it is expected that the process configured with ExecStart= will call fork() as part of its start-up. The parent process is expected to exit when start-up is complete and all communication channels are set up. The child continues to run as the main daemon process. This is the behavior of traditional UNIX daemons. If this setting is used, it is recommended to also use the PIDFile= option, so that systemd can identify the main process of the daemon. systemd will proceed with starting follow-up units as soon as the parent process exits.
Roki
Alexander 🐕
Type=forking сделай
Alexander 🐕
Угу
Alexander 🐕
Либо --daemon убрать, либо Type=forking сделать
Alexander 🐕
Alexander 🐕
Это, конечно, блядиноросы виноваты, что PHP мидлы согласны за 60 тысяч работать
Alexander 🐕
Дима
Alexander 🐕
Добрый модератор банит
Alexander 🐕
А злой хуями всех кроет, кто туповат
maniac
А кого?
да тут обычно все и без чистякова неплохо справляются
но с ним лучше, эффективнее лол
Дима
Anonymous
Anonymous
угадаю: макос :)
Леннарт Zh 🕊
Dmitrii
Че, кого к хуям забанить за политоту?
Roki
--log
Roki
C Type=forking пишет вот такую фигню
Aleksandr
потому, что сниппет недоделан был
надо три апострофа, чтобы он отформатировался правильно
telegram-desktop меняет два тире на одно большое вне блоков кода
Roki
Sep 18 23:24:28 iptv systemd[1]: Starting Astra...
Sep 18 23:24:28 iptv systemd[1]: astra.service: PID file /var/run/astra.pid not readable (yet?) after start: No s uch file or directory
Sep 18 23:25:58 iptv systemd[1]: astra.service: Start operation timed out. Terminating.
Sep 18 23:25:58 iptv systemd[1]: Failed to start Astra.
Sep 18 23:25:58 iptv systemd[1]: astra.service: Unit entered failed state.
Sep 18 23:25:58 iptv systemd[1]: astra.service: Failed with result 'timeout'.
maniac
может оно ждет что оно само запишет свой PID
Alexander 🐕
Alexander 🐕
Alexander 🐕
(И про это написано в документашке)
Roki
Три апострофа для кода - точно!
Anonymous
If this setting is used, it is recommended to also use the PIDFile= option, so that systemd can identify the main process of the daemon. systemd will proceed with starting follow-up units as soon as the parent process exits.
Alexander 🐕
systemd will read the PID of the main process of the daemon after start-up of the service. systemd will not write to the file configured here, although it will remove the file after the service has shut down if it still exists.
Anonymous
Anonymous
GuessMainPID ещё есть
Anonymous
в итоге пришлось в чехию
Roki
Отлично, сервису надо pid файл явно указать
Roki
[Unit]
Description=Astra
After=network.target
[Service]
Type=forking
LimitNOFILE=65536
PIDFile=/var/run/astra.pid
ExecStart=/usr/bin/astra --pid /var/run/astra.pid --log /var/log/astra.log -c /etc/astra/astra.conf -p 8000 --daemon
[Install]
WantedBy=multi-user.target
Roki
Это вот рабочий конфиг
Roki
Кстати, вот эта фигня теперь будет работать? И вобще нужна такая для systemd?
Roki
ExecStop=/bin/kill $MAINPID
Roki
Кажется я сломал чат. Ой.
Alexander 🐕
ExecStop=/bin/kill $MAINPID
У меня есть подозрение, что systemd абортирует всю сигруппу целиком вне зависимости от того, что здесь написано
Alexander 🐕
Сперва послав SIGTERM тому, что он считает мастер-процессом
Alexander 🐕
А потом просто выкинув вообще все
Alexander 🐕
Но если ты хочешь, чтобы сервис как-то прибрал за собой, и сигтерма мастер-процессу для этого недостаточно - нужен ExecStop
Alexander 🐕
С кастомной командой
Roki
Судя по команде, не очень то она и нужна сервису
Roki
Пока не сделал рабочий файл, с этой командой постоянно сыпались ошибки. Видимо не было этого самого MAINPID.
Alexander 🐕
Anonymous
Alexander 🐕
у меня там ещё акк
Ну просто быть забаненным на LORе - это реальное достижение, как по мне
Alexander 🐕
Что ты им там такое сделал?
Anonymous
Что ты им там такое сделал?
я просто ещё в 2015 начал темы про пиздец на рынке труда, там в связи с этим сделали даже тен для меня, а сейчас уже 6 тема про перезды больше 20 страниц, а так же я ярый ненавистник нынешнего режима,в отличии от 4 модеров
Roki
Вобщем корректно systemd закрывает по stop, не нужны костыли
Anonymous
Anonymous
в прошлом году на лоре искали спеца по kvm+ovirt+galera за 45к
Anonymous
я hr тогда там обосрал по полной
Anonymous
Anonymous
котоырй так же мейнтейнер генту
Anonymous
и работая на 3 работал получает 45к
Anonymous
и это админ крупного вуза
Anonymous
и 2 комерческих контор
Alexander 🐕
Alexander 🐕
Anonymous
https://spb.hh.ru/vacancy/17958839?query=devops
Alexander 🐕
А ты, вообще, читал ее текст?