This is what I’m seeing post patch. Before adding your patch - there’s just a simple error message underneath the tabs stating it can’t retrieve the Oxidized information.
Add /debug=true/ to the url and re-screen shot it.
The debug options from the bottom didn’t load the first time I tried this, maybe a browser issue. Just reloaded the page with debug and got this.
PHP (multiple entries referencing the same thing, apparently permissions?)
Array ( [errno] => 2 [errstr] => file_get_contents(http://127.0.0.1:8888/node/show/hostname.com?format=json): failed to open stream: Permission denied [errfile] => /opt/librenms/html/pages/device/showconfig.inc.php [errline] => 101 )
SQL
SQL Debug
SET NAMES ‘utf8’
SET CHARACTER SET ‘utf8’
SET COLLATION_CONNECTION = ‘utf8_unicode_ci’
SELECT config_name
,config_value
FROM config
select * from graph_types
SELECT DISTINCT(os
) FROM devices
DELETE FROM session
WHERE session_expiry
< ‘1500392153’
SELECT * FROM devices_perms WHERE user_id = ‘1’
SELECT * FROM ports_perms WHERE user_id = ‘1’
SELECT * FROM bill_perms WHERE user_id = ‘1’
SELECT * FROM plugins
WHERE plugin_active
= ‘1’
SELECT service_status, count(service_status) as count FROM services GROUP BY service_status
SELECT COUNT(port_id) FROM ports
WHERE ifOperStatus
= ‘down’ AND ifAdminStatus
= ‘up’ AND ignore
= ‘0’
SELECT COUNT() FROM links
SELECT COUNT(bgpPeer_id) FROM bgpPeers AS B where (bgpPeerAdminStatus = ‘start’ OR bgpPeerAdminStatus = ‘running’) AND bgpPeerState != ‘established’
SELECT * FROM device_groups ORDER BY name
SELECT COUNT() from plugins
WHERE plugin_active = ‘1’
SELECT 1 from packages
LIMIT 1
SELECT type
,COUNT(type
) AS total_type FROM devices
AS D WHERE 1 GROUP BY type
ORDER BY type
SELECT location FROM devices AS D GROUP BY location ORDER BY location
SELECT COUNT() FROM ports AS I, devices AS D WHERE I.deleted
= ‘0’ AND D.device_id
= I.device_id
AND I.ignore
= ‘0’ AND D.ignore
= ‘0’ AND (I.ifInErrors_delta
> ‘0’ OR I.ifOutErrors_delta
> ‘0’)
SELECT COUNT() FROM ports AS I, devices AS D WHERE I.deleted
= ‘0’ AND D.device_id
= I.device_id
AND (I.ignore
= ‘1’ OR D.ignore
= ‘1’)
SELECT * FROM ports
AS P, devices
as D WHERE P.deleted
= ‘1’ AND D.device_id = P.device_id
SELECT sensor_class,COUNT(sensor_id) AS c FROM sensors GROUP BY sensor_class ORDER BY sensor_class
SELECT sensor_class
FROM wireless_sensors
GROUP BY sensor_class
SELECT DISTINCT(app_type
) AS app_type
FROM applications
ORDER BY app_type
SELECT COUNT(bgpPeer_id) from bgpPeers
LEFT JOIN devices AS D ON bgpPeers.device_id=D.device_id WHERE D.device_id IS NOT NULL
SELECT COUNT(ospf_instance_id) FROM ospf_instances
WHERE ospfAdminStat
= ‘enabled’
SELECT COUNT(cef_switching_id) from cef_switching
SELECT COUNT(vrf_id) from vrfs
SELECT C
.id
,C
.device_id
,C
.type
,C
.label
,C
.status
,C
.disabled
,C
.ignore
,C
.error
,CP
.attribute
,CP
.value
FROM component
as C
LEFT JOIN component_prefs
as CP
on C
.id
=CP
.component
WHERE ( type
= ‘Cisco-OTV’ )
SELECT COUNT(alerts
.id
) FROM alerts
LEFT JOIN devices
ON alerts
.device_id
=devices
.device_id
RIGHT JOIN alert_rules
ON alerts
.rule_id
=alert_rules
.id
WHERE 1 AND alerts
.state
NOT IN (0,1)
select count(notifications.notifications_id) from notifications where not exists( select 1 from notifications_attribs where notifications.notifications_id = notifications_attribs.notifications_id and notifications_attribs.user_id = ‘1’)
select count(notifications.notifications_id) from notifications inner join notifications_attribs on notifications.notifications_id = notifications_attribs.notifications_id where notifications_attribs.key = “sticky” && notifications_attribs.value = 1
SELECT * FROM devices
WHERE device_id
= ‘9’
SELECT * FROM vrf_lite_cisco
WHERE device_id
= ‘9’
SELECT * FROM devices_attribs WHERE device_id
= ‘9’
SELECT * FROM entPhysical_state WHERE device_id
= ‘9’
SELECT type
as name
, count() as count FROM component
WHERE device_id
= ‘9’ GROUP BY type
SELECT device_id
FROM vminfo
WHERE vmwVmDisplayName
= ‘hostname.com’ OR vmwVmDisplayName
= ‘hostname.com.’
SELECT COUNT() FROM storage WHERE device_id = ‘9’
SELECT COUNT(sensor_id) FROM sensors WHERE device_id = ‘9’
SELECT COUNT() FROM mempools WHERE device_id = ‘9’
SELECT COUNT() FROM processors WHERE device_id = ‘9’
SELECT attrib_value FROM devices_attribs WHERE device_id
= ‘9’ AND attrib_type
= ‘poll_mib’
SELECT attrib_value FROM devices_attribs WHERE device_id
= ‘9’ AND attrib_type
= ‘poll_mib’
SELECT COUNT(app_id) FROM applications WHERE device_id = ‘9’
SELECT 1 FROM processes WHERE device_id = ‘9’
SELECT COUNT(mplug_id) FROM munin_plugins WHERE device_id = ‘9’
SELECT COUNT(port_id) FROM ports WHERE device_id = ‘9’
SELECT COUNT(sla_id) FROM slas WHERE device_id = ‘9’
SELECT COUNT() FROM wireless_sensors
WHERE device_id
=‘9’
SELECT COUNT(accesspoint_id) FROM access_points WHERE device_id = ‘9’
SELECT COUNT(vlan_id) FROM vlans WHERE device_id = ‘9’
SELECT COUNT(id) FROM vminfo WHERE device_id = ‘9’
SELECT COUNT(id) FROM mefinfo WHERE device_id = ‘9’
SELECT COUNT() FROM loadbalancer_rservers
WHERE device_id
= ‘9’
SELECT COUNT() FROM ipsec_tunnels
WHERE device_id
= ‘9’
SELECT COUNT() FROM bgpPeers
WHERE device_id
= ‘9’
SELECT COUNT() FROM ospf_instances
WHERE ospfAdminStat
= ‘enabled’ AND device_id
= ‘9’
SELECT COUNT() FROM cef_switching
WHERE device_id
= ‘9’
SELECT COUNT() FROM vrfs
WHERE device_id
= ‘9’
SELECT COUNT() FROM pseudowires
WHERE device_id
= ‘9’
SELECT 1 FROM stp WHERE device_id = ‘9’
SELECT COUNT() FROM packages
WHERE device_id = ‘9’
SELECT * FROM entPhysical
WHERE device_id = ‘9’
SELECT COUNT(toner_id) FROM toner WHERE device_id = ‘9’
SELECT COUNT(device_id) FROM devices_attribs WHERE device_id = ‘9’ AND attrib_type = ‘override_Oxidized_disable’ AND attrib_value=‘true’
SELECT attrib_value FROM devices_attribs WHERE device_id
= ‘9’ AND attrib_type
= ‘poll_mib’
SELECT COUNT() FROM devices
WHERE last_polled
<= DATE_ADD(NOW(), INTERVAL - 15 minute) AND ignore
= 0 AND disabled
= 0 AND status = 1
70 total SQL queries run.
So it’s saying it can’t get the config.
From the librenms box curl http://127.0.0.1:8888/node/show/hostname.com?format=json
[[email protected] pages]# curl http://127.0.0.1:8888/node/show/arealhostname.com?format=json
{“name”:“arealhostname.com”,“full_name”:“arealhostname.com”,“ip”:“10.1.1.3”,“group”:null,“model”:“Procurve”,“last”:{“start”:“2017-07-18 15:41:44 UTC”,“end”:“2017-07-18 15:41:50 UTC”,“status”:“success”,“time”:5.912125769},“vars”:null}[[email protected] pages]#
I ran as root/librenms user with same results, only obfuscated the hostname.
If it’s relevant, here’s the file permissions of the device.inc.php file from the previous php errors.
Do this:
php -a
$test = file_get_contents('http://127.0.0.1:8888/node/show/hostname.com?format=json');
print_r($test);
exit
What is output?
I’m not generally into drudging up an old thread. I’m having the same issue with apache on centos7. When I click on the config tab, I just receive a blank page. I’ve worked through everything done here and am at the point of running the last curl from @laf, with the output below:
curl http://10.10.2.2:8080/node/show/core1.b01.com?format=json
Receiving this as the main error:
MultiJson::AdapterError: Did not recognize your adapter specification (cannot load such file – json/ext/parser).
Running that last php command provided this:
php > $test = file_get_contents(‘10.10.2.2:8080/node/show/core1.b01.com?format=json’);
PHP Warning: file_get_contents(10.10.2.2:8080/node/show/core1.b01.com?format=json): failed to open stream: Permission denied in php shell code on line 1
Full output here: https://pastebin.com/Y7WwW7Ne
librenms php debug here: https://pastebin.com/ZG9KC76n
Any chance someone can suggest the best solution? I’ve googled it, and I can’t say that I’ve found a lot that was going to fix it.
Thanks,
J
I expect it’s a config error on oxidized side, feel free to post your config.
Thanks, here is my current config:
I’d prefer not to have to install this in a docker container to make it work.
Any help with my config would be appreciated.
-J
It seems when I try and make it return with format=json, that it complains, but if I use html, it returns valid info. Just in html.
php > $test = file_get_contents(‘http://10.10.2.2:8080/node/show/core1.b01.com?format=json’);
PHP Warning: file_get_contents(http://10.10.2.2:8080/node/show/core1.b01.com?format=json): failed to open stream: HTTP request failed! HTTP/1.0 500 Internal Server Error in php shell code on line 1
This pretty much errors when I try and pull it in json, but will display the HTML.
Any thoughts I’d love to here them.
-J
I was able to get this working by uninstalling all the ruby gems, and reinstalling the rvm install with ruby 2.1.2, and re-running oxidized etc. I wish I had some clue what was wrong, but I will chalk it up to a funky pkg install or versioning issue I didn’t catch.
Thank you for the help.
-J
hello,
i’m new to librenms but got the installation working along side oxidized.
does this tread already have solution? i am encountering the same problem.
Thank you.
Hello this may help
I have it working on Centos 7/Nginx , I remember encountering one issue with Puma.
These were my install notes, maybe they’ll help you
yum install cmake sqlite-devel openssl-devel libssh2-devel ruby gcc ruby-devel
gem install rubygems-update
update_rubygems
gem install oxidized
gem install oxidized-script oxidized-web
gem install rack-test -v 0.7.0
gem install oxidized-script oxidized-web
gem install rugged
On running “oxidized”
/usr/local/share/ruby/site_ruby/rubygems/core_ext/kernel_require.rb:59:in `require’: cannot load such file – puma/puma_http11 (LoadError)
gem uninstall puma 3.11.3
gem install puma -v 3.11.0
Continue with installation documentation, creating config file / service etc…
hi Chas,
Thank you for your fast response. I tried librenms and oxidised on the same centos server prior to the concern I have but I can’t get to integrate librenms to oxidized. right no I have it working in ubuntu but my problem is that the little textbox which shows the configs under the sync status is missing. the one with line numbers in it.
This seems to be a common issue with CentOS and nginx, has anyone found a way to work around this that: 1 - does not require running on a different distro or 2 - require you to create a docker container ?