NRPE: Remote does not support Version 3 Packets - nagios

We are using Nagios XI with Nagios Core 4.4.5. We have updated clients to nrpe 4.0.3 agent. We get "Remote does not support Version 3 Packets" messages in the server log. How to solve this, shouldn't nrpe 4.0.3 support version 3 packets by default. Is there something missing in the configuration? We know that requests can be configured to use version 2, only, but using the newest version is better, isn't it?
EDIT:
nagios-server:~$ /usr/local/nagios/bin/nagios -h
Nagios Core 4.4.5
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 2019-08-20
License: GPL
nagios-server:~$ cat /usr/local/nagiosxi/var/xiversion
full=5.6.7
major=5
minor=6.7
releasedate=2019-09-26
release=5607

Most likely you updated the NRPE client but did not update the plugins in the agent machine
Run these commands to check some plugins versions (nrpe, http, ping):
/usr/lib/nagios/plugins/check_nrpe --version
/usr/lib/nagios/plugins/check_http --version
/usr/lib/nagios/plugins/check_ping --version
Also run this command to check the nrpe daemon version:
/usr/sbin/nrpe-ng --version
Most likely you would get reported version below 3 so you will need to update the plugins.

Related

php xdebug on max sierra not working

On Mac Sierra:
I've got php 7.1 installed, and installed xdebug via:
brew install php71-xdebug
Xcode is 8.0
php -v
Cannot load Xdebug - it was already loaded
PHP 7.1.0RC3 (cli) (built: Oct 2 2016 01:05:16) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.1.0-dev, Copyright (c) 1998-2016 Zend Technologies
with Xdebug v2.4.0, Copyright (c) 2002-2016, by Derick Rethans
With a phpinfo() I cannot find any text that says xdebug
The php.ini file I've tried several variations of: and restarted apache
[xdebug]
zend_extension="/usr/local/opt/php71-xdebug/xdebug.so"
xdebug.remote_host=127.0.0.1
xdebug.remote_connect_back=1 # Not safe for production servers
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_autostart=true
More details can be found here: https://bugs.xdebug.org/view.php?id=1354
PHP7.1 is current not supported by xdebug, (php version <7.1). you should use 7.0 instead, and don't forget to turn on xdebog.remote_enable

Solr doesn't start automatically

solr-5.4.0 version
My Java version
java -version
java version "1.7.0_91"
OpenJDK Runtime Environment (IcedTea 2.6.3) (7u91-2.6.3-0ubuntu0.14.04.1)
OpenJDK 64-Bit Server VM (build 24.91-b01, mixed mode)
I did all steps finally am getting this error
sudo service solr status
Found 1 Solr nodes:
Solr process 6003 from /var/solr/solr-8983.pid not found.
How to fix this error?
That Digital Ocean tutorial recommends Java 8 with Solr 5 and provides installation instructions using a PPA. I also found another SO question where switching to Java 8 was the resolution.
I created a fresh Ubuntu 14.04 VM using Vagrant and VirtualBox with these commands...
vagrant init ubuntu/trusty64
vagrant up
Then I followed the tutorial with Solr 5.4.0, and got the same error you did. However, my Solr logs were not deleted, so I was able to find this...
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (mmap) failed to map 402653184 bytes for committing reserved memory.
My Vagrant VM had 512 MB of RAM so I doubled that to 1 GB which is recommended in the tutorial, did a vagrant reload, and Solr started working. Here is my minimal Vagrantfile...
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.network "private_network", ip: "192.168.33.10"
config.vm.provider "virtualbox" do |vb|
vb.memory = "1024"
end
end
I'm using VirtualBox 5.0.10 and Vagrant 1.8.1. I hope this works for you.
UPDATE: I just went through the tutorial again with a 32-bit Ubuntu 14.04 VM (ubuntu/trusty32 in Vagrantfile) and that also worked. So if you're on a 32-bit host or the 64-bit VM doesn't work for you, the 32-bit VM should work.
I will throw my answer in here just in case someone else spends another hour like I did.
Solr version 6.1.0 + Java 1.7 same error.
I had to upgrade to 1.8. How did I know that was the problem?
:/var/solr/logs# cat solr-8983-console.log
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/eclipse/jetty/start/Main : Unsupported major.minor version 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:803)
at ....
The 52 version means you need Java 1.8.
Upgrade Ubuntu using
$ sudo add-apt-repository ppa:webupd8team/java
$ sudo apt-get update
$ sudo apt-get install oracle-java8-installer
Credit to this comment.

Update to last version after already installed old

I'm using fastcgi and my PHP version is 5.3.3 instead of 5.5 so my question is how can I update to latest PHP version? I'm using CentOS, I tried yum update, but no update appeared for this.
Normally you need to uninstall the 5.3 branch and install 5.5 from scratch because it is not an update but a new version.
Beware that in 5.5 quite some functions are deprecated that were still available in 5.3!
http://blog.ahughes.org/?p=717
Uses the remi repository.
From the blog:
By running the following commands:
rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
you solve all dependency issues with epel and remi on CentOS 6.
Then, by running the following command, you install PHP 5.5.
yum --enablerepo=remi,remi-test install httpd php php-common
For extra goodies, you can run the following command:
yum --enablerepo=remi,remi-test install php-pecl-apc php-cli php-pear php-pdo php-mysqlnd php-pgsql php-pecl-mongo php-sqlite php-pecl-memcache php-pecl-memcached php-gd php-mbstring php-mcrypt php-xml
Now, restart your httpd service and set it to boot automatically:
service httpd restart
chkconfig --levels 235 httpd on
Now run:
php --version
to see whether the correct version of PHP was installed.

Mac Ports Update Failing

hansarijanto$ port -v
MacPorts 2.0.3
hansarijanto$ xcodebuild -version
Xcode 4.3.2
Build version 4E2002
I am running the above xcode and macport version. on max os x
when I try to self update my mac port I get the following error.
hansarijanto$ sudo port selfupdate
Password:
---> Updating MacPorts base sources using rsync
MacPorts base version 2.0.3 installed,
MacPorts base version 2.0.4 downloaded.
---> Updating the ports tree
---> MacPorts base is outdated, installing new version 2.0.4
Installing new MacPorts release in /opt/local as root:admin; permissions 0755; Tcl-Package in /Library/Tcl
Error: /opt/local/bin/port: port selfupdate failed: Error installing new MacPorts base: shell command failed (see log for details)
I am trying to update mac port to install qt.
sudo port install qt4-mac-devel(error no SDK found)
which I need to install webkit-capybara
sudo gem install capybara-webkit -v '0.7.2'(error in setting up native environment)
You need to use the -d option to get enough information to diagnose this; but take a look at https://trac.macports.org/wiki/FAQ#selfupdatefails for common problems and solutions.
Seems Apple no longer installs Xcode's command line tools. See here: http://ericwilson.erics.ws/ericsblog/2012/8/26/macports-port-selfupdate-fail for solution.
Just wanted to add that on Mac OS 10.12 Sierra i was getting the WARNING: GNUSTEP_SYSTEM_ROOT is not defined error on selfupdate and i did already have the Xcode command line tools installed, licensed and working. But my copy of Xcode had become out of date, even though that was not showing up on the automatic software updates.
I had version 7 and for Sierra (and macports) you need version 8.
So I manually downloaded Xcode 8 via the App Store and it solved the problem for me.

xdebug not connecting with client?

The xdebug server doesn't connect to any of the clients on port 9000 ie:Netbeans IDE ,debugclient etc.xdebug is shown in phpinfo output.The above clients keep on waiting for the connection to be established.when ever I try to run a php script from the cli it gives the following warning message:
"PHP Warning: Module 'xdebug' already loaded in Unknown on line 0"
The 9000 port has been opened and shows up in the netstat --numeric-port -l command.
I have no idea what might have gone wrong.I have checked all the configuration files,everything seems ok. Any help will be appreciated.
Section of my configuration files
Linux abc.localdomain 3.1.1-2.fc16.x86_64 #1 SMP Mon Nov 14 15:46:10 UTC 2011 x86_64
This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies
with Xdebug v2.1.2, Copyright (c) 2002-2011, by Derick Rethans
[Zend]
zend_extension=/usr/lib64/php/modules/xdebug.so
[XDebug]
xdebug.remote_enable=On
xdebug.remote_autostart=On
xdebug.remote_handler=dbgp
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.remote_mode=req
xdebug.remote_log=/var/log/xdebug.log
php_api no. coincides
Xdebug Simple DBGp client (0.10.0)
Copyright 2002-2007 by Derick Rethans.
- libedit support: enabled
Waiting for debug server to connect.
Is it black magic!!
Thank You
It was actually Selinux not allowing Httpd to connect to other network resources.
Setting the boolean for httpd solved the problem:
setsebool -P httpd_can_network_connect on
OS Fedora 16-X_64
For me the solution was
sudo chcon -R -h -t /path/to/xdebug.so
meaning SELinux now allows httpd to execute this shared object.

Resources