При попытке запустить под systemd "из коробки" ничего не получается: =8<===================================================================== Dec 15 17:21:19 teer systemd[1]: Starting LLDP daemon... Dec 15 17:21:19 teer lldpd[30518]: could not open either /etc/os-release or /usr/lib/os-release Dec 15 17:21:19 teer systemd[1]: Started LLDP daemon. Dec 15 17:21:19 teer lldpcli[30519]: cannot find configuration file/directory /etc/lldpd.conf Dec 15 17:21:19 teer lldpd[30531]: /etc/localtime copied to chroot Dec 15 17:21:19 teer lldpd[30531]: protocol LLDP enabled Dec 15 17:21:19 teer lldpd[30531]: protocol CDPv1 disabled Dec 15 17:21:19 teer lldpd[30531]: protocol CDPv2 disabled Dec 15 17:21:19 teer lldpd[30531]: protocol SONMP disabled Dec 15 17:21:19 teer lldpd[30531]: protocol EDP disabled Dec 15 17:21:19 teer lldpd[30531]: protocol FDP disabled Dec 15 17:21:19 teer lldpd[30531]: libevent 2.0.21-stable-dev initialized with epoll method Dec 15 17:21:19 teer kernel: [117564.564521] 8021q: 802.1Q VLAN Support v1.8 Dec 15 17:21:19 teer systemd[1]: lldpd.service: Main process exited, code=killed, status=31/SYS Dec 15 17:21:19 teer systemd[1]: lldpd.service: Unit entered failed state. Dec 15 17:21:19 teer systemd[1]: lldpd.service: Failed with result 'signal'. Dec 15 17:21:19 teer systemd[1]: lldpd.service: Service hold-off time over, scheduling restart. Dec 15 17:21:19 teer systemd[1]: Stopped LLDP daemon. Dec 15 17:21:19 teer systemd[1]: Starting LLDP daemon... Dec 15 17:21:19 teer lldpd[30539]: unable to create control socket because it already exists Dec 15 17:21:19 teer lldpd[30539]: check if another instance is running Dec 15 17:21:19 teer systemd[1]: Started LLDP daemon. Dec 15 17:21:19 teer lldpd[30539]: unable to connect to socket /var/lib/run/lldpd.socket: Connection refused Dec 15 17:21:19 teer lldpd[30539]: old control socket is present, clean it Dec 15 17:21:19 teer lldpd[30539]: could not open either /etc/os-release or /usr/lib/os-release Dec 15 17:21:19 teer lldpcli[30540]: cannot find configuration file/directory /etc/lldpd.conf Dec 15 17:21:19 teer lldpd[30552]: protocol LLDP enabled Dec 15 17:21:19 teer lldpd[30552]: protocol CDPv1 disabled Dec 15 17:21:19 teer lldpd[30552]: protocol CDPv2 disabled Dec 15 17:21:19 teer lldpd[30552]: protocol SONMP disabled Dec 15 17:21:19 teer lldpd[30552]: protocol EDP disabled Dec 15 17:21:19 teer lldpd[30552]: protocol FDP disabled Dec 15 17:21:19 teer lldpd[30552]: libevent 2.0.21-stable-dev initialized with epoll method Dec 15 17:21:19 teer systemd[1]: lldpd.service: Main process exited, code=killed, status=31/SYS Dec 15 17:21:19 teer lldpcli[30540]: unable to get configuration from lldpd. A failure occured during callback processing Dec 15 17:21:19 teer lldpcli[30540]: an error occurred while executing last command Dec 15 17:21:19 teer lldpcli[30540]: unable to get configuration from lldpd. End of file reached Dec 15 17:21:19 teer lldpcli[30540]: an error occurred while executing last command Dec 15 17:21:19 teer systemd[1]: lldpd.service: Unit entered failed state. Dec 15 17:21:19 teer systemd[1]: lldpd.service: Failed with result 'signal'. Dec 15 17:21:20 teer systemd[1]: lldpd.service: Service hold-off time over, scheduling restart. Dec 15 17:21:20 teer systemd[1]: Stopped LLDP daemon. Dec 15 17:21:20 teer systemd[1]: Starting LLDP daemon... Dec 15 17:21:20 teer lldpd[30554]: unable to create control socket because it already exists Dec 15 17:21:20 teer lldpd[30554]: check if another instance is running Dec 15 17:21:20 teer systemd[1]: Started LLDP daemon. Dec 15 17:21:20 teer lldpd[30554]: unable to connect to socket /var/lib/run/lldpd.socket: Connection refused Dec 15 17:21:20 teer lldpd[30554]: old control socket is present, clean it Dec 15 17:21:20 teer lldpd[30554]: could not open either /etc/os-release or /usr/lib/os-release Dec 15 17:21:20 teer lldpcli[30555]: cannot find configuration file/directory /etc/lldpd.conf Dec 15 17:21:20 teer lldpd[30567]: protocol LLDP enabled Dec 15 17:21:20 teer lldpd[30567]: protocol CDPv1 disabled Dec 15 17:21:20 teer lldpd[30567]: protocol CDPv2 disabled Dec 15 17:21:20 teer lldpd[30567]: protocol SONMP disabled Dec 15 17:21:20 teer lldpd[30567]: protocol EDP disabled Dec 15 17:21:20 teer lldpd[30567]: protocol FDP disabled Dec 15 17:21:20 teer lldpd[30567]: libevent 2.0.21-stable-dev initialized with epoll method Dec 15 17:21:20 teer systemd[1]: lldpd.service: Main process exited, code=killed, status=31/SYS Dec 15 17:21:20 teer lldpcli[30555]: unable to get configuration from lldpd. A failure occured during callback processing Dec 15 17:21:20 teer lldpcli[30555]: an error occurred while executing last command Dec 15 17:21:20 teer lldpcli[30555]: unable to get configuration from lldpd. End of file reached Dec 15 17:21:20 teer lldpcli[30555]: an error occurred while executing last command Dec 15 17:21:20 teer systemd[1]: lldpd.service: Unit entered failed state. Dec 15 17:21:20 teer systemd[1]: lldpd.service: Failed with result 'signal'. Dec 15 17:21:20 teer systemd[1]: lldpd.service: Service hold-off time over, scheduling restart. Dec 15 17:21:20 teer systemd[1]: Stopped LLDP daemon. Dec 15 17:21:20 teer systemd[1]: Starting LLDP daemon... Dec 15 17:21:20 teer lldpd[30569]: unable to create control socket because it already exists Dec 15 17:21:20 teer lldpd[30569]: check if another instance is running Dec 15 17:21:20 teer systemd[1]: Started LLDP daemon. Dec 15 17:21:20 teer lldpd[30569]: unable to connect to socket /var/lib/run/lldpd.socket: Connection refused Dec 15 17:21:20 teer lldpd[30569]: old control socket is present, clean it Dec 15 17:21:20 teer lldpd[30569]: could not open either /etc/os-release or /usr/lib/os-release Dec 15 17:21:20 teer lldpcli[30570]: cannot find configuration file/directory /etc/lldpd.conf Dec 15 17:21:20 teer lldpd[30582]: protocol LLDP enabled Dec 15 17:21:20 teer lldpd[30582]: protocol CDPv1 disabled Dec 15 17:21:20 teer lldpd[30582]: protocol CDPv2 disabled Dec 15 17:21:20 teer lldpd[30582]: protocol SONMP disabled Dec 15 17:21:20 teer lldpd[30582]: protocol EDP disabled Dec 15 17:21:20 teer lldpd[30582]: protocol FDP disabled Dec 15 17:21:20 teer lldpd[30582]: libevent 2.0.21-stable-dev initialized with epoll method Dec 15 17:21:20 teer systemd[1]: lldpd.service: Main process exited, code=killed, status=31/SYS Dec 15 17:21:20 teer lldpcli[30570]: unable to get configuration from lldpd. A failure occured during callback processing Dec 15 17:21:20 teer lldpcli[30570]: an error occurred while executing last command Dec 15 17:21:20 teer lldpcli[30570]: unable to get configuration from lldpd. End of file reached Dec 15 17:21:20 teer lldpcli[30570]: an error occurred while executing last command Dec 15 17:21:20 teer systemd[1]: lldpd.service: Unit entered failed state. Dec 15 17:21:20 teer systemd[1]: lldpd.service: Failed with result 'signal'. Dec 15 17:21:20 teer systemd[1]: lldpd.service: Service hold-off time over, scheduling restart. Dec 15 17:21:20 teer systemd[1]: Stopped LLDP daemon. Dec 15 17:21:20 teer systemd[1]: Starting LLDP daemon... Dec 15 17:21:20 teer lldpd[30586]: unable to create control socket because it already exists Dec 15 17:21:20 teer lldpd[30586]: check if another instance is running Dec 15 17:21:20 teer lldpd[30586]: unable to connect to socket /var/lib/run/lldpd.socket: Connection refused Dec 15 17:21:20 teer systemd[1]: Started LLDP daemon. Dec 15 17:21:20 teer lldpd[30586]: old control socket is present, clean it Dec 15 17:21:20 teer lldpd[30586]: could not open either /etc/os-release or /usr/lib/os-release Dec 15 17:21:20 teer lldpcli[30587]: cannot find configuration file/directory /etc/lldpd.conf Dec 15 17:21:20 teer lldpd[30599]: protocol LLDP enabled Dec 15 17:21:20 teer lldpd[30599]: protocol CDPv1 disabled Dec 15 17:21:20 teer lldpd[30599]: protocol CDPv2 disabled Dec 15 17:21:20 teer lldpd[30599]: protocol SONMP disabled Dec 15 17:21:20 teer lldpd[30599]: protocol EDP disabled Dec 15 17:21:20 teer lldpd[30599]: protocol FDP disabled Dec 15 17:21:20 teer lldpd[30599]: libevent 2.0.21-stable-dev initialized with epoll method Dec 15 17:21:20 teer systemd[1]: lldpd.service: Main process exited, code=killed, status=31/SYS Dec 15 17:21:20 teer lldpcli[30587]: unable to get configuration from lldpd. A failure occured during callback processing Dec 15 17:21:20 teer lldpcli[30587]: an error occurred while executing last command Dec 15 17:21:20 teer lldpcli[30587]: unable to get configuration from lldpd. End of file reached Dec 15 17:21:20 teer lldpcli[30587]: an error occurred while executing last command Dec 15 17:21:20 teer systemd[1]: lldpd.service: Unit entered failed state. Dec 15 17:21:20 teer systemd[1]: lldpd.service: Failed with result 'signal'. Dec 15 17:21:20 teer systemd[1]: lldpd.service: Service hold-off time over, scheduling restart. Dec 15 17:21:20 teer systemd[1]: Stopped LLDP daemon. Dec 15 17:21:20 teer systemd[1]: lldpd.service: Start request repeated too quickly. Dec 15 17:21:20 teer systemd[1]: Failed to start LLDP daemon. Dec 15 17:21:20 teer systemd[1]: lldpd.service: Unit entered failed state. Dec 15 17:21:20 teer systemd[1]: lldpd.service: Failed with result 'start-limit'. =8<===================================================================== При попытке запустить sysv-инитскрипт получаем: =8<===================================================================== root@teer ~ # /etc/init.d/lldpd start Adjusting environment for lldpd: [ DONE ] Starting lldpd service: [ DONE ] root@teer ~ # /etc/init.d/lldpd status lldpd is dead, but subsystem is locked =8<===================================================================== К тому же, при запуске из под systemd и sysvinit используются разные аргументы для демона из /e/sysconfig/lldpd (DAEMON_ARGS и ARGS, соответственно). Т.е. поведение сервиса разное в зависимости от используемого инита.
в сизиф полетел 0.7.19-alt1. кроме версии посвежее исправлена в разнице в аргументах для systemd и sysv, исправлен путь к сокету (был почему-то /var/lib/run/lldpd.socket). подозрение, что валилось именно из-за пути к сокету. рабочего systemd пока под рукой нет, под ним проверить не могу. не закрываю, прошу проверить.
Created attachment 6462 [details] лог неудачного запуска Не помогло: =8<==================================================================== Dec 23 09:06:50 teer.kras.ru systemd[1]: Starting LLDP daemon... Dec 23 09:06:50 teer.kras.ru lldpd[24757]: unable to create control socket because it already exists Dec 23 09:06:50 teer.kras.ru lldpd[24757]: check if another instance is running Dec 23 09:06:50 teer.kras.ru lldpd[24757]: unable to connect to socket /var/run/lldpd.socket: Connection refused Dec 23 09:06:50 teer.kras.ru lldpd[24757]: old control socket is present, clean it Dec 23 09:06:50 teer.kras.ru lldpd[24757]: could not open either /etc/os-release or /usr/lib/os-release Dec 23 09:06:50 teer.kras.ru lldpd[24759]: protocol LLDP enabled Dec 23 09:06:50 teer.kras.ru lldpd[24759]: protocol CDPv1 enabled Dec 23 09:06:50 teer.kras.ru lldpcli[24758]: cannot find configuration file/directory /etc/lldpd.conf: No such file or directory Dec 23 09:06:50 teer.kras.ru lldpd[24759]: protocol CDPv2 enabled Dec 23 09:06:50 teer.kras.ru lldpd[24759]: protocol SONMP disabled Dec 23 09:06:50 teer.kras.ru lldpd[24759]: protocol EDP disabled Dec 23 09:06:50 teer.kras.ru lldpd[24759]: protocol FDP disabled Dec 23 09:06:50 teer.kras.ru lldpd[24759]: libevent 2.0.21-stable-dev initialized with epoll method Dec 23 09:06:50 teer.kras.ru systemd[1]: Started LLDP daemon. Dec 23 09:06:50 teer.kras.ru systemd[1]: lldpd.service: Main process exited, code=killed, status=31/SYS Dec 23 09:06:50 teer.kras.ru systemd[1]: lldpd.service: Unit entered failed state. Dec 23 09:06:50 teer.kras.ru systemd[1]: lldpd.service: Failed with result 'signal'. Dec 23 09:06:50 teer.kras.ru systemd[1]: lldpd.service: Service hold-off time over, scheduling restart. Dec 23 09:06:50 teer.kras.ru systemd[1]: Stopped LLDP daemon. Dec 23 09:06:50 teer.kras.ru systemd[1]: Starting LLDP daemon... Dec 23 09:06:50 teer.kras.ru lldpd[24761]: unable to create control socket because it already exists Dec 23 09:06:50 teer.kras.ru lldpd[24761]: check if another instance is running Dec 23 09:06:50 teer.kras.ru systemd[1]: Started LLDP daemon. Dec 23 09:06:50 teer.kras.ru lldpd[24761]: unable to connect to socket /var/run/lldpd.socket: Connection refused Dec 23 09:06:50 teer.kras.ru lldpd[24761]: old control socket is present, clean it Dec 23 09:06:50 teer.kras.ru lldpd[24761]: could not open either /etc/os-release or /usr/lib/os-release Dec 23 09:06:50 teer.kras.ru lldpd[24763]: protocol LLDP enabled Dec 23 09:06:50 teer.kras.ru lldpd[24763]: protocol CDPv1 enabled Dec 23 09:06:50 teer.kras.ru lldpd[24763]: protocol CDPv2 enabled Dec 23 09:06:50 teer.kras.ru lldpd[24763]: protocol SONMP disabled Dec 23 09:06:50 teer.kras.ru lldpd[24763]: protocol EDP disabled Dec 23 09:06:50 teer.kras.ru lldpd[24763]: protocol FDP disabled Dec 23 09:06:50 teer.kras.ru lldpd[24763]: libevent 2.0.21-stable-dev initialized with epoll method Dec 23 09:06:50 teer.kras.ru lldpcli[24762]: cannot find configuration file/directory /etc/lldpd.conf: No such file or directory Dec 23 09:06:50 teer.kras.ru systemd[1]: lldpd.service: Main process exited, code=killed, status=31/SYS Dec 23 09:06:50 teer.kras.ru systemd[1]: lldpd.service: Unit entered failed state. Dec 23 09:06:50 teer.kras.ru systemd[1]: lldpd.service: Failed with result 'signal'. Dec 23 09:06:51 teer.kras.ru systemd[1]: lldpd.service: Service hold-off time over, scheduling restart. Dec 23 09:06:51 teer.kras.ru systemd[1]: Stopped LLDP daemon. Dec 23 09:06:51 teer.kras.ru systemd[1]: Starting LLDP daemon... Dec 23 09:06:51 teer.kras.ru lldpd[24766]: unable to create control socket because it already exists Dec 23 09:06:51 teer.kras.ru lldpd[24766]: check if another instance is running Dec 23 09:06:51 teer.kras.ru systemd[1]: Started LLDP daemon. Dec 23 09:06:51 teer.kras.ru lldpd[24766]: unable to connect to socket /var/run/lldpd.socket: Connection refused Dec 23 09:06:51 teer.kras.ru lldpd[24766]: old control socket is present, clean it Dec 23 09:06:51 teer.kras.ru lldpd[24766]: could not open either /etc/os-release or /usr/lib/os-release Dec 23 09:06:51 teer.kras.ru lldpd[24768]: protocol LLDP enabled Dec 23 09:06:51 teer.kras.ru systemd[1]: lldpd.service: Main process exited, code=killed, status=31/SYS Dec 23 09:06:51 teer.kras.ru systemd[1]: lldpd.service: Unit entered failed state. Dec 23 09:06:51 teer.kras.ru systemd[1]: lldpd.service: Failed with result 'signal'. Dec 23 09:06:51 teer.kras.ru systemd[1]: lldpd.service: Service hold-off time over, scheduling restart. Dec 23 09:06:51 teer.kras.ru systemd[1]: Stopped LLDP daemon. Dec 23 09:06:51 teer.kras.ru systemd[1]: Starting LLDP daemon... Dec 23 09:06:51 teer.kras.ru lldpd[24770]: unable to create control socket because it already exists Dec 23 09:06:51 teer.kras.ru lldpd[24770]: check if another instance is running Dec 23 09:06:51 teer.kras.ru lldpd[24770]: unable to connect to socket /var/run/lldpd.socket: Connection refused Dec 23 09:06:51 teer.kras.ru systemd[1]: Started LLDP daemon. Dec 23 09:06:51 teer.kras.ru lldpd[24770]: old control socket is present, clean it Dec 23 09:06:51 teer.kras.ru lldpd[24770]: could not open either /etc/os-release or /usr/lib/os-release Dec 23 09:06:51 teer.kras.ru lldpd[24772]: protocol LLDP enabled Dec 23 09:06:51 teer.kras.ru lldpd[24772]: protocol CDPv1 enabled Dec 23 09:06:51 teer.kras.ru lldpd[24772]: protocol CDPv2 enabled Dec 23 09:06:51 teer.kras.ru lldpd[24772]: protocol SONMP disabled Dec 23 09:06:51 teer.kras.ru lldpd[24772]: protocol EDP disabled Dec 23 09:06:51 teer.kras.ru lldpd[24772]: protocol FDP disabled Dec 23 09:06:51 teer.kras.ru lldpd[24772]: libevent 2.0.21-stable-dev initialized with epoll method Dec 23 09:06:51 teer.kras.ru lldpcli[24771]: cannot find configuration file/directory /etc/lldpd.conf: No such file or directory Dec 23 09:06:51 teer.kras.ru systemd[1]: lldpd.service: Main process exited, code=killed, status=31/SYS Dec 23 09:06:51 teer.kras.ru systemd[1]: lldpd.service: Unit entered failed state. Dec 23 09:06:51 teer.kras.ru systemd[1]: lldpd.service: Failed with result 'signal'. Dec 23 09:06:51 teer.kras.ru systemd[1]: lldpd.service: Service hold-off time over, scheduling restart. Dec 23 09:06:51 teer.kras.ru systemd[1]: Stopped LLDP daemon. Dec 23 09:06:51 teer.kras.ru systemd[1]: Starting LLDP daemon... Dec 23 09:06:51 teer.kras.ru lldpd[24775]: unable to create control socket because it already exists Dec 23 09:06:51 teer.kras.ru lldpd[24775]: check if another instance is running Dec 23 09:06:51 teer.kras.ru lldpd[24775]: unable to connect to socket /var/run/lldpd.socket: Connection refused Dec 23 09:06:51 teer.kras.ru lldpd[24775]: old control socket is present, clean it Dec 23 09:06:51 teer.kras.ru systemd[1]: Started LLDP daemon. Dec 23 09:06:51 teer.kras.ru lldpd[24775]: could not open either /etc/os-release or /usr/lib/os-release Dec 23 09:06:51 teer.kras.ru lldpcli[24776]: cannot find configuration file/directory /etc/lldpd.conf: No such file or directory Dec 23 09:06:51 teer.kras.ru lldpd[24777]: protocol LLDP enabled Dec 23 09:06:51 teer.kras.ru lldpd[24777]: protocol CDPv1 enabled Dec 23 09:06:51 teer.kras.ru lldpd[24777]: protocol CDPv2 enabled Dec 23 09:06:51 teer.kras.ru lldpd[24777]: protocol SONMP disabled Dec 23 09:06:51 teer.kras.ru lldpd[24777]: protocol EDP disabled Dec 23 09:06:51 teer.kras.ru lldpd[24777]: protocol FDP disabled Dec 23 09:06:51 teer.kras.ru lldpd[24777]: libevent 2.0.21-stable-dev initialized with epoll method Dec 23 09:06:51 teer.kras.ru systemd[1]: lldpd.service: Main process exited, code=killed, status=31/SYS Dec 23 09:06:51 teer.kras.ru systemd[1]: lldpd.service: Unit entered failed state. Dec 23 09:06:51 teer.kras.ru systemd[1]: lldpd.service: Failed with result 'signal'. Dec 23 09:06:51 teer.kras.ru systemd[1]: lldpd.service: Service hold-off time over, scheduling restart. Dec 23 09:06:51 teer.kras.ru systemd[1]: Stopped LLDP daemon. Dec 23 09:06:51 teer.kras.ru systemd[1]: lldpd.service: Start request repeated too quickly. Dec 23 09:06:51 teer.kras.ru systemd[1]: Failed to start LLDP daemon. Dec 23 09:06:51 teer.kras.ru systemd[1]: lldpd.service: Unit entered failed state. Dec 23 09:06:51 teer.kras.ru systemd[1]: lldpd.service: Failed with result 'start-limit'. Dec 23 09:06:59 teer.kras.ru systemd[1]: Stopped LLDP daemon. =8<====================================================================
Да ты крут, парень! У меня вообще не пускается! README.conf его в качестве конфига не устраивает, а инструкций или документации по lldpd.conf ВООБЩЕ НЕТ!!!!!!!!! Алё, поддержка! Дайте хоть ОДИН конф файл или доку по нему! Ссылок на сайт в RPM.spec тоже нет! В инете сплошное убожество.
Наверное, по большому счёту оно и не нужно, т.к. все современные серверы уже идут с systemd-networkd, в который встроен клиент lldp. Но дело чести :-)
Насчёт дел чести. Для того чтобы собрать последнюю версию lldpd = 0.9.4 необходима последняя версия libjson-devel из git (git clone https://github.com/json-c/json-c.git). Одна проблема - не хочется возиться со сборкой - там ошибки именно при сборке rpm. В стандартной libjson 0.10 нет функции json_object_object_length. Потому пишу ещё ошибку по libjson, точнее, о необходимости её обновления.
Created attachment 6751 [details] bash-completion для lldpd bash completion для lldpd.
Created attachment 6752 [details] zsh completion для lldpd
Created attachment 6753 [details] lldpd devel
Created attachment 6754 [details] lldpd debuginfo
Created attachment 6755 [details] lldpd 0.9.4
Здесь собранный lldpd 0.9.4 и иже с ним (пакеты ему сопутствующие).
А вот как всунуть lldpd src rpm не знаю! Орёт большой файл, хотя всего 1.62 MB.
Эх, не успел Андрей засунуть спек...
проверьте версию 1.0.1-alt1.S1 в сизифе.
Спасибо, теперь пакет рабочий из каробки.