Giter Site home page Giter Site logo

gin osx firewall issue about gin HOT 8 CLOSED

codegangsta avatar codegangsta commented on August 18, 2024
gin osx firewall issue

from gin.

Comments (8)

tamasd avatar tamasd commented on August 18, 2024 5

Same happened to me, because if your HOST environment variable is empty, the server is trying to bind to :3000, which needs permission from the firewall. The solution is to invoke gin like this: HOST="localhost" gin.

from gin.

codegangsta avatar codegangsta commented on August 18, 2024

hm. I haven't run into this issue before. Are you still able to reproduce this?

from gin.

Netherdrake avatar Netherdrake commented on August 18, 2024

Yup, every time.

I just run gin on sample martini.Classic() helloworld app.

On Mon, Mar 3, 2014, at 05:35 PM, Jeremy Saenz wrote:

hm. I haven't run into this issue before. Are you still able to
reproduce this?

Reply to this email directly or [1]view it on GitHub.
[3516903__eyJzY29wZSI6Ik5ld3NpZXM6QmVhY29uIiwiZXhwaXJlcyI6MTcwOTUxNjExM
iwiZGF0YSI6eyJpZCI6MjUxNDE4MzB9fQ==--32539489cf16de40e718e85eeec45d5d6c
a879b4.gif]

References

  1. #12 (comment)

from gin.

codegangsta avatar codegangsta commented on August 18, 2024

Is this a gin-specific thing? Or Go's net/http in general? In my tests it looks like the OSX firewall needs you to allow a binary to accept incoming net connections for any Go app using the net package.

from gin.

Netherdrake avatar Netherdrake commented on August 18, 2024

Well, as long as you're serving on 0.0.0.0 firewall comes up. If hoever
its just 127.0.0.1 than its fine.

On Mon, Mar 3, 2014, at 05:55 PM, Jeremy Saenz wrote:

Is this a gin-specific thing? Or Go's net/http in general? In my
tests it looks like the OSX firewall needs you to allow a binary to
accept incoming net connections for any Go app using the net
package.

Reply to this email directly or [1]view it on GitHub.
[3516903__eyJzY29wZSI6Ik5ld3NpZXM6QmVhY29uIiwiZXhwaXJlcyI6MTcwOTUxNzMxN
CwiZGF0YSI6eyJpZCI6MjUxNDE4MzB9fQ==--f4b054cc195648a72846f6fc8e9a4f2981
1405df.gif]

References

  1. #12 (comment)

from gin.

codegangsta avatar codegangsta commented on August 18, 2024

ah okay. I know that martini can change the host via the HOST environment variable. maybe we should allow gin to have a configurable host via arguments

from gin.

codegangsta avatar codegangsta commented on August 18, 2024

ah okay. Maybe we can set the host to localhost as the default instead.

On Tue, Apr 15, 2014 at 11:47 AM, Tamás Demeter-Haludka <
[email protected]> wrote:

Same happened to me, because if your HOST environment variable is empty,
the server is trying to bind to :3000, which needs permission from the
firewall. The solution is to invoke gin like this: HOST="localhost" gin.


Reply to this email directly or view it on GitHubhttps://github.com//issues/12#issuecomment-40519008
.

from gin.

Netherdrake avatar Netherdrake commented on August 18, 2024

Yeah that should work.

On Tue, Apr 15, 2014, at 11:52 AM, Jeremy Saenz wrote:

ah okay. Maybe we can set the host to localhost as the default instead.

On Tue, Apr 15, 2014 at 11:47 AM, Tamás Demeter-Haludka <

[email protected]> wrote:

Same happened to me, because if your HOST environment variable is
empty,

the server is trying to bind to :3000, which needs permission from
the

firewall. The solution is to invoke gin like this: HOST="localhost"
gin.

Reply to this email directly or view it on
GitHub<#12 (comment)
08>

.

Reply to this email directly or [1]view it on GitHub.
[3516903__eyJzY29wZSI6Ik5ld3NpZXM6QmVhY29uIiwiZXhwaXJlcyI6MTcxMzIwNzEzM
iwiZGF0YSI6eyJpZCI6MjUxNDE4MzB9fQ==--654c322f86939da828f3b71dac83296bd2
0863e8.gif]

References

  1. #12 (comment)

from gin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.