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

cuelang.org: tutorial prompts the reader to start a local server on a potentially contended port #177

Open
jpluscplusm opened this issue Aug 27, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@jpluscplusm
Copy link
Collaborator

What page were you looking at?

https://cuelang.org/docs/tutorial/working-with-a-custom-module-registry/

What version of the site were you looking at?

cue-lang/cuelang.org@b24925a

What did you do?

A user reported a problem completing the tutorial because they received an HTTP 403 halfway through the steps.

They posted a debug log that mentioned that AirTunes was the server involved. This led to https://stackoverflow.com/questions/72369320/why-always-something-is-running-at-port-5000-on-my-mac, which suggests that port 5000 isn't a macOS-friendly port for the tutorial to use for the local registry.

Suggestion: update to 5001, after confirming that neither common Linux distros nor macOS have something local that listens on that port by default.

@mvdan
Copy link
Member

mvdan commented Aug 27, 2024

Or use cue mod registry, which picks a randomly unused port:

$ cue mod registry
listening on 127.0.0.1:39321

Note that this requres the user to fish out the hostname and port from the first line of output though.

@myitcv
Copy link
Member

myitcv commented Dec 13, 2024

A user reported a problem completing the tutorial because they received an HTTP 403 halfway through the steps.

They should have received an error message when running

cue mod registry localhost:5000

Did they not? Perhaps we simply improve the docs to flag that this step might fail, with either the suggestion from @mvdan or "choose another port" as the answer.

cueckoo pushed a commit to cue-lang/cuelang.org-trybot that referenced this issue Jan 1, 2025
This updates a tutorial that instructs the reader to start an in-memory
OCI server on a specific port. The port is changed from 5000 to 5001,
and some prose is added to prompt the user to select another port if the
command still fails.

A relatively recent version of MacOS started using port 5000 for
AirTunes, trampling over the port's history as being available for
developers to use (e.g. the default for `npm serve`, etc).

I did a brief search to discover if the next port along, 5001, has a
similar problem. https://www.speedguide.net/port.php?port=5001 suggests
that port 5001 is relatively uncontended except for Yahoo Messenger
Voice Chat. If the prevalence of simultaneous CUE and Yahoo Messenger
users becomes significant or problematic then we can revisit this
choice.

Closes cue-lang/docs-and-content#177

Preview-Path: /docs/tutorial/working-with-a-custom-module-registry/
Signed-off-by: Jonathan Matthews <[email protected]>
Change-Id: I8594ef5af25393275f9dfc19d991516c87c0f81f
Dispatch-Trailer: {"type":"trybot","CL":1206545,"patchset":2,"ref":"refs/changes/45/1206545/2","targetBranch":"master"}
cueckoo pushed a commit to cue-lang/cuelang.org-trybot that referenced this issue Jan 7, 2025
This updates a tutorial that instructs the reader to start an in-memory
OCI server on a specific port. The port is changed from 5000 to 5001,
and some prose is added to prompt the user to select another port if the
command still fails.

A relatively recent version of MacOS started using port 5000 for
AirTunes, trampling over the port's history as being available for
developers to use (e.g. the default for `npm serve`, etc).

I did a brief search to discover if the next port along, 5001, has a
similar problem. https://www.speedguide.net/port.php?port=5001 suggests
that port 5001 is relatively uncontended except for Yahoo Messenger
Voice Chat. If the prevalence of simultaneous CUE and Yahoo Messenger
users becomes significant or problematic then we can revisit this
choice.

Closes cue-lang/docs-and-content#177

Preview-Path: /docs/tutorial/working-with-a-custom-module-registry/
Signed-off-by: Jonathan Matthews <[email protected]>
Change-Id: I8594ef5af25393275f9dfc19d991516c87c0f81f
Dispatch-Trailer: {"type":"trybot","CL":1206545,"patchset":3,"ref":"refs/changes/45/1206545/3","targetBranch":"master"}
cueckoo pushed a commit to cue-lang/cuelang.org that referenced this issue Jan 16, 2025
This updates a tutorial that instructs the reader to start an in-memory
OCI server on a specific port. The port is changed from 5000 to 5001,
and some prose is added to prompt the user to select another port if the
command still fails.

A relatively recent version of MacOS started using port 5000 for
AirTunes, trampling over the port's history as being available for
developers to use (e.g. the default for `npm serve`, etc).

I did a brief search to discover if the next port along, 5001, has a
similar problem. https://www.speedguide.net/port.php?port=5001 suggests
that port 5001 is relatively uncontended except for Yahoo Messenger
Voice Chat. If the prevalence of simultaneous CUE and Yahoo Messenger
users becomes significant or problematic then we can revisit this
choice.

Closes cue-lang/docs-and-content#177

Preview-Path: /docs/tutorial/working-with-a-custom-module-registry/
Signed-off-by: Jonathan Matthews <[email protected]>
Change-Id: I8594ef5af25393275f9dfc19d991516c87c0f81f
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cuelang.org/+/1206545
TryBot-Result: CUEcueckoo <[email protected]>
Reviewed-by: Paul Jolly <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Backlog
Development

No branches or pull requests

3 participants