Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hledger-web: default port 5000 sometimes conflicts on macOS #2145

Open
themaxdavitt opened this issue Dec 23, 2023 · 3 comments
Open

hledger-web: default port 5000 sometimes conflicts on macOS #2145

themaxdavitt opened this issue Dec 23, 2023 · 3 comments
Labels
A-WISH Some kind of improvement request, hare-brained proposal, or plea. web The hledger-web tool.

Comments

@themaxdavitt
Copy link

Hi! I'm using hledger 1.28 mac-aarch64 on macOS Sonoma 14.1.2 (23B92). Sometimes when I try to use hledger-web with its default port of 5000 I have trouble connecting to the web server, and I suspect that this is because as of Monterey port 5000 is being used by AirPlay Receiver. AFAICT you can check if AirPlay Receiver is serving on that port by looking for a header like Server: AirTunes/123.45.6.

I'm not sure how to reliably reproduce this; hopefully I'm not the only one who's encountering it. 😅 I know the version I'm using is outdated but it doesn't look like this has changed in the meantime. Please consider changing the default port for hledger-web on macOS to something else. Thank you!

@themaxdavitt themaxdavitt added the A-WISH Some kind of improvement request, hare-brained proposal, or plea. label Dec 23, 2023
@simonmichael
Copy link
Owner

simonmichael commented Dec 23, 2023

Thanks for the report. I have noticed that use of 5000 by Apple, but have not experienced the clash myself. I'm open to a PR changing this, although it may touch a lot of docs and scripts. 3000 is one I have used. But what's a good way to pick a nice mnemonic number with a low chance of having to change it again ?

@simonmichael simonmichael added the web The hledger-web tool. label Dec 23, 2023
@simonmichael
Copy link
Owner

simonmichael commented Dec 23, 2023

https://serverfault.com/questions/11806/which-ports-to-use-on-a-self-written-tcp-server suggests using 49153 or greater.

I would like to pick 50000, but various things use that: https://www.speedguide.net/port.php?port=50000

https://www.speedguide.net/port.php?port=49999 is the first one I've found with no known users, but it's ugly.

@simonmichael
Copy link
Owner

https://www.speedguide.net/ports.php?filter=55550 is another free one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-WISH Some kind of improvement request, hare-brained proposal, or plea. web The hledger-web tool.
Projects
None yet
Development

No branches or pull requests

2 participants