Runtime error: coercing to Unicode: need string or buffer, N

An open discussion forum for obtaining help with Nagios Core. Nagios Core users of all experience levels are welcome here. Subforum have been created for the discussion of Nagios Core and Nagios Plugin development.

NOTE: The SourceForge.net mailing lists have been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

Runtime error: coercing to Unicode: need string or buffer, N

Postby satheesh19870819 » Thu Dec 06, 2018 11:41 am

Hello Team,

I am using esxcli 6.5 in centos 7 to monitor ESXi servers . When i run the script inside the nagios server it is giving perfect result .
But at the nagios front end its giving me the following error message

Code: Select all
Runtime error: coercing to Unicode: need string or buffer, NoneType found


Nagios version : i am using the maint version https://github.com/NagiosEnterprises/na%20...%20tree/maint
satheesh19870819
 
Posts: 30
Joined: Wed Mar 21, 2018 1:11 pm

Re: Runtime error: coercing to Unicode: need string or buffe

Postby cdienger » Thu Dec 06, 2018 4:49 pm

When you run it from the command line are you running it as nagios? You can switch the the nagios user with:

su - nagios

If it doesn't work with nagios but it does for another account like root, then that would suggest a permissions issue somewhere. You can also try running the esxcli command with --debug to see if anything more useful is provided.

What does the configuration look like that calls this plugin? Is the command called via another script? Please provide a details and links to the script if the above doesn't help resolve the issue.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
cdienger
Support Tech
 
Posts: 2191
Joined: Tue Feb 07, 2017 11:26 am

Re: Runtime error: coercing to Unicode: need string or buffe

Postby satheesh19870819 » Sun Dec 09, 2018 5:37 am

Thank you for helping me here .

1) Am able to run the script as nagios user inside the nagios server and getting perfect output
2) am running a shell script inside that the esxcli is called and the username and password are hardcoded in the shell script . Ip address is passed as argument to the shell script .

Actually i have two commands inside the shell
a)esxcfg-hostops - to get the manufacturer details
b) esxcli - to get the system information
Both output are set for front end display . But only the a) command output shown at the front end and for the b) command output is showing
Code: Select all
"Runtime error: coercing to Unicode: need string or buffer, NoneType found"


am using vmware vsphere cli 6.5
satheesh19870819
 
Posts: 30
Joined: Wed Mar 21, 2018 1:11 pm

Re: Runtime error: coercing to Unicode: need string or buffe

Postby cdienger » Mon Dec 10, 2018 3:04 pm

Can you provide a link to or a copy of the script along with the configuration used to define the command and check?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
cdienger
Support Tech
 
Posts: 2191
Joined: Tue Feb 07, 2017 11:26 am


Return to Nagios Core

Who is online

Users browsing this forum: Google [Bot], jramosb and 32 guests