[BUG] snmp community issue after updating to 1.6.0p20cee

After updating to 1.6.0p20, from 1.6.0p15, I can no longer edit hosts with a community string. In the hosts.mk file I have u’snmp_community’: u’public’. When I try to edit the hosts I get the error message

Internal error: Object type <type ‘unicode’> cannot be passed to C code

I can’t send the bug report either, it says I can’t have an empty field.

I can solve the issue by removing the u before ‘public’.

Cheers
Wessley

Exact the same problem here.
We had to go back to 1.6p18 (p19 not installed) so that this works again.
Editing the hosts.mk is not an option for us since we use an automated importsync at night.
What we discovered: when doing this via API, unicode is set. When doing this by hand in Webif, then unicode is not set.
Something must be different in 1.6p20, maybe this?
Password dialogs now handle passwords more securely (checkmk.com)

PS: Screenshot for refence :slight_smile:

BR Thomas

Hello all,

I have also the same issue after upgrade to 1.6.0p20 (RAW) version.
I can’t change the hosts configuration.
I don’t know what I need to do to resolve this issue?
If somebody have an idea?

Thanks by advance.

Regards
Ugo

When using the API to add hosts you need request_format=python, and then the unicode u is not added.

Thanks a lot Wessley but also I saw that the issue is because I have a snmp_community to public even of host who used the cmk agent.
I edit host and delete one attributes and seams work after:
action=edit_host -d ‘request={“hostname”:“my-host”,“unset_attributes”:[“tag_snmp_ds”,“snmp_community”]}’

And after apply changes, the Wato now work for this hosts.
Regards
Ugo

For some others hosts type who need snmp, I run this command with the parameter that Wessley adice and now we didn’t still have the issue:
edit_host&request_format=python -d ‘request={“hostname”:“my-snmp-host”,“attributes”:{“tag_snmp_ds”:“snmp-v2”,“snmp_community”:“xxxx”}}’

And after apply changes, the Wato now work for these snmp hosts.
Regards
Ugo