Project

General

Profile

Actions

Bug #8079

closed

XMLRPC Issues with Captive Portal Vouchers

Added by Jim Pingle over 6 years ago. Updated over 6 years ago.

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

100%

Estimated time:
Plus Target Version:
Release Notes:
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.

Actions #1

Updated by Jim Pingle over 6 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.

Actions #2

Updated by Jim Pingle over 6 years ago

  • Status changed from New to Feedback
  • % Done changed from 0 to 100
Actions #3

Updated by Paighton Bisconer over 6 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

Actions #4

Updated by Jim Pingle over 6 years ago

That snapshot is not recent enough to contain the changes

Actions #5

Updated by Chris Linstruth over 6 years ago

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

Actions #6

Updated by Jim Pingle over 6 years ago

  • Status changed from Feedback to Resolved
Actions #7

Updated by Dejan Milojevic over 6 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).

Actions

Also available in: Atom PDF