165 points · by tachyons · 5y ago · 134 comments
* It's the new AirPlay server capability.
* It can be toggled off.
* Those ports are the defaults for AirPlay.
It might've been nice to allow simple way of customizing the ports though..
Update: "It would appear commplex was a part of seeplex, some visualization tool for old Sun workstations in the early 90ies https://lib.dr.iastate.edu/cgi/viewcontent.cgi?article=11617..."
"The Commplex is a communications package for communication with the NCUBE from Sun workstations."
> * Those ports are the defaults for AirPlay.
No, those are the default port for UPnP discovery, and have been used also by Microsoft in the XP days. There's a reason Apple picked them: it's aligned with their use case, and already assigned by what, 16 years or so?
Probably also the context that you're missing, since that this post is actually somewhat a dupe.
Their usage of port 5000 appears compliant with IANA port designation.
I picked specifically 5000 because the IANA registration for this port was assigned to a single service, was not used and generally obscure. Whatever Apple has running on there is also unlikely to be what the IANA registration refers to.
Here's a quotation:
> Just did a bit more digging, and IANA actually assigns port 5000 to "commplex-main" - so really any other service that's using that port is violating the official assignment. Based on a quick search of what commplex-main is, it's related to UPnP for network device discoverability. I'm not sure exactly what the AirPlay Receiver service does, but I get the gist that it probably does fit somewhere into the scope of UPnP-related features. At the very least, it's probably a far more accurate usage of port 5000 than some random dev servers.
This port was actually also used back in XP and * Lion days both by Apple and Microsoft, but I have a hunch that *.local replaced these use cases and that's why it became disused until recently.
I'm not sure how this came to be to be honest. This is a very old system, but yet we still abuse the four digit range with private use ports. I mean, it's often just one digit away. Even as defaults in software packages where their developers should at least know better even if a random web developer might not.
Yeah, and while we're at it, let's burn all IETF RFCs. Who needs that?
Sadly, its almost certainly too late to add port numbers to DNS.
The only time fixed port numbers are inconvenient is when they conflict, but otherwise they're much easier to work with.
This already works by just telling flask to use port 0. Binding to port 0 is standard behaviour (literally, part of the standard) and like most other software of that type the first thing Flask does is report the URL it’s running on.
> but it offers tremendous convenience.
Except when it does not as is the case here. If you’re working on your web stuff having to copy/paste a URL from your term every time you restart your server.
What takes a while is another engineering principle that people are sometimes bitten by, trying to understand why a change in the system has occurred - in this case why your port that you always use is suddenly no longer open despite you not having done anything that you are aware of that might have closed it. Of course you want to understand why this change has happened because it seems weird, is there something nefarious going on at port 5000 now!?! Also because of all the things said above about wanting to not change all occurrences of 5000 in your developer docs and so forth so it would be nice if you figure out, as was shown as the top voted answer of the article, that you could go to somewhere in settings and turn off this usage of the port. I mean you could just scan and change what port you use to another currently open port without worrying about any of this stuff, which I guess would have worked in this case but I can't help but feel that would not really appear the best move whenever strange unexplained port usage changes occur. Your mileage evidently varies.
[1] https://www.iana.org/assignments/service-names-port-numbers/...
[2] The actual rate is something like 3--50 new and updated entries per year.
If port collisions were such a hassle, we wouldn't see anything like a "common" port (i. e. one that unrelated tools choose per default).
Good developers can have a pipe in every port, I guess...
(valid for development work only, especially those cases where you run some server and it opens the browser for you, port helpfully provided. There is value in ssh on 22 and http on 80, obvsly)
For those wondering why I needed port 5000 in my case, it was a standard Svelte app serving on localhost:5000 (via Sirv).
Is Svelte hard-wired to 5000?
I started off thinking it was a bit ridiculous that people developing wouldn’t just think ‘oh port 5000 is busy - let me try -p 6000 when running this’ but I see that was a wrong assumption, because the tool itself seems to perhaps be flawed in that it isn’t making it easy to diagnose and change how it runs to sidestep the used port.
Perhaps a feature request for svelte is in order?
Also why is there no official TLD for DNS for local domains?
As of now, but something about IPv6 also forced Microsoft to implement this, and some Linux distros also does this in CUPS (I know it's Apple...)
I use .home and it's fine, but there's the occasional oddity when e.g. Chrome doesn't recognise "myserver.home" as a FQDN as ".home" isn't on its built in list of TLDs
So, there's at least _some_ precedent that previously reserved things become unreserved :(
Though in this list, only .test and .example are marked as non-special and must be resolved normally by RFC 6761, and .local is reserved for mDNS by RFC 6762. In this list, .test would have been the most appropriate for Pow to use.
CydeWeys (Tech Lead of Google Registry) has commented on HN in the past that they did not anticipated people weren't following the best practices[4], which makes me think IANA should have given .dev the same treatment as .onion: by explicitly reserving them (but this is another topic to discuss).
[1]: https://github.com/basecamp/pow
[2]: https://github.com/laravel/valet
Current best practice is to use a subdomain of a domain you control for internal stuff. Makes getting certs for internal hosts easier too if you can be bothered.
Especially with short hostnames like pi.lan :)
... I don't understand the issue as it is easy to change.