Project

General

Profile

Bug #8079

XMLRPC Issues with Captive Portal Vouchers

Added by Jim Pingle almost 2 years ago. Updated almost 2 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Captive Portal
Target version:
Start date:
11/10/2017
Due date:
% Done:

100%

Estimated time:
Affected Version:
2.4.x
Affected Architecture:
All

Description

Multiple issues with Captive Portal vouchers:

1. Sync of the voucher configuration doesn't work because in /etc/rc.filter_synchronize the configuration area is labeled "vouchers" when it should be "voucher"

2. When a voucher action is taken, a PHP stack trace appears on the secondary:

xception calling XMLRPC method exec_php #1 : Unhandled XML_RPC2_InvalidTypeEncodeException exception:Impossible to encode value '' from type 'NULL'. No analogous type in XML_RPC.#0 /usr/local/share/pear/XML/RPC2/Backend/Php/Value/Struct.php(107): XML_RPC2_Backend_Php_Value::createFromNative(NULL)
#1 /usr/local/share/pear/XML/RPC2/Backend/Php/Value/Struct.php(107): XML_RPC2_Backend_Php_Value_Struct->encode()
#2 /usr/local/share/pear/XML/RPC2/Backend/Php/Response.php(86): XML_RPC2_Backend_Php_Value_Struct->encode()
#3 /usr/local/share/pear/XML/RPC2/Backend/Php/Server.php(135): XML_RPC2_Backend_Php_Response::encode(Array, 'utf-8')
#4 /usr/local/share/pear/XML/RPC2/Backend/Php/Server.php(99): XML_RPC2_Backend_Php_Server->getResponse()
#5 /usr/local/www/xmlrpc.php(555): XML_RPC2_Backend_Php_Server->handleCall()
#6 {main} @ 2017-11-10 12:56:08
Exception calling XMLRPC method exec_php #1 : Unhandled XML_RPC2_InvalidTypeEncodeException exception:Impossible to encode value '' from type 'NULL'. No analogous type in XML_RPC.#0 /usr/local/share/pear/XML/RPC2/Backend/Php/Value/Struct.php(107): XML_RPC2_Backend_Php_Value::createFromNative(NULL)
#1 /usr/local/share/pear/XML/RPC2/Backend/Php/Value/Struct.php(107): XML_RPC2_Backend_Php_Value_Struct->encode()
#2 /usr/local/share/pear/XML/RPC2/Backend/Php/Response.php(86): XML_RPC2_Backend_Php_Value_Struct->encode()
#3 /usr/local/share/pear/XML/RPC2/Backend/Php/Server.php(135): XML_RPC2_Backend_Php_Response::encode(Array, 'utf-8')
#4 /usr/local/share/pear/XML/RPC2/Backend/Php/Server.php(99): XML_RPC2_Backend_Php_Server->getResponse()
#5 /usr/local/www/xmlrpc.php(555): XML_RPC2_Backend_Php_Server->handleCall()
#6 {main} @ 2017-11-10 12:56:09 

First is an easy fix, second looks similar to #7953, just need to track down exactly where it's happening.

Associated revisions

Revision ff25106d (diff)
Added by Jim Pingle almost 2 years ago

Correct voucher config section name. Part of ticket #8079

Revision 927a988e (diff)
Added by Jim Pingle almost 2 years ago

When synchronizing vouchers, avoid allowing null values. Also, fix a missing variable global declaration. Part of ticket #8079

Revision 66dd4fe2 (diff)
Added by Jim Pingle almost 2 years ago

Remove this part, the voucher settings shouldn't be synchronized this way, it's handled via the voucher sync settings on the secondary. Fixes #8079

It was only working before because of this typo, the code shouldn't have been there at all.

History

#1 Updated by Jim Pingle almost 2 years ago

Actually #1 is not valid because that section shouldn't sync that way. That typo breaking the sync in that direction is the only reason it was working before.

A missing global declaration for $config in the sync code on the secondary is why the config/rolls didn't show up on the secondary as expected. It was also causing the error from point 2. I added some safety belts to it as well.

#2 Updated by Jim Pingle almost 2 years ago

  • Status changed from New to Feedback
  • % Done changed from 0 to 100

#3 Updated by Paighton Bisconer almost 2 years ago

Tested in Current Base System 2.4.2.a.20171110.1037

Still produces Errors on Secondary after testing expired voucher

Communications error occurred
Exception calling XMLRPC method exec_php #1 : Unhandled XML_RPC2_InvalidTypeEncodeException exception:Impossible to encode value '' from type 'NULL'. No analogous type in XML_RPC.#0 /usr/local/share/pear/XML/RPC2/Backend/Php/Value/Struct.php(107): XML_RPC2_Backend_Php_Value::createFromNative(NULL)
#1 /usr/local/share/pear/XML/RPC2/Backend/Php/Value/Struct.php(107): XML_RPC2_Backend_Php_Value_Struct->encode()
#2 /usr/local/share/pear/XML/RPC2/Backend/Php/Response.php(86): XML_RPC2_Backend_Php_Value_Struct->encode()
#3 /usr/local/share/pear/XML/RPC2/Backend/Php/Server.php(135): XML_RPC2_Backend_Php_Response::encode(Array, 'utf-8')
#4 /usr/local/share/pear/XML/RPC2/Backend/Php/Server.php(99): XML_RPC2_Backend_Php_Server->getResponse()
#5 /usr/local/www/xmlrpc.php(555): XML_RPC2_Backend_Php_Server->handleCall()
#6 {main} 2017-11-10 19:29:54
Exception calling XMLRPC method exec_php #1 : Unhandled XML_RPC2_InvalidTypeEncodeException exception:Impossible to encode value '' from type 'NULL'. No analogous type in XML_RPC.#0 /usr/local/share/pear/XML/RPC2/Backend/Php/Value/Struct.php(107): XML_RPC2_Backend_Php_Value::createFromNative(NULL)
#1 /usr/local/share/pear/XML/RPC2/Backend/Php/Value/Struct.php(107): XML_RPC2_Backend_Php_Value_Struct->encode()
#2 /usr/local/share/pear/XML/RPC2/Backend/Php/Response.php(86): XML_RPC2_Backend_Php_Value_Struct->encode()
#3 /usr/local/share/pear/XML/RPC2/Backend/Php/Server.php(135): XML_RPC2_Backend_Php_Response::encode(Array, 'utf-8')
#4 /usr/local/share/pear/XML/RPC2/Backend/Php/Server.php(99): XML_RPC2_Backend_Php_Server->getResponse()
#5 /usr/local/www/xmlrpc.php(555): XML_RPC2_Backend_Php_Server->handleCall()
#6 {main}
2017-11-10 19:29:55

#4 Updated by Jim Pingle almost 2 years ago

That snapshot is not recent enough to contain the changes

#5 Updated by Chris Linstruth almost 2 years ago

Tested latest snapshot 2.4.2.a.20171110.1936. Works here.

#6 Updated by Jim Pingle almost 2 years ago

  • Status changed from Feedback to Resolved

#7 Updated by Dejan Milojevic almost 2 years ago

Master and slave servers still do not communicate 100% properly in relation to expired/active vouchers and do not update each other consistently upon expiring the ticket (on demand).

Also available in: Atom PDF