Help, after weekend libre don't work, HTTP ERROR 500 when accessing web page

[root@localhost /opt/librenms]$./daily.sh Re-running /opt/librenms/daily.sh as librenms user
PHP Fatal error: require(): Failed opening required ‘/opt/librenms/vendor/composer/…/psy/psysh/src/Psy/functions.php’ (include_path=’.:/usr/share/pear:/usr/share/php’) in /opt/librenms/vendor/composer/autoload_real.php on line 66

Fatal error: require(): Failed opening required ‘/opt/librenms/vendor/composer/…/psy/psysh/src/Psy/functions.php’ (include_path=’.:/usr/share/pear:/usr/share/php’) in /opt/librenms/vendor/composer/autoload_real.php on line 66
PHP Fatal error: require(): Failed opening required ‘/opt/librenms/vendor/composer/…/psy/psysh/src/Psy/functions.php’ (include_path=’.:/usr/share/pear:/usr/share/php’) in /opt/librenms/vendor/composer/autoload_real.php on line 66

Fatal error: require(): Failed opening required ‘/opt/librenms/vendor/composer/…/psy/psysh/src/Psy/functions.php’ (include_path=’.:/usr/share/pear:/usr/share/php’) in /opt/librenms/vendor/composer/autoload_real.php on line 66
Updating Composer packages OK
PHP Fatal error: require(): Failed opening required ‘/opt/librenms/vendor/composer/…/psy/psysh/src/Psy/functions.php’ (include_path=’.:/usr/share/pear:/usr/share/php’) in /opt/librenms/vendor/composer/autoload_real.php on line 66

Fatal error: require(): Failed opening required ‘/opt/librenms/vendor/composer/…/psy/psysh/src/Psy/functions.php’ (include_path=’.:/usr/share/pear:/usr/share/php’) in /opt/librenms/vendor/composer/autoload_real.php on line 66
Updated from unset to OK
PHP Fatal error: require(): Failed opening required ‘/opt/librenms/vendor/composer/…/psy/psysh/src/Psy/functions.php’ (include_path=’.:/usr/share/pear:/usr/share/php’) in /opt/librenms/vendor/composer/autoload_real.php on line 66

Fatal error: require(): Failed opening required ‘/opt/librenms/vendor/composer/…/psy/psysh/src/Psy/functions.php’ (include_path=’.:/usr/share/pear:/usr/share/php’) in /opt/librenms/vendor/composer/autoload_real.php on line 66
Updating SQL-Schema FAIL
PHP Fatal error: require(): Failed opening required ‘/opt/librenms/vendor/composer/…/psy/psysh/src/Psy/functions.php’ (include_path=’.:/usr/share/pear:/usr/share/php’) in /opt/librenms/vendor/composer/autoload_real.php on line 66

Fatal error: require(): Failed opening required ‘/opt/librenms/vendor/composer/…/psy/psysh/src/Psy/functions.php’ (include_path=’.:/usr/share/pear:/usr/share/php’) in /opt/librenms/vendor/composer/autoload_real.php on line 66
Updating submodules OK
Cleaning up DB FAIL
PHP Fatal error: require(): Failed opening required ‘/opt/librenms/vendor/composer/…/psy/psysh/src/Psy/functions.php’ (include_path=’.:/usr/share/pear:/usr/share/php’) in /opt/librenms/vendor/composer/autoload_real.php on line 66

Fatal error: require(): Failed opening required ‘/opt/librenms/vendor/composer/…/psy/psysh/src/Psy/functions.php’ (include_path=’.:/usr/share/pear:/usr/share/php’) in /opt/librenms/vendor/composer/autoload_real.php on line 66
PHP Fatal error: require(): Failed opening required ‘/opt/librenms/vendor/composer/…/psy/psysh/src/Psy/functions.php’ (include_path=’.:/usr/share/pear:/usr/share/php’) in /opt/librenms/vendor/composer/autoload_real.php on line 66

Fatal error: require(): Failed opening required ‘/opt/librenms/vendor/composer/…/psy/psysh/src/Psy/functions.php’ (include_path=’.:/usr/share/pear:/usr/share/php’) in /opt/librenms/vendor/composer/autoload_real.php on line 66
PHP Fatal error: require(): Failed opening required ‘/opt/librenms/vendor/composer/…/psy/psysh/src/Psy/functions.php’ (include_path=’.:/usr/share/pear:/usr/share/php’) in /opt/librenms/vendor/composer/autoload_real.php on line 66

Fatal error: require(): Failed opening required ‘/opt/librenms/vendor/composer/…/psy/psysh/src/Psy/functions.php’ (include_path=’.:/usr/share/pear:/usr/share/php’) in /opt/librenms/vendor/composer/autoload_real.php on line 66
PHP Fatal error: require(): Failed opening required ‘/opt/librenms/vendor/composer/…/psy/psysh/src/Psy/functions.php’ (include_path=’.:/usr/share/pear:/usr/share/php’) in /opt/librenms/vendor/composer/autoload_real.php on line 66

Fatal error: require(): Failed opening required ‘/opt/librenms/vendor/composer/…/psy/psysh/src/Psy/functions.php’ (include_path=’.:/usr/share/pear:/usr/share/php’) in /opt/librenms/vendor/composer/autoload_real.php on line 66
PHP Fatal error: require(): Failed opening required ‘/opt/librenms/vendor/composer/…/psy/psysh/src/Psy/functions.php’ (include_path=’.:/usr/share/pear:/usr/share/php’) in /opt/librenms/vendor/composer/autoload_real.php on line 66

Fatal error: require(): Failed opening required ‘/opt/librenms/vendor/composer/…/psy/psysh/src/Psy/functions.php’ (include_path=’.:/usr/share/pear:/usr/share/php’) in /opt/librenms/vendor/composer/autoload_real.php on line 66
PHP Fatal error: require(): Failed opening required ‘/opt/librenms/vendor/composer/…/psy/psysh/src/Psy/functions.php’ (include_path=’.:/usr/share/pear:/usr/share/php’) in /opt/librenms/vendor/composer/autoload_real.php on line 66

Fatal error: require(): Failed opening required ‘/opt/librenms/vendor/composer/…/psy/psysh/src/Psy/functions.php’ (include_path=’.:/usr/share/pear:/usr/share/php’) in /opt/librenms/vendor/composer/autoload_real.php on line 66
PHP Fatal error: require(): Failed opening required ‘/opt/librenms/vendor/composer/…/psy/psysh/src/Psy/functions.php’ (include_path=’.:/usr/share/pear:/usr/share/php’) in /opt/librenms/vendor/composer/autoload_real.php on line 66

Fatal error: require(): Failed opening required ‘/opt/librenms/vendor/composer/…/psy/psysh/src/Psy/functions.php’ (include_path=’.:/usr/share/pear:/usr/share/php’) in /opt/librenms/vendor/composer/autoload_real.php on line 66
PHP Fatal error: require(): Failed opening required ‘/opt/librenms/vendor/composer/…/psy/psysh/src/Psy/functions.php’ (include_path=’.:/usr/share/pear:/usr/share/php’) in /opt/librenms/vendor/composer/autoload_real.php on line 66

Fatal error: require(): Failed opening required ‘/opt/librenms/vendor/composer/…/psy/psysh/src/Psy/functions.php’ (include_path=’.:/usr/share/pear:/usr/share/php’) in /opt/librenms/vendor/composer/autoload_real.php on line 66
PHP Fatal error: require(): Failed opening required ‘/opt/librenms/vendor/composer/…/psy/psysh/src/Psy/functions.php’ (include_path=’.:/usr/share/pear:/usr/share/php’) in /opt/librenms/vendor/composer/autoload_real.php on line 66

Fatal error: require(): Failed opening required ‘/opt/librenms/vendor/composer/…/psy/psysh/src/Psy/functions.php’ (include_path=’.:/usr/share/pear:/usr/share/php’) in /opt/librenms/vendor/composer/autoload_real.php on line 66
PHP Fatal error: require(): Failed opening required ‘/opt/librenms/vendor/composer/…/psy/psysh/src/Psy/functions.php’ (include_path=’.:/usr/share/pear:/usr/share/php’) in /opt/librenms/vendor/composer/autoload_real.php on line 66

Fatal error: require(): Failed opening required ‘/opt/librenms/vendor/composer/…/psy/psysh/src/Psy/functions.php’ (include_path=’.:/usr/share/pear:/usr/share/php’) in /opt/librenms/vendor/composer/autoload_real.php on line 66
PHP Fatal error: require(): Failed opening required ‘/opt/librenms/vendor/composer/…/psy/psysh/src/Psy/functions.php’ (include_path=’.:/usr/share/pear:/usr/share/php’) in /opt/librenms/vendor/composer/autoload_real.php on line 66

Fatal error: require(): Failed opening required ‘/opt/librenms/vendor/composer/…/psy/psysh/src/Psy/functions.php’ (include_path=’.:/usr/share/pear:/usr/share/php’) in /opt/librenms/vendor/composer/autoload_real.php on line 66
PHP Fatal error: require(): Failed opening required ‘/opt/librenms/vendor/composer/…/psy/psysh/src/Psy/functions.php’ (include_path=’.:/usr/share/pear:/usr/share/php’) in /opt/librenms/vendor/composer/autoload_real.php on line 66

Fatal error: require(): Failed opening required ‘/opt/librenms/vendor/composer/…/psy/psysh/src/Psy/functions.php’ (include_path=’.:/usr/share/pear:/usr/share/php’) in /opt/librenms/vendor/composer/autoload_real.php on line 66
Fetching notifications FAIL
PHP Fatal error: require(): Failed opening required ‘/opt/librenms/vendor/composer/…/psy/psysh/src/Psy/functions.php’ (include_path=’.:/usr/share/pear:/usr/share/php’) in /opt/librenms/vendor/composer/autoload_real.php on line 66

Fatal error: require(): Failed opening required ‘/opt/librenms/vendor/composer/…/psy/psysh/src/Psy/functions.php’ (include_path=’.:/usr/share/pear:/usr/share/php’) in /opt/librenms/vendor/composer/autoload_real.php on line 66
Caching PeeringDB data FAIL
PHP Fatal error: require(): Failed opening required ‘/opt/librenms/vendor/composer/…/psy/psysh/src/Psy/functions.php’ (include_path=’.:/usr/share/pear:/usr/share/php’) in /opt/librenms/vendor/composer/autoload_real.php on line 66

Fatal error: require(): Failed opening required ‘/opt/librenms/vendor/composer/…/psy/psysh/src/Psy/functions.php’ (include_path=’.:/usr/share/pear:/usr/share/php’) in /opt/librenms/vendor/composer/autoload_real.php on line 66
[root@localhost /opt/librenms]$./validate.php PHP Warning: require(/opt/librenms/vendor/composer/…/psy/psysh/src/Psy/functions.php): failed to open stream: No such file or directory in /opt/librenms/vendor/composer/autoload_real.php on line 66
PHP Fatal error: require(): Failed opening required ‘/opt/librenms/vendor/composer/…/psy/psysh/src/Psy/functions.php’ (include_path=’.:/usr/share/pear:/usr/share/php’) in /opt/librenms/vendor/composer/autoload_real.php on line 66

Component Version
LibreNMS 1.40-19-gfd77b2362
DB Schema ?
PHP 7.0.30
MySQL ?
RRDTool 1.3.8
SNMP NET-SNMP 5.5

====================================

Warning: require(/opt/librenms/vendor/composer/…/psy/psysh/src/Psy/functions.php): failed to open stream: No such file or directory in /opt/librenms/vendor/composer/autoload_real.php on line 66

Fatal error: require(): Failed opening required ‘/opt/librenms/vendor/composer/…/psy/psysh/src/Psy/functions.php’ (include_path=’.:/usr/share/pear:/usr/share/php’) in /opt/librenms/vendor/composer/autoload_real.php on line 66

It looks like your database is not responding either.

Kevin_Krumm

Database service is working fine.
[root@localhost /opt/librenms]$service mysqld status
mysqld (pid 15807) is running…
[root@localhost /opt/librenms]$
[root@localhost /opt/librenms]$mysql -u librenms -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 5
Server version: 5.5.60 MySQL Community Server (GPL) by Remi

Copyright © 2000, 2018, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.

mysql> show databases;
±-------------------+
| Database |
±-------------------+
| information_schema |
| librenms |
±-------------------+
2 rows in set (0.01 sec)

mysql> use librenms
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> show tables;
±-------------------------+
| Tables_in_librenms |
±-------------------------+
| access_points |
| alert_device_map |
| alert_group_map |
| alert_log |
| alert_rules |
| alert_schedule |
| alert_schedule_items |
| alert_template_map |
| alert_templates |
| alerts |
| api_tokens |
| application_metrics |
| applications |
| authlog |
| bgpPeers |
| bgpPeers_cbgp |
| bill_data |
| bill_history |
| bill_perms |
| bill_port_counters |
| bill_ports |
| bills |
| callback |
| cef_switching |
| ciscoASA |
| component |
| component_prefs |
| component_statuslog |
| config |
| customers |
| dashboards |
| dbSchema |
| device_graphs |
| device_group_device |
| device_groups |
| device_mibs |
| device_oids |
| device_perf |
| device_relationships |
| devices |
| devices_attribs |
| devices_perms |
| entPhysical |
| entPhysical_state |
| entityState |
| eventlog |
| graph_types |
| graph_types_dead |
| hrDevice |
| ipsec_tunnels |
| ipv4_addresses |
| ipv4_mac |
| ipv4_networks |
| ipv6_addresses |
| ipv6_networks |
| juniAtmVp |
| links |
| loadbalancer_rservers |
| loadbalancer_vservers |
| locations |
| mac_accounting |
| mefinfo |
| mempools |
| mibdefs |
| munin_plugins |
| munin_plugins_ds |
| netscaler_vservers |
| notifications |
| notifications_attribs |
| ospf_areas |
| ospf_instances |
| ospf_nbrs |
| ospf_ports |
| packages |
| pdb_ix |
| pdb_ix_peers |
| perf_times |
| plugins |
| poller_groups |
| pollers |
| port_association_mode |
| ports |
| ports_adsl |
| ports_fdb |
| ports_perms |
| ports_stack |
| ports_statistics |
| ports_stp |
| ports_vlans |
| processes |
| processors |
| proxmox |
| proxmox_ports |
| pseudowires |
| route |
| sensors |
| sensors_to_state_indexes |
| services |
| session |
| slas |
| state_indexes |
| state_translations |
| storage |
| stp |
| syslog |
| tnmsneinfo |
| toner |
| ucd_diskio |
| users |
| users_prefs |
| users_widgets |
| vlans |
| vminfo |
| vrf_lite_cisco |
| vrfs |
| widgets |
| wireless_sensors |
±-------------------------+
117 rows in set (0.00 sec)

Ok. I was able to fix this issue on my own.
For other user facing this problem:
type in root command: php composer.phar install

Apologies for necromancy, I just wanted to thank Lukasz for posting the solution as I just hit this today and it broke everything.

FYI, if you run that as root you are just going to cause more issues for yourself. Probably you did that in the past, which is why you ended up here.

chown -R librenms:librenms /opt/librenms to fix.

for good measure:

setfacl -d -m g::rwx /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/
setfacl -R -m g::rwx /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/

Thanks Murrant. (Many times over) Those three commands should be a trivial bash script included with librenms that checks id == 0 (run as root, for those who did not know). It seems many mistakes lately are posted that could be solved that way, of which offense I have been guilty.

Can’t prevent all commands users could run as root. Might be worthwhile to add warnings to more.