[ZBX-4880] Issue with zabbix 2.0.0rc2 API Created: 2012 Apr 16 Updated: 2017 May 30 Resolved: 2012 May 03 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | API (A) |
Affects Version/s: | 2.0.0rc2 |
Fix Version/s: | 2.0.0rc4 |
Type: | Incident report | Priority: | Major |
Reporter: | Simon Kerckhof | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 0 |
Labels: | api | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified | ||
Environment: |
Debian with MySQL |
Description |
When we create a host trough the API the JSON-error "no such error" is generated: JSON request that is sent: , {"type":"1","main":"1","useip":"1","ip":"192.168.17.210","dns":"","port":"10050"}, {"type":"1","main":"0","useip":"1","ip":"172.16.80.26","dns":"","port":"10050"}],"groups": {"groupid":"6"},"templates":[ {"templateid":"10047"}, {"templateid":"10134"}, {"templateid":"10130"}, {"templateid":"10049"}]},"auth":"24aedcb501e25f50eac653fe183c6708","id":1} (all templateid's, groupid's and auth.hash are valid) Received: ,"id":1}) Response decoded: (Array ( [jsonrpc] => 2.0 [error] => Array ( [code] => -32400 [message] => System error. [data] => JSON-rpc error generation failed. No such error "". ) [id] => 1 ) When I shorten the name to store3 and run it again, the host is succesfully added. Is there a limitation on the hostname length for the host.create method? Thanks for checking this out. |
Comments |
Comment by richlv [ 2012 Apr 16 ] |
if you enable frontend debug for your user, create a host and view the debug, does the json, generated by the frontend, differ from yours significantly ? (note that "JSON-rpc error generation failed" must be fixed anyway, of course) |
Comment by Simon Kerckhof [ 2012 Apr 17 ] |
richlv, how do I enable the frontend debug? |
Comment by Simon Kerckhof [ 2012 Apr 17 ] |
I've tried to add this host again and now I accually do get an error: Value "'{store3.belgovault.internal:IfOut.[\" {#SNMPINDEX}\"].last(0)}>{$MAXOUT}&{store3.belgovault.internal:IPAdrEntIP.[\"{#SNMPINDEX}\"].regexp(@PublicIP)}&{store3.belgovault.internal:IfOut.[\" {#SNMPINDEX}\"].time(0)}>{$TRAFFICSTOP}&{store3.belgovault.internal:IfOut.[\"{#SNMPINDEX}\"].time(0)}<{$TRAFFICSTART}'" is too long for field "expression" - 295 characters. Allowed length is 255 characters. [CHost.create -> CHost.massAdd -> CTemplate.massAdd -> CTemplate.link -> CTriggerPrototype.syncTemplates -> CTriggerGeneral.inherit -> CTriggerGeneral.inheritOnHost -> CTriggerPrototype.createReal -> DB.insert -> DB.checkValueTypes] So there is accually a limit to the hostname lenght if you have long trigger statements. I am using a Debian (6.0.4) with MySQL (Ver 14.14 Distrib 5.1.61, for debian-linux-gnu (x86_64) using readline 6.1) |
Comment by Simon Kerckhof [ 2012 Apr 17 ] |
Could be related to: |
Comment by Alexey Fukalov [ 2012 Apr 25 ] |
dev branch: svn://svn.zabbix.com/branches/dev/ZBX-4880 |
Comment by Toms (Inactive) [ 2012 May 02 ] |
TESTED |
Comment by Alexey Fukalov [ 2012 May 02 ] |
svn://svn.zabbix.com/trunk 27226 |
Comment by Alexander Vladishev [ 2012 May 03 ] |
(1) Hudson tests failed after fixing the given issue PHP Fatal error: Class 'DB' not found in /home/hudson/public_html/trunk-FRONTEND-MYSQL/frontends/php/include/schema.inc.php on line 4 <Sasha> CLOSED Should be fixed in ZBXNEXT-686 |