whmapi1 addzonerecord issue
what am I doing wrong to get all those warnings below?
[root@instance-2 ~]# /usr/local/cpanel/bin/whmapi1 addzonerecord domain=godisgreat.com type=A class=IN name=anoop.godisgreat.com address=4.2.2.2
[2018-01-14 15:24:21 +0000] warn [Internal Warning while parsing [stdin] 18877] Use of uninitialized value $_[1] in join or string at /usr/local/cpanel/Cpanel/ZoneFile.pm line 606.
at /usr/local/cpanel/Cpanel/ZoneFile.pm line 605.
Cpanel::ZoneFile::_build_record(Cpanel::ZoneFile=HASH(0x49ccd48), "anoop.godisgreat.com", undef, "IN", "A", "4.2.2.2") called at /usr/local/cpanel/Cpanel/ZoneFile.pm line 420
Cpanel::ZoneFile::dns_zone_obj_to_zonelines(Cpanel::ZoneFile=HASH(0x49ccd48), ARRAY(0x49ccb50), "for_display") called at /usr/local/cpanel/Cpanel/ZoneFile.pm line 401
Cpanel::ZoneFile::serialize_single_record(Cpanel::ZoneFile=HASH(0x49ccd48), HASH(0x29e15a0)) called at /usr/local/cpanel/Whostmgr/DNS.pm line 391
Whostmgr::DNS::add_zone_records(ARRAY(0x48b96b8), "godisgreat.com") called at /usr/local/cpanel/Whostmgr/DNS.pm line 419
Whostmgr::DNS::add_zone_record(HASH(0x29e15a0)) called at /usr/local/cpanel/Whostmgr/API/1/DNS.pm line 121
Whostmgr::API::1::DNS::addzonerecord(HASH(0x29e15a0), HASH(0x4886420), HASH(0x489dca8)) called at whostmgr/bin/xml-api.pl line 3108
whostmgr::bin::xml_api::__ANON__(HASH(0x4886420), HASH(0x29e15a0), HASH(0x489dca8), CODE(0x482bc48)) called at /usr/local/cpanel/Whostmgr/API/1/Data/Wrapper.pm line 219
Whostmgr::API::1::Data::Wrapper::__ANON__() called at /usr/local/cpanel/3rdparty/perl/524/lib64/perl5/cpanel_lib/Try/Tiny.pm line 99
eval {...} called at /usr/local/cpanel/3rdparty/perl/524/lib64/perl5/cpanel_lib/Try/Tiny.pm line 90
Try::Tiny::try(CODE(0x48a0890), Try::Tiny::Catch=REF(0x48bb568)) called at /usr/local/cpanel/Whostmgr/API/1/Data/Wrapper.pm line 238
Whostmgr::API::1::Data::Wrapper::execute_internal(CODE(0x489d8d0), HASH(0x29e15a0), HASH(0x489dca8), HASH(0x489d870), CODE(0x482bc48)) called at whostmgr/bin/xml-api.pl line 3267
whostmgr::bin::xml_api::runapp("addzonerecord", HASH(0x489dca8), HASH(0x285c920), 0, CODE(0x482bc48)) called at whostmgr/bin/xml-api.pl line 3041
whostmgr::bin::xml_api::script(CODE(0x482bc48), "-json", "addzonerecord") called at whostmgr/bin/xml-api.pl line 2992
---
metadata:
command: addzonerecord
reason: "Bind reloading on instance-2 using rndc zone: [godisgreat.com]\n"
result: 1
version: 1
-
Hi @Anoop P Alias, Thanks for your report. I've confirmed this in a testing environment and have filed case 'CPANEL-17980' for this issue. When testing, I found that the record was still added. I also found that no errors are shown when passing the 'ttl' parameter. While I don't have a time frame of when this issue may be addressed, you may look to the changelogs noted in my signature. Thanks, 0 -
Thanks for that. Yes the records are added :) I actually wanted to supress the warnings as I am testing a strange issue where if I add a additional A record for a subdomain via the API call ,somehow the original A record added by cPanel on sub-domain add gets deleted. I wanted to confirm its indeed a cPanel bug and the warnings printed all over was making my life not easy :) . I will file a seperate case once i have more info on the subdomain extra A record add bug 0 -
Thanks for that. Yes the records are added :) I actually wanted to supress the warnings as I am testing a strange issue where if I add a additional A record for a subdomain via the API call ,somehow the original A record added by cPanel on sub-domain add gets deleted. I wanted to confirm its indeed a cPanel bug and the warnings printed all over was making my life not easy :) . I will file a seperate case once i have more info on the subdomain extra A record add bug
Thanks for the added information. We have a similar case under 'CPANEL-17932'. Could you please open a ticket so we can check the issue directly? You can site this thread and case 'CPANEL-17932'. You may also share the ticket number here so we can update the thread.0 -
Turns out the issue I had was caused by a problem at my end and not an issue with the api The warnings still print out if we dont pass the ttl= which hopefully would be addressed in CPANEL-17980 Thanks again for the great support 0
Please sign in to leave a comment.
Comments
4 comments