puma / puma-dev

A tool to manage rack apps in development with puma
BSD 3-Clause "New" or "Revised" License
1.74k stars 107 forks source link

Test fails on master #264

Closed momolog closed 3 years ago

momolog commented 3 years ago

I am using MacOSX 11 (Big Sur).

When I check out master and run

make install
make test

I get one failing test:

=== RUN   TestServeDNS
listen udp 127.0.0.1:10053: bind: operation not permitted--- FAIL: TestServeDNS (0.45s)
    dns_test.go:50:
            Error Trace:    dns_test.go:50
            Error:          Received unexpected error:
                            All attempts fail:
                            #1: dial tcp 127.0.0.1:10053: connect: connection refused
                            #2: dial tcp 127.0.0.1:10053: connect: connection refused
                            #3: dial tcp 127.0.0.1:10053: connect: connection refused
            Test:           TestServeDNS
    dns_test.go:43:
            Error Trace:    dns_test.go:43
                                        retry.go:104
                                        dns_test.go:37
            Error:          Received unexpected error:
                            dns: server not started
            Test:           TestServeDNS
    dns_test.go:57:
            Error Trace:    dns_test.go:57
            Error:          Received unexpected error:
                            listen udp 127.0.0.1:10053: bind: operation not permitted
            Test:           TestServeDNS

What could be the reason for this? Does the test make assumptions that are not always fulfilled?

nonrational commented 3 years ago

I have not run the tests on Big Sur yet, so it's quite possible that something has broken.

I'll add macos-11.0 to the test matrix.

nonrational commented 3 years ago

Likely duplicate of #237

I believe this is related to the macOS firewall blocking puma-dev. There is a solution for Catalina but I'm not sure if it works in Big Sur.

ericmatte commented 3 years ago

Likely duplicate of #237

I believe this is related to the macOS firewall blocking puma-dev. There is a solution for Catalina but I'm not sure if it works in Big Sur.

@nonrational, on Big Sur for me the solution did not work:

image

(I've also tried with the full path directly)

Another ref: https://developer.apple.com/forums/thread/666222?answerId=648130022#648130022

EDIT: It is possible to add it through the UI: System Preferences > Security & Privacy > Firewall, put that did not solved the issue for me (DNS Server failed: bind: address already in use)

EDIT 2: https://github.com/puma/puma-dev/issues/111#issuecomment-293684005 seems to have fixed my issue.

momolog commented 3 years ago

@nonrational @ericmatte Thanks, I will check later today.