Project

General

Profile

Bug #11425

XMLRPC error with Captive Portal and CARP failover when GUI is on non-standard port

Added by Luca De Andreis 2 months ago. Updated 30 days ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
XMLRPC
Target version:
Start date:
02/16/2021
Due date:
% Done:

100%

Estimated time:
Affected Version:
2.5.0
Affected Architecture:
Release Notes:
Default

Description

.... after countless attempts and two tickets that you closed for me, I found the cause of the problem.
The tcp port of the webgui.
If I use the default it works correctly, if I use an alternative port (for example 8443) this warning appears.

Associated revisions

Revision fef846ce (diff)
Added by Jim Pingle 2 months ago

Fix custom XMLRPC port for Captive Portal. Fixes #11425

Revision 9d08d4bf (diff)
Added by Jim Pingle about 2 months ago

Fix custom XMLRPC port for Captive Portal. Fixes #11425

(cherry picked from commit fef846ce7ec4158a140f359b0fb35182f6ae9db9)

History

#1 Updated by Jim Pingle 2 months ago

  • Subject changed from Alert: XMLRPC method captive_portal_sync FOUND the cause of the problem to XMLRPC error with Captive Portal and CARP failover when GUI is on non-standard port
  • Assignee set to Jim Pingle
  • Target version set to CE-Next

Previous issues: #11218, #11220

Though you still did not provide enough information here, I managed to piece together enough from your rejected issues to figure out what you were talking about. In the future, you must include all details in the current issue.

With the information that the port was the problem I was able to spot a bug in the code which seems to be the culprit. The small change below should fix it for you.

index 1d84efd223..65b48e0e77 100755
--- a/src/etc/rc.carpmaster
+++ b/src/etc/rc.carpmaster
@@ -130,7 +130,7 @@ if (!empty($config['captiveportal']) && is_array($config['hasync']) && !empty($c
                $xmlrpc_username = $config['hasync']['username'];
        }
        $xmlrpc_port = $config['system']['webgui']['port'];
-       if (empty($port)) {
+       if (empty($xmlrpc_port)) {
                if ($config['system']['webgui']['protocol'] == "http") {
                        $xmlrpc_port = "80";
                } else {

It's too late to fix this for 2.5.0, but the next patch release we put out can include it.

#2 Updated by Luca De Andreis 2 months ago

Luca De Andreis wrote:

.... after countless attempts and two tickets that you closed for me, I found the cause of the problem.
The tcp port of the webgui.
If I use the default it works correctly, if I use an alternative port (for example 8443) this warning appears.

Jim Pingle wrote:

Previous issues: #11218, #11220

Though you still did not provide enough information here, I managed to piece together enough from your rejected issues to figure out what you were talking about. In the future, you must include all details in the current issue.

With the information that the port was the problem I was able to spot a bug in the code which seems to be the culprit. The small change below should fix it for you.

[...]

It's too late to fix this for 2.5.0, but the next patch release we put out can include it.

Yes ! Now works without alert on an alternative GUI port.

Thanks !

#3 Updated by Jim Pingle 2 months ago

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

#4 Updated by Jim Pingle 2 months ago

  • Status changed from Feedback to In Progress

Needs picked back after the release is tagged.

#5 Updated by Jim Pingle 2 months ago

  • Status changed from In Progress to Waiting on Merge

#6 Updated by Jim Pingle about 2 months ago

  • Status changed from Waiting on Merge to Feedback

Picked back

#7 Updated by Renato Botelho about 2 months ago

  • Target version changed from CE-Next to 2.5.1

#8 Updated by Max Leighton 30 days ago

  • Status changed from Feedback to Resolved

Tested in

2.5.1-RC (amd64)
built on Thu Mar 18 03:04:03 EDT 2021
FreeBSD 12.2-STABLE

It's fixed. The XMLRPC errors are no longer generated with GUI on alternative port. Marking the ticket resolved.

Also available in: Atom PDF