[ZBX-9784] ERROR: Cannot add host, Incorrect arguments passed to function. Created: 2015 Aug 18  Updated: 2017 May 30  Resolved: 2016 Feb 03

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Frontend (F)
Affects Version/s: 2.4.6
Fix Version/s: 2.4.8rc1, 3.0.0rc1

Type: Incident report Priority: Major
Reporter: Harri Assignee: Unassigned
Resolution: Fixed Votes: 1
Labels: cloning
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File debug.output    
Issue Links:
Duplicate

 Description   

Trying to clone an existing host "gate6a" to "gate4a" I got

Incorrect arguments passed to function. [hosts.php:504 ? CFrontendApiWrapper->create() ? CApiWrapper->__call() ? CFrontendApiWrapper->callMethod() ? CApiWrapper->callMethod() ? CFrontendApiWrapper->callClientMethod() ? CLocalApiClient->callMethod() ? call_user_func_array() ? CHost->create() ? CHost->massAdd() ? CHostInterface->massAdd() ? CHostInterface->create() ? CHostInterface->checkInput() ? CApiService::exception() in /usr/share/zabbix/include/classes/api/services/CHostInterface.php:259]

Debug output is attached.
Hope this helps
Harri



 Comments   
Comment by Gunars Pujats (Inactive) [ 2015 Aug 21 ]

Harri, what OS, browser (name/version) and Zabbix version were you using when got this error?
I'm trying to reproduce this error.

Comment by Harri [ 2015 Oct 09 ]

Sorry for the delay.

I reproduced it just this moment. Web client:

  • OS: Debian 7 Wheezy (amd64), most recent packages installed
  • browser: Chromium 37.0.2062.120 (included in Wheezy)

Zabbix Server:

  • OS: Debian 8 Jessie (amd64), most recent packages installed
  • zabbix 2.4.6, built using the official sources

Hope this helps
Harri

gunarspujats Hi, Harri! Can You please attach POST data from host cloning form?
I still can't reproduce this error, tried same OS, Zabbix and browser version.
Is there possibility that You are using modified form?

Comment by Philipp Noack [ 2015 Nov 09 ]

Same problem for me. Using the packages that came with Ubuntu 15.10. My version is 2.4.6.

Comment by Philipp Noack [ 2015 Nov 12 ]

Remote Address:<removed>:443
Request URL:https://zabbix.<removed>/hosts.php
Request Method:POST
Status Code:200 OK

Response Headers
Connection:keep-alive
Content-Encoding:gzip
Content-Type:text/html; charset=UTF-8
Date:Thu, 12 Nov 2015 11:07:22 GMT
Server:nginx/1.9.3 (Ubuntu)
Set-Cookie:zbx_sessionid=<removed>; expires=Sat, 12-Dec-2015 11:07:22 GMT; Max-Age=2592000; secure
Strict-Transport-Security:max-age=31536000;
Transfer-Encoding:chunked
X-Powered-By:PHP/5.6.11-1ubuntu3.1

Request Headers
Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,/;q=0.8
Accept-Encoding:gzip, deflate
Accept-Language:de-DE,de;q=0.8,en-US;q=0.6,en;q=0.4
Cache-Control:max-age=0
Connection:keep-alive
Content-Length:540
Content-Type:application/x-www-form-urlencoded
Cookie:PHPSESSID=<removed>; tab=0; zbx_sessionid=<removed>
Host:zabbix.<removed>
Origin:https://zabbix.<removed>
Referer:https://zabbix.<removed>/hosts.php
Upgrade-Insecure-Requests:1
User-Agent:Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/45.0.2454.101 Chrome/45.0.2454.101 Safari/537.36

Form Data
sid:<removed>
form_refresh:1
form:Create host
host:testhost
visiblename:testhost
groups_left:65
newgroup:
interfaces[1][isNew]:true
interfaces[1][interfaceid]:1
interfaces[1][type]:1
interfaces[1][ip]:127.0.0.1
interfaces[1][dns]:testhost
interfaces[1][port]:10050
mainInterfaces[1]:1
description:
proxy_hostid:0
status:0
ipmi_authtype:-1
ipmi_privilege:2
ipmi_username:
ipmi_password:
macros[0][macro]:
macros[0][value]:
inventory_mode:-1
add:Add
groups[65]:65

Comment by Gunars Pujats (Inactive) [ 2015 Nov 20 ]

(1) No translation strings changed.

iivs CLOSED

Comment by Gunars Pujats (Inactive) [ 2015 Nov 20 ]

RESOLVED in development branch svn://svn.zabbix.com/branches/dev/ZBX-9784

Comment by Philipp Noack [ 2015 Nov 20 ]

I have eliminated the problem by manually upgrading to version 2.4.7 (from the Zabbix Repo).

gunarspujats In Debian/Ubuntu repository Zabbix frontend is modified to use jQuery and Prototype JS libraries from system (/usr/share/javascript). That caused problem, because latest Prototype.js broke host edit form. Now form is fixed and should work with latest Prototype.

iivs Using other user-created packages, can result in unexpected behaviour. Please, use offical packages. The prototype version we use is 1.6.1

Comment by Ivo Kurzemnieks [ 2016 Jan 29 ]

(2) Bulk requests not saving when using prototype v1.7.1

RESOLVED in r58079

gunarspujats CLOSED

Comment by Ivo Kurzemnieks [ 2016 Jan 29 ]

TESTED,

but close (2) before merging.

Comment by Ivo Kurzemnieks [ 2016 Feb 02 ]

(3) r56801 features not an update but silently adds new code that was not in latest branch. These changes require review.

gunarspujats Changes made in r56801 are reverted in r58191.

iivs Good.
CLOSED

Comment by Gunars Pujats (Inactive) [ 2016 Feb 03 ]

Fixed in:

  • pre-2.4.8rc1 r58205
  • pre-3.0.0rc1 (trunk) r58206
Generated at Sat Apr 20 09:07:42 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.