Boost logo

Boost Users :

Subject: Re: [Boost-users] Server application won't bind to ports on IP address other than my internal ones
From: Osman Zakir (osmanzakir90_at_[hidden])
Date: 2019-01-11 21:42:20


I built the HTTP server example from Asio and tried to run it. Same problem. I set up port forwarding for port 8080, passed 0.0.0.0 as the address in command line arguments and tried to visit my external IP address in my browser (wrote an HTML page to act as a landing page). Can't reach the app, as with my own server application. So either it's both of the possibilities mentioned before, or just that firewall needs to configured properly. Except it already seems like the firewall is allowing both applications through. Maybe there's something in the configuration that I'm still missing, though.
________________________________
From: Boost-users <boost-users-bounces_at_[hidden]> on behalf of Paul A. Bristow via Boost-users <boost-users_at_[hidden]>
Sent: Friday, January 11, 2019 8:31 PM
To: boost-users_at_[hidden]
Cc: Paul A. Bristow
Subject: Re: [Boost-users] Server application won't bind to ports on IP address other than my internal ones

From: Boost-users [mailto:boost-users-bounces_at_[hidden]] On Behalf Of Osman Zakir via Boost-users
Sent: 11 January 2019 14:43
To: boost-users_at_[hidden]
Cc: Osman Zakir
Subject: Re: [Boost-users] Server application won't bind to ports on IP address other than my internal ones

I'm going to try the Asio HTTP server example, then, but first I'll ask this: is the Jamfile.v2 file there for building the example? And if so, how do I run it?

Yes – all examples should have a jamfile (but not all do and writing one is tricky).

from the jamfile’s folder, say-boost\libs\asio\test

(but would be better to try a simpler library first to get your bearings)

or -boost\libs\asio\example\cpp03\iostreams

Ø b2 > my_logfile.txt

or add your special sauce

-a forces a completely rebuild (cleans first)

Ø b2 –a toolset=gcc,msvc,clang debug release -your_other_options >my log_file.txt

NB no spaces between compilers. b2/bjam plumbs new depths in stupid syntax.

HTH

Paul

________________________________

From: Boost-users <boost-users-bounces_at_[hidden]> on behalf of Richard Hodges via Boost-users <boost-users_at_[hidden]>
Sent: Friday, January 11, 2019 4:50 PM
To: Thomas Quarendon via Boost-users
Cc: Richard Hodges
Subject: Re: [Boost-users] Server application won't bind to ports on IP address other than my internal ones

If you compile one of the example applications (without modifying them at all), can you connect then?

If not, perhaps it's your own computer's firewall? If you're using windows you may need to relax the personal firewall security policy. If linux, then you may need to open a port on the network-facing interface (loopback interfaces are normally more permissive).

But I'm guessing here. You need to get a known working program running and start from there. If the verbatim asio examples fail, the problem is your environment If they work, it's your program that's at fault.

Of course it could easily be both - which is why we need to start with something we can trust.

On Fri, 11 Jan 2019 at 18:33, Osman Zakir via Boost-users <boost-users_at_[hidden]<mailto:boost-users_at_[hidden]>> wrote:

The error on Heroku and the MS Edge stuff I mentioned are separate things. Please don't mix them up. The error with Heroku when it can't get my server app to bind to any ports is a 404 Not Found error and in the browser it shows Heroku's own custom error page.

When I said that about running the app and visiting the browser, I wasn't talking about Dockerfiles and Heroku, I was talking about just running the server app by itself on my computer. Right now that's what I have to get to work first. I'll try using a Dockerfile for it again after the port binding issue is fixed.

_______________________________________________
Boost-users mailing list
Boost-users_at_[hidden]<mailto:Boost-users_at_[hidden]>
https://lists.boost.org/mailman/listinfo.cgi/boost-users

--
Richard Hodges
hodges.r_at_[hidden]<mailto:hodges.r_at_[hidden]>
office: +442032898513
home: +376841522
mobile: +376380212 (this will be *expensive* outside Andorra!)
skype: madmongo
facebook: hodges.r


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net