In wich directory have you launched this command ?
As librenms user or root ?
Tried : composer dump-autoload
librenms@supervision:~$ composer dump-autoload
PHP Deprecated: Return type of Symfony\Component\Console\Helper\HelperSet::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/share/php/Symfony/Component/Console/Helper/HelperSet.php on line 103
Deprecated: Return type of Symfony\Component\Console\Helper\HelperSet::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/share/php/Symfony/Component/Console/Helper/HelperSet.php on line 103
Deprecation Notice: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in /usr/share/php/JsonSchema/Constraints/Constraint.php:48
Deprecation Notice: Return type of Composer\Repository\ArrayRepository::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/share/php/Composer/Repository/ArrayRepository.php:277
Deprecation Notice: Return type of Symfony\Component\Process\Process::getIterator($flags = 0) should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/share/php/Symfony/Component/Process/Process.php:622
Deprecation Notice: Return type of Composer\Repository\ArrayRepository::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/share/php/Composer/Repository/ArrayRepository.php:277
Deprecation Notice: Return type of Composer\Repository\ArrayRepository::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/share/php/Composer/Repository/ArrayRepository.php:277
Generating optimized autoload files
Deprecation Notice: Return type of Symfony\Component\Finder\Finder::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/share/php/Symfony/Component/Finder/Finder.php:620
Deprecation Notice: Return type of Symfony\Component\Finder\Finder::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/share/php/Symfony/Component/Finder/Finder.php:701
Deprecation Notice: Return type of Symfony\Component\Finder\Iterator\FileTypeFilterIterator::accept() should either be compatible with FilterIterator::accept(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/share/php/Symfony/Component/Finder/Iterator/FileTypeFilterIterator.php:42
Deprecation Notice: Return type of Symfony\Component\Finder\Iterator\RecursiveDirectoryIterator::getChildren() should either be compatible with RecursiveDirectoryIterator::getChildren(): RecursiveDirectoryIterator, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/share/php/Symfony/Component/Finder/Iterator/RecursiveDirectoryIterator.php:85
Deprecation Notice: Return type of Symfony\Component\Finder\Iterator\RecursiveDirectoryIterator::rewind() should either be compatible with FilesystemIterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/share/php/Symfony/Component/Finder/Iterator/RecursiveDirectoryIterator.php:113
Deprecation Notice: Return type of Symfony\Component\Finder\Iterator\RecursiveDirectoryIterator::current() should either be compatible with FilesystemIterator::current(): SplFileInfo|FilesystemIterator|string, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/share/php/Symfony/Component/Finder/Iterator/RecursiveDirectoryIterator.php:61
Deprecation Notice: Return type of Symfony\Component\Finder\Iterator\ExcludeDirectoryFilterIterator::accept() should either be compatible with FilterIterator::accept(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/share/php/Symfony/Component/Finder/Iterator/ExcludeDirectoryFilterIterator.php:55
Deprecation Notice: Return type of Symfony\Component\Finder\Iterator\ExcludeDirectoryFilterIterator::hasChildren() should either be compatible with RecursiveIterator::hasChildren(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/share/php/Symfony/Component/Finder/Iterator/ExcludeDirectoryFilterIterator.php:74
Deprecation Notice: Return type of Symfony\Component\Finder\Iterator\ExcludeDirectoryFilterIterator::getChildren() should either be compatible with RecursiveIterator::getChildren(): ?RecursiveIterator, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/share/php/Symfony/Component/Finder/Iterator/ExcludeDirectoryFilterIterator.php:79
Deprecation Notice: Return type of Symfony\Component\Finder\Iterator\FilenameFilterIterator::accept() should either be compatible with FilterIterator::accept(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/share/php/Symfony/Component/Finder/Iterator/FilenameFilterIterator.php:28
Deprecation Notice: Return type of Symfony\Component\Finder\Iterator\PathFilterIterator::accept() should either be compatible with FilterIterator::accept(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/share/php/Symfony/Component/Finder/Iterator/PathFilterIterator.php:27
Do not edit the wrapper file⊠replace âcomposerâ in commands like this ./scripts/composer_wrapper.php dump-autoload that will use LibreNMSâ bundled composer instead of your system one, which is broken. You may want to apt remove composer (or whatever for your os)
If you suspect there is a problem with your dependencies, you can re-install them:
Something strange on this :
root@supervision:~# systemctl restart php8.1-fpm
Job for php8.1-fpm.service failed because the control process exited with error code.
See âsystemctl status php8.1-fpm.serviceâ and âjournalctl -xeâ for details.
oct. 26 00:31:19 supervision php-fpm8.1[2289]: [26-Oct-2022 00:31:19] ERROR: Another FPM instance seems to already listen on /run/php-fpm-librenms.sock
oct. 26 00:31:19 supervision php-fpm8.1[2289]: [26-Oct-2022 00:31:19] ERROR: FPM initialization failed
oct. 26 00:31:19 supervision systemd[1]: php8.1-fpm.service: Main process exited, code=exited, status=78/CONFIG
ââ Subject: Unit process exited
ââ Defined-By: systemd
ââ Support: Debian -- User Support
ââ
ââ An ExecStart= process belonging to unit php8.1-fpm.service has exited.
ââ
ââ The processâ exit code is âexitedâ and its exit status is 78.
oct. 26 00:31:19 supervision systemd[1]: php8.1-fpm.service: Failed with result âexit-codeâ.
ââ Subject: Unit failed
ââ Defined-By: systemd
ââ Support: Debian -- User Support
ââ
ââ The unit php8.1-fpm.service has entered the âfailedâ state with result âexit-codeâ.
oct. 26 00:31:19 supervision systemd[1]: Failed to start The PHP 8.1 FastCGI Process Manager.
root@supervision:~# ps aux | grep php root 437 0.0 0.7 222572 30904 ? Ss 00:25 0:00 php-fpm: master process (/etc/php/7.4/fpm/php-fpm.conf)
librenms 521 0.0 0.3 222956 15556 ? S 00:25 0:00 php-fpm: pool librenms
librenms 522 0.0 0.4 222956 17336 ? S 00:25 0:00 php-fpm: pool librenms
librenms 4174 0.0 0.0 2484 572 ? S 00:35 0:00 /bin/sh -c /usr/bin/env php /opt/librenms/discovery.php -h 2
librenms 4176 23.0 1.6 139368 65544 ? S 00:35 0:00 php /opt/librenms/discovery.php -h 2
root 4293 0.0 0.0 6284 696 pts/0 S+ 00:35 0:00 grep php
For debian 11 i have updated like this:
wget -qO - https://packages.sury.org/php/apt.gpg | sudo apt-key add -
apt update
apt install php8.1-{common,bcmath,bz2,intl,gd,mbstring,mysql,zip,cli,fpm,pdo,mbstring,curl,xml,imagick,tidy,xmlrpc,dev,imap,opcache,soap} -y
After that i have debug my php7.4-fpm issue that was always installed so i remove php7.4-fpm
i have removed composer also ( apt remove composer) and reinstall it like murrant suggested as librenms user: ./scripts/composer_wrapper.php install --no-dev