question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to bind to port 80 on macOS

See original GitHub issue

Preliminary Checks

Description

MacOS has allowed unprivileged access to binding to all ports since macOS 10.14, but only when binding to 0.0.0.0.

Reproduction Link

https://github.com/gatsbyjs/gatsby-starter-minimal

Steps to Reproduce

  1. Open any gatsby project on a mac
  2. Run gatsby develop --host 0.0.0.0 --port 80

Expected Result

It should bind to port 80

Actual Result

It does not bind to port 80

Environment

System:
    OS: macOS 11.6
    CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 16.13.0 - ~/.nvm/versions/node/v16.13.0/bin/node
    Yarn: 1.22.17 - ~/.nvm/versions/node/v16.13.0/bin/yarn
    npm: 8.1.0 - ~/.nvm/versions/node/v16.13.0/bin/npm
  Languages:
    Python: 2.7.16 - /usr/bin/python
  Browsers:
    Chrome: 96.0.4664.45
    Firefox: 94.0.1
    Safari: 14.1.2

Config Flags

No response

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:27 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
simon-abbottcommented, Jun 16, 2022

Aah! A ghost! (not fixed, don’t close)

0reactions
LekoArtscommented, Jul 15, 2022

@the-redx Go ahead and put up a PR yourself 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

How can I open port 80 so a non-root process can bind to it?
Normally only root processes can bind to port 80 (or to any port below 1024). Can I open port 80 specifically so that...
Read more >
lost ability to bind port 80 on mac, how to debug? - Super User
One simple solution is to have it bind to a higher port number and then in your operating system firewall, set up a...
Read more >
Cannot use port 80 on Mac - Stack Overflow
Ports from 1 to 1024 cannot be used by normal users without root credentials. You would be able to use sudo to bind...
Read more >
How is caddy able to bind to port 80 and 443 on MacOS ...
One thing I don't understand is, how is Caddy able to work on port 80 and 443 on MacOS without root. I'm not...
Read more >
Port 80: connection refused. How to fix on Mac OSX? [duplicate]
Namely, the machine that fails to serve the virtual host test.dev on 80 shows me this on port scan: Сканирование портов выполняется… Port...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found