Controller on Mac, port 443 in use for something else

Posted on
Mon Feb 15, 2021 6:19 am
macpro offline
User avatar
Posts: 765
Joined: Dec 29, 2005
Location: Third byte on the right

Controller on Mac, port 443 in use for something else

I'm running the UniFi controller on a Mac where I also run Profile Manager.
The UniFi controller uses port 8443. Profile Manager uses port 443.

The UniFi plugin tries to connect to port 443 first and then fails because it doesn't get the answer it expects.

Code: Select all
   uniFiAP Error                   Connection: in Line 4744 has error=No JSON object could be decoded   
   uniFiAP Error                   UNIFI executeCMDOnController error no json object: (wrong UID/passwd, ip number?ip.ip.ip.ip) ...>><!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /api/auth/login was not found on this server.</p>
</body></html>
<<


Please add an option to the config to specifiy the port number that the plugin will use to connect to the controller.
I'm running the latest version: 7.36.324

Posted on
Mon Feb 15, 2021 8:05 am
kw123 offline
User avatar
Posts: 8363
Joined: May 12, 2013
Location: Dallas, TX

Re: Controller on Mac, port 443 in use for something else

I just removed that option to automate the config
Let me think about it.

when you upgrade the controller to v 6 you will have 2 systems that use 443 on your mac.

Then it will break.


Sent from my iPhone using Tapatalk

Posted on
Mon Feb 15, 2021 9:01 am
FlyingDiver offline
User avatar
Posts: 7213
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Controller on Mac, port 443 in use for something else

That's why I run the controller in Docker so I can remap the ports as needed.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Mon Feb 15, 2021 9:18 am
macpro offline
User avatar
Posts: 765
Joined: Dec 29, 2005
Location: Third byte on the right

Re: Controller on Mac, port 443 in use for something else

kw123 wrote:
when you upgrade the controller to v 6 you will have 2 systems that use 443 on your mac.

Then it will break.

It will not. The UniFi controller does not use port 443. (I’m already on 6.0.45.)
And if it would, you can always change the port numbers in the system.properties file.
That’s another reason why it would be better to let the port number be a configurable item.

Posted on
Mon Feb 15, 2021 12:18 pm
kw123 offline
User avatar
Posts: 8363
Joined: May 12, 2013
Location: Dallas, TX

Controller on Mac, port 443 in use for something else

With the new version it is.

It you don’t set anything it will try 443 and 8443. That should cover 95% of configs


Sent from my iPhone using Tapatalk

Posted on
Mon Feb 15, 2021 3:23 pm
macpro offline
User avatar
Posts: 765
Joined: Dec 29, 2005
Location: Third byte on the right

Re: Controller on Mac, port 443 in use for something else

But why use port 443? The default port is 8443. The UniFi controller does not use port 443.
See https://help.ui.com/hc/en-us/articles/2 ... Ports-Used for a list of ports.

Posted on
Mon Feb 15, 2021 3:46 pm
FlyingDiver offline
User avatar
Posts: 7213
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Controller on Mac, port 443 in use for something else

And 443 is the default HTTPS port, which will be in use if the machine is running a web server.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Mon Feb 15, 2021 8:10 pm
kw123 offline
User avatar
Posts: 8363
Joined: May 12, 2013
Location: Dallas, TX

Re: Controller on Mac, port 443 in use for something else

for the controller w Unifi hardware:
the older version (5.x) ran on 8443, the new versions w info hardware all use 443

it might be that the Mac / unix version still runs on 8443

Karl

ps I am in a hotel now, power at home went out, not clear when it will come back.
dallas downtown is dark
we are in the hotel - no TV, no WiFi, no food, and manual check in = they wrote my cc info on a piece of paper and it took 2 hours to check.. and they are sold out , - all hotels in dallas are sold out

Posted on
Tue Feb 16, 2021 12:34 am
macpro offline
User avatar
Posts: 765
Joined: Dec 29, 2005
Location: Third byte on the right

Re: Controller on Mac, port 443 in use for something else

kw123 wrote:
for the controller w Unifi hardware:
the older version (5.x) ran on 8443, the new versions w info hardware all use 443

That's new to me. Didn't know that.

If you want to stick to the auto-config, may I suggest the following?

Connect to 443 and verify if it works. If it does but you don't get the reply you're expecting, move to the next port: 8443. Try the connection again.

But to be honest, I think it is not a good design decision to let users not enter the port they are using.
They might have good reasons to use other ports.

Posted on
Tue Feb 16, 2021 2:27 am
kw123 offline
User avatar
Posts: 8363
Joined: May 12, 2013
Location: Dallas, TX

Re: Controller on Mac, port 443 in use for something else

In the new version you can set it. If you don’t set it it will try 443 then &443


Sent from my iPhone using Tapatalk

Posted on
Tue Feb 16, 2021 1:20 pm
macpro offline
User avatar
Posts: 765
Joined: Dec 29, 2005
Location: Third byte on the right

Re: Controller on Mac, port 443 in use for something else

Thanks for the quick fix. Upgraded and it’s working again.

[nag]
There’s a typo in the description for the port parameter. “ahve” instead of “have”.
[/nag]

Posted on
Tue Feb 16, 2021 2:01 pm
matt (support) offline
Site Admin
User avatar
Posts: 21416
Joined: Jan 27, 2003
Location: Texas

Re: Controller on Mac, port 443 in use for something else

kw123 wrote:
ps I am in a hotel now, power at home went out, not clear when it will come back.
dallas downtown is dark
we are in the hotel - no TV, no WiFi, no food, and manual check in = they wrote my cc info on a piece of paper and it took 2 hours to check.. and they are sold out , - all hotels in dallas are sold out

Stay safe and (hopefully) warm, Karl. So far we've lucked out in my sub-division and still have power, but one major street over they've been our for 36+ hours now.

Image

Posted on
Tue Feb 16, 2021 2:34 pm
kw123 offline
User avatar
Posts: 8363
Joined: May 12, 2013
Location: Dallas, TX

Re: Controller on Mac, port 443 in use for something else

The hotel lost power too. We drove home and 10 minutes after we arrived power came back. And one of the water pipes / faucets is frozen. Hope it will not burst when it thaws.
But have ice on the pool.


Sent from my iPhone using Tapatalk

Posted on
Tue Feb 16, 2021 4:06 pm
kw123 offline
User avatar
Posts: 8363
Joined: May 12, 2013
Location: Dallas, TX

Controller on Mac, port 443 in use for something else

macpro wrote:
Thanks for the quick fix. Upgraded and it’s working again.

[nag]
There’s a typo in the description for the port parameter. “ahve” instead of “have”.
[/nag]
Ahve and teh are the secret passwords


Sent from my iPhone using Tapatalk

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 4 guests