I'm trying to upgrade from 1.63-57-g0040f38 on ubuntu 16 LTS (32bit) - more details at github issue #13145

Working version on ubuntu 16LTS,

i have the following on .env file, but still the same issue.
APP_URL=http://localhost

Then upgraded ubuntu to 18 LTS, resulting more issues.
php module7.4 is enabled and apache restarted.

On browser it says "Composer detected issues in your platform: Your Composer dependencies require a PHP version “>= 7.3.0”.

And i’m not even sure if librenms is collecting data in the background.

====================================
Ubuntu 16LTS
====================================

$ ./validate.php
====================================
Component | Version
--------- | -------
LibreNMS  | 1.63-57-g0040f38
DB Schema | 2020_04_19_010532_eventlog_sensor_reference_cleanup (164)
PHP       | 7.2.29-1+ubuntu16.04.1+deb.sury.org+1
Python    | 3.5.2
MySQL     | 10.0.38-MariaDB-0ubuntu0.16.04.1
RRDTool   | 1.5.5
SNMP      | NET-SNMP 5.7.3
====================================

[OK]    Composer Version: 2.1.5
[OK]    Dependencies up-to-date.
[OK]    Database connection successful
[OK]    Database schema correct
[WARN]  Your install is over 24 hours out of date, last update: Tue, 30 Jun 2020 14:09:39 +0000
	[FIX]: 
	Make sure your daily.sh cron is running and run ./daily.sh by hand to see if there are any errors.
[WARN]  Your local git branch is not master, this will prevent automatic updates.
	[FIX]: 
	You can switch back to master with git checkout master
$ git checkout master
Checking out files: 100% (8233/8233), done.
Switched to branch 'master'
Your branch is up-to-date with 'composer/master'.

$ ./daily.sh

In Request.php line 329:
                                                                                                                                                                                                              
  Argument 1 passed to Symfony\Component\HttpFoundation\Request::create() must be of the type string, null given, called in /opt/librenms/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/SetRe  
  questForConsole.php on line 32                                                                                                                                                                              
                                                                                                                                                                                                              

Updating SQL-Schema                                OK
Cleaning up DB                                     OK

In Request.php line 329:
                                                                                                                                                                                                              
  Argument 1 passed to Symfony\Component\HttpFoundation\Request::create() must be of the type string, null given, called in /opt/librenms/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/SetRe  
  questForConsole.php on line 32                                                                                                                                                                              
                                                                                                                                                                                                              

$
====================================
Ubuntu 18 LTS
====================================
$ git pull
Updating e9c89b377..bc56f94f8

output manually removed, will provide if required.
$ ./daily.sh

In PackageManifest.php line 122:

  Undefined index: name


Updating SQL-Schema                                OK
Cleaning up DB                                     OK

In PackageManifest.php line 122:

  Undefined index: name
$ ./validate.php
====================================
Component | Version
--------- | -------
LibreNMS  | 21.7.0-80-gbc56f94f8
DB Schema | Not Connected (0)
PHP       | 7.4.22
Python    | 3.6.9
MySQL     | ?
RRDTool   | 1.7.0
SNMP      | NET-SNMP 5.7.3
====================================

[OK]    Composer Version: 2.1.6
[FAIL]  Missing dependencies!
	[FIX]:
	/opt/librenms/scripts/composer_wrapper.php install --no-dev
	Dependencies:
	 doctrine/deprecations
	 webmozart/assert
	 voku/portable-ascii
	 symfony/polyfill-php80
	 graham-campbell/result-type
	 symfony/deprecation-contracts
	 symfony/polyfill-intl-normalizer
	 symfony/http-client-contracts
	 psr/event-dispatcher
	 symfony/polyfill-intl-grapheme
	 symfony/string
	 ramsey/collection
	 brick/math
	 league/mime-type-detection
	 league/commonmark
	  and 13 more...
$ ./scripts/composer_wrapper.php install --no-dev
> LibreNMS\ComposerHelper::preInstall
Installing dependencies from lock file
Verifying lock file contents can be installed on current platform.
Package operations: 28 installs, 62 updates, 11 removals
  - Downloading amenadiel/jpgraph (3.6.14)
  - Downloading clue/socket-raw (v1.5.0)
  - Downloading dapphp/radius (2.5.5)
  - Downloading doctrine/deprecations (v0.5.3)
  - Downloading doctrine/cache (2.0.3)
  - Downloading doctrine/dbal (2.13.2)
  - Downloading symfony/polyfill-ctype (v1.23.0)
  - Downloading webmozart/assert (1.10.0)
  - Downloading dragonmantank/cron-expression (v3.1.0)
  - Downloading voku/portable-ascii (1.5.6)
  - Downloading symfony/polyfill-php80 (v1.23.0)
  - Downloading symfony/polyfill-mbstring (v1.23.0)
  - Downloading graham-campbell/result-type (v1.0.1)
  - Downloading vlucas/phpdotenv (v5.3.0)
  - Downloading symfony/css-selector (v5.3.0)
  - Downloading symfony/var-dumper (v5.3.3)
  - Downloading symfony/deprecation-contracts (v2.4.0)
  - Downloading symfony/routing (v5.3.0)
  - Downloading symfony/process (v5.3.2)
  - Downloading symfony/polyfill-php72 (v1.23.0)
  - Downloading symfony/polyfill-intl-normalizer (v1.23.0)
  - Downloading symfony/polyfill-intl-idn (v1.23.0)
  - Downloading symfony/mime (v5.3.2)
  - Downloading symfony/polyfill-php73 (v1.23.0)
  - Downloading symfony/http-foundation (v5.3.3)
  - Downloading symfony/http-client-contracts (v2.4.0)
  - Downloading symfony/event-dispatcher-contracts (v2.4.0)
  - Downloading symfony/event-dispatcher (v5.3.0)
  - Downloading psr/log (1.1.4)
  - Downloading symfony/error-handler (v5.3.3)
  - Downloading symfony/http-kernel (v5.3.3)
  - Downloading symfony/finder (v5.3.0)
  - Downloading symfony/polyfill-intl-grapheme (v1.23.0)
  - Downloading symfony/string (v5.3.3)
  - Downloading psr/container (1.1.1)
  - Downloading symfony/service-contracts (v2.4.0)
  - Downloading symfony/console (v5.3.2)
  - Downloading symfony/polyfill-iconv (v1.23.0)
  - Downloading egulias/email-validator (2.1.25)
  - Downloading swiftmailer/swiftmailer (v6.2.7)
  - Downloading ramsey/collection (1.1.3)
  - Downloading brick/math (0.9.2)
  - Downloading opis/closure (3.6.2)
  - Downloading symfony/translation-contracts (v2.4.0)
  - Downloading symfony/translation (v5.3.3)
  - Downloading nesbot/carbon (2.50.0)
  - Downloading monolog/monolog (2.3.0)
  - Downloading league/mime-type-detection (1.7.0)
  - Downloading league/flysystem (1.1.4)
  - Downloading league/commonmark (1.6.5)
  - Downloading laravel/framework (v8.49.2)
  - Downloading fico7489/laravel-pivot (3.0.7)
  - Downloading fideloper/proxy (4.4.1)
  - Downloading asm89/stack-cors (v2.0.3)
  - Downloading fruitcake/laravel-cors (v2.0.4)
  - Downloading jenssegers/model (v1.4.0)
  - Downloading genealabs/laravel-caffeine (8.0.0)
  - Downloading guzzlehttp/promises (1.4.1)
  - Downloading psr/http-factory (1.0.1)
  - Downloading guzzlehttp/psr7 (2.0.0)
  - Downloading psr/http-client (1.0.1)
  - Downloading guzzlehttp/guzzle (7.3.0)
  - Downloading influxdb/influxdb-php (1.15.2)
  - Downloading justinrainbow/json-schema (5.2.11)
  - Downloading nikic/php-parser (v4.11.0)
  - Downloading psy/psysh (v0.10.8)
  - Downloading laravel/tinker (v2.6.1)
  - Downloading laravel/ui (v3.3.0)
  - Downloading nunomaduro/laravel-console-summary (v1.7.1)
  - Downloading pear/net_dns2 (v1.5.2)
  - Downloading paragonie/random_compat (v9.99.100)
  - Downloading paragonie/constant_time_encoding (v2.4.0)
  - Downloading phpseclib/phpseclib (3.0.9)
  - Downloading php-amqplib/php-amqplib (v3.0.0)
  - Downloading phpmailer/phpmailer (v6.5.0)
  - Downloading predis/predis (v1.1.7)
  - Downloading rmccue/requests (v1.8.1)
  - Downloading symfony/yaml (v4.4.26)
  - Downloading tecnickcom/tcpdf (6.4.1)
  - Downloading tightenco/ziggy (0.9.4)
  - Downloading wpb/string-blade-compiler (6.0.3)
  - Removing xjtuwangke/passwordhash (dev-master a7bcd97)
  - Removing symfony/dotenv (v3.4.39)
  - Removing symfony/debug (v4.4.7)
  - Removing spatie/laravel-cors (1.3.3)
  - Removing martinlindhe/laravel-vue-i18n-generator (0.1.46)
  - Removing laravel/laravel (v5.8.35)
  - Removing jakub-onderka/php-console-highlighter (v0.4)
  - Removing jakub-onderka/php-console-color (v0.2)
  - Removing erusev/parsedown (1.7.4)
  - Removing dnoegel/php-xdg-base-dir (v0.1.1)
  - Removing darkghosthunter/larapoke (v3.1.0)
  - Downgrading amenadiel/jpgraph (3.6.21 => 3.6.14): Extracting archive
  - Upgrading clue/socket-raw (v1.4.1 => v1.5.0): Extracting archive
  - Upgrading dapphp/radius (2.5.4 => 2.5.5): Extracting archive
  - Upgrading doctrine/event-manager (1.1.0 => 1.1.1): Extracting archive
  - Installing doctrine/deprecations (v0.5.3): Extracting archive
  - Upgrading doctrine/cache (1.10.0 => 2.0.3): Extracting archive
  - Upgrading doctrine/dbal (v2.9.3 => 2.13.2): Extracting archive
  - Upgrading doctrine/inflector (1.3.1 => 2.0.3): Extracting archive
  - Upgrading doctrine/lexer (1.0.2 => 1.2.1): Extracting archive
  - Upgrading symfony/polyfill-ctype (v1.15.0 => v1.23.0): Extracting archive
  - Installing webmozart/assert (1.10.0): Extracting archive
  - Upgrading dragonmantank/cron-expression (v2.3.0 => v3.1.0): Extracting archive
  - Upgrading ezyang/htmlpurifier (v4.12.0 => v4.13.0): Extracting archive
  - Installing voku/portable-ascii (1.5.6): Extracting archive
  - Installing symfony/polyfill-php80 (v1.23.0): Extracting archive
  - Upgrading symfony/polyfill-mbstring (v1.15.0 => v1.23.0): Extracting archive
  - Upgrading phpoption/phpoption (1.7.3 => 1.7.5): Extracting archive
  - Installing graham-campbell/result-type (v1.0.1): Extracting archive
  - Upgrading vlucas/phpdotenv (v3.6.2 => v5.3.0): Extracting archive
  - Upgrading symfony/css-selector (v4.4.7 => v5.3.0): Extracting archive
  - Upgrading tijsverkoyen/css-to-inline-styles (2.2.2 => 2.2.3): Extracting archive
  - Upgrading symfony/var-dumper (v4.4.7 => v5.3.3): Extracting archive
  - Installing symfony/deprecation-contracts (v2.4.0): Extracting archive
  - Upgrading symfony/routing (v4.4.7 => v5.3.0): Extracting archive
  - Upgrading symfony/process (v4.4.7 => v5.3.2): Extracting archive
  - Upgrading symfony/polyfill-php72 (v1.15.0 => v1.23.0): Extracting archive
  - Installing symfony/polyfill-intl-normalizer (v1.23.0): Extracting archive
  - Upgrading symfony/polyfill-intl-idn (v1.15.0 => v1.23.0): Extracting archive
  - Upgrading symfony/mime (v4.4.7 => v5.3.2): Extracting archive
  - Upgrading symfony/polyfill-php73 (v1.15.0 => v1.23.0): Extracting archive
  - Upgrading symfony/http-foundation (v4.4.7 => v5.3.3): Extracting archive
  - Installing symfony/http-client-contracts (v2.4.0): Extracting archive
  - Installing psr/event-dispatcher (1.0.0): Extracting archive
  - Upgrading symfony/event-dispatcher-contracts (v1.1.7 => v2.4.0): Extracting archive
  - Upgrading symfony/event-dispatcher (v4.4.7 => v5.3.0): Extracting archive
  - Upgrading psr/log (1.1.3 => 1.1.4): Extracting archive
  - Upgrading symfony/error-handler (v4.4.7 => v5.3.3): Extracting archive
  - Upgrading symfony/http-kernel (v4.4.7 => v5.3.3): Extracting archive
  - Upgrading symfony/finder (v4.4.7 => v5.3.0): Extracting archive
  - Installing symfony/polyfill-intl-grapheme (v1.23.0): Extracting archive
  - Installing symfony/string (v5.3.3): Extracting archive
  - Upgrading psr/container (1.0.0 => 1.1.1): Extracting archive
  - Upgrading symfony/service-contracts (v1.1.8 => v2.4.0): Extracting archive
  - Upgrading symfony/console (v4.4.7 => v5.3.2): Extracting archive
  - Upgrading symfony/polyfill-iconv (v1.15.0 => v1.23.0): Extracting archive
  - Upgrading egulias/email-validator (2.1.17 => 2.1.25): Extracting archive
  - Upgrading swiftmailer/swiftmailer (v6.2.3 => v6.2.7): Extracting archive
  - Installing ramsey/collection (1.1.3): Extracting archive
  - Installing brick/math (0.9.2): Extracting archive
  - Upgrading ramsey/uuid (3.9.3 => 4.1.1): Extracting archive
  - Upgrading opis/closure (3.5.1 => 3.6.2): Extracting archive
  - Upgrading symfony/translation-contracts (v1.1.7 => v2.4.0): Extracting archive
  - Upgrading symfony/translation (v4.4.7 => v5.3.3): Extracting archive
  - Upgrading nesbot/carbon (2.32.2 => 2.50.0): Extracting archive
  - Upgrading monolog/monolog (1.25.3 => 2.3.0): Extracting archive
  - Installing league/mime-type-detection (1.7.0): Extracting archive
  - Upgrading league/flysystem (1.0.66 => 1.1.4): Extracting archive
  - Installing league/commonmark (1.6.5): Extracting archive
  - Upgrading laravel/framework (v5.8.37 => v8.49.2): Extracting archive
  - Upgrading fico7489/laravel-pivot (3.0.4 => 3.0.7): Extracting archive
  - Upgrading fideloper/proxy (4.3.0 => 4.4.1): Extracting archive
  - Installing asm89/stack-cors (v2.0.3): Extracting archive
  - Installing fruitcake/laravel-cors (v2.0.4): Extracting archive
  - Installing jenssegers/model (v1.4.0): Extracting archive
  - Installing genealabs/laravel-caffeine (8.0.0): Extracting archive
  - Upgrading guzzlehttp/promises (v1.3.1 => 1.4.1): Extracting archive
  - Installing psr/http-factory (1.0.1): Extracting archive
  - Upgrading guzzlehttp/psr7 (1.6.1 => 2.0.0): Extracting archive
  - Installing psr/http-client (1.0.1): Extracting archive
  - Upgrading guzzlehttp/guzzle (6.5.2 => 7.3.0): Extracting archive
  - Upgrading influxdb/influxdb-php (1.15.0 => 1.15.2): Extracting archive
  - Installing justinrainbow/json-schema (5.2.11): Extracting archive
  - Upgrading nikic/php-parser (v4.3.0 => v4.11.0): Extracting archive
  - Upgrading psy/psysh (v0.9.12 => v0.10.8): Extracting archive
  - Upgrading laravel/tinker (v1.0.10 => v2.6.1): Extracting archive
  - Installing laravel/ui (v3.3.0): Extracting archive
  - Installing librenms/laravel-vue-i18n-generator (0.1.47): Extracting archive
  - Installing nunomaduro/laravel-console-summary (v1.7.1): Extracting archive
  - Installing pear/net_dns2 (v1.5.2): Extracting archive
  - Upgrading paragonie/random_compat (v9.99.99 => v9.99.100): Extracting archive
  - Installing paragonie/constant_time_encoding (v2.4.0): Extracting archive
  - Upgrading phpseclib/phpseclib (2.0.26 => 3.0.9): Extracting archive
  - Upgrading php-amqplib/php-amqplib (v2.11.1 => v3.0.0): Extracting archive
  - Upgrading phpmailer/phpmailer (v6.1.5 => v6.5.0): Extracting archive
  - Installing predis/predis (v1.1.7): Extracting archive
  - Upgrading rmccue/requests (v1.7.0 => v1.8.1): Extracting archive
  - Upgrading symfony/yaml (v4.4.7 => v4.4.26): Extracting archive
  - Upgrading tecnickcom/tcpdf (6.2.26 => 6.4.1): Extracting archive
  - Upgrading tightenco/ziggy (v0.7.1 => 0.9.4): Extracting archive
  - Upgrading wpb/string-blade-compiler (3.8.x-dev b3e340b => 6.0.3): Extracting archive
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi

In Request.php line 334:

  Argument 1 passed to Symfony\Component\HttpFoundation\Request::create() mus
  t be of the type string, null given, called in /opt/librenms/vendor/laravel
  /framework/src/Illuminate/Foundation/Bootstrap/SetRequestForConsole.php on
  line 32


Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1
$
$ ./validate.php

In Request.php line 334:

  Argument 1 passed to Symfony\Component\HttpFoundation\Request::create() mus
  t be of the type string, null given, called in /opt/librenms/vendor/laravel
  /framework/src/Illuminate/Foundation/Bootstrap/SetRequestForConsole.php on
  line 32


====================================
Component | Version
--------- | -------
LibreNMS  | 21.7.0-80-gbc56f94f8
DB Schema | Not Connected (0)
PHP       | 7.4.22
Python    | 3.6.9
MySQL     | ?
RRDTool   | 1.7.0
SNMP      | NET-SNMP 5.7.3
====================================

[OK]    Composer Version: 2.1.6
[OK]    Dependencies up-to-date.
$
$

Any help to fix the issue is deeply appreciated.

Thanks,

  1. Delete the folder vendor
  2. Run php -v and make sure it says 7.3 at least (7.4 is more future proof)
  3. Check .env and set APP_URL= to your sites url
  4. Run find /opt/librenms/bootstrap/cache/ -name "*.php" -type f -delete
  5. Run ./scripts/composer_wrapper.php install --no-dev
  6. Run .daily.sh

PS, You would use 20.04 at least to start with, then you dont need to install so many third party packages.

Thank you very much, after running ./daily.sh and ./validate.php, it warned to fix Mariadb minimum version with ./lnms migrate.
after fixing ownership and other things, i ran ./lnms and getting the following error.

$ ./daily.sh
Updating SQL-Schema                                OK
Cleaning up DB                                     OK
$ 
$ 
$ ./validate.php
====================================
Component | Version
--------- | -------
LibreNMS  | 21.7.0-80-gbc56f94f8
DB Schema | 2020_08_28_212054_drop_uptime_column_outages (174)
PHP       | 7.4.22
Python    | 3.6.9
MySQL     | 10.1.48-MariaDB-0ubuntu0.18.04.1
RRDTool   | 1.7.0
SNMP      | NET-SNMP 5.7.3
====================================

[OK]    Composer Version: 2.1.6
[OK]    Dependencies up-to-date.
[OK]    Database connection successful
[FAIL]  MariaDB version 10.2.2 is the minimum supported version as of March, 2021.
	[FIX]: 
	Update MariaDB to a supported version, 10.5 suggested.
[FAIL]  Your database is out of date!
	[FIX]: 
	./lnms migrate
[WARN]  Global lnms shortcut not installed. lnms command must be run with full path
	[FIX]: 
	sudo ln -s /opt/librenms/lnms /usr/bin/lnms
[WARN]  Bash completion not installed. lnms command tab completion unavailable.
	[FIX]: 
	sudo cp /opt/librenms/misc/lnms-completion.bash /etc/bash_completion.d/
[FAIL]  We have found some files that are owned by a different user than 'librenms', this will stop you updating automatically and / or rrd files being updated causing graphs to fail.
	[FIX]: 
	sudo chown -R librenms:librenms /opt/librenms
	sudo setfacl -d -m g::rwx /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/
	sudo chmod -R ug=rwX /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/
	Files:
	 /opt/librenms/.env.travis
	 /opt/librenms/lnms
	 /opt/librenms/adduser.php
	 /opt/librenms/LibreNMS/Util/Clean.php
	 /opt/librenms/LibreNMS/Util/DynamicConfig.php
	 /opt/librenms/LibreNMS/Util/IPv6.php
	 /opt/librenms/LibreNMS/Util/Smokeping.php
	 /opt/librenms/LibreNMS/Util/FileCategorizer.php
	 /opt/librenms/LibreNMS/Util/Colors.php
	 /opt/librenms/LibreNMS/Util/IP.php
	 /opt/librenms/LibreNMS/Util/EnvHelper.php
	 /opt/librenms/LibreNMS/Util/Snmpsim.php
	 /opt/librenms/LibreNMS/Util/Dns.php
	 /opt/librenms/LibreNMS/Util/CiHelper.php
	 /opt/librenms/LibreNMS/Util/ObjectCache.php
	  and 7087 more...
$ 
$ 
$ ./lnms migrate
Migrating: 2020_09_18_223431_create_cache_table

In Connection.php line 692:
                                                                               
  SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'cache' alre  
  ady exists (SQL: create table `cache` (`key` varchar(255) not null, `value`  
   text not null, `expiration` int not null) default character set utf8mb4 co  
  llate 'utf8mb4_unicode_ci')                                                  
                                                                               

In Exception.php line 18:
                                                                               
  SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'cache' alre  
  ady exists                                                                   
                                                                               

In PDOStatement.php line 112:
                                                                               
  SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'cache' alre  
  ady exists                                                                   
                                                                               

$ 

forgot to add following information earlier and unable to edit the post;

upgraded to Mariadb 10.3.8, ran mysql_upgrade as root.

$ ./validate.php
====================================
Component | Version
--------- | -------
LibreNMS  | 21.7.0-85-g8bb6eec73
DB Schema | 2020_08_28_212054_drop_uptime_column_outages (174)
PHP       | 7.4.22
Python    | 3.6.9
MySQL     | 10.3.8-MariaDB-1:10.3.8+maria~artful
RRDTool   | 1.7.0
SNMP      | NET-SNMP 5.7.3
====================================

[OK]    Composer Version: 2.1.6
[OK]    Dependencies up-to-date.
[OK]    Database connection successful
[FAIL]  Your database is out of date!
	[FIX]: 
	./lnms migrate
$ 
$ ./lnms migrate
Migrating: 2020_09_18_223431_create_cache_table

In Connection.php line 692:
                                                                               
  SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'cache' alre  
  ady exists (SQL: create table `cache` (`key` varchar(255) not null, `value`  
   text not null, `expiration` int not null) default character set utf8mb4 co  
  llate 'utf8mb4_unicode_ci')                                                  
                                                                               

In Exception.php line 18:
                                                                               
  SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'cache' alre  
  ady exists                                                                   
                                                                               

In PDOStatement.php line 112:
                                                                               
  SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'cache' alre  
  ady exists   

Always the same error when migrating. What next ?.

drop the cache table from mysql:
DROP TABLE cache;

Thank you very much, fixed the issue with more inputs from ./validate.php

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.