Page 1 of 1

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

Posted: Thu Dec 06, 2018 11:41 am
by satheesh19870819
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 ... tree/maint

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

Posted: Thu Dec 06, 2018 4:49 pm
by cdienger
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.

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

Posted: Sun Dec 09, 2018 5:37 am
by satheesh19870819
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

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

Posted: Mon Dec 10, 2018 3:04 pm
by cdienger
Can you provide a link to or a copy of the script along with the configuration used to define the command and check?