Closed KaungZawHtet closed 3 years ago
Hey @KaungZawHtet ,
I've changed connection provider settings to:
return oatpp::network::tcp::server::ConnectionProvider::createShared({"0.0.0.0", 8000, oatpp::network::Address::IP_4});
Now it should work.
You can also play with host, and IP version.
Please let me know if it works for you now.
Regards, Leonid
Same problem:
E |2020-10-11 21:33:13 1602451993394144| [oatpp::network::tcp::server::ConnectionProvider::instantiateServer()]:Error. Couldn't bind. Address in use
terminate called after throwing an instance of 'std::runtime_error'
what(): [oatpp::network::tcp::server::ConnectionProvider::instantiateServer()]: Error. Couldn't bind Address in use
Aborted
Hey @KaungZawHtet ,
Not the same:
In the first case, you had
Error. Couldn't bind Address not available - # like for example if you were trying to use IPv6 addr which was not available.
And in the second case:
Error. Couldn't bind Address in use - # Mean that you already have some service running on that address.
So, you have to check if something already running on the address. Or change the host/port.
You may check this for more info on the last error - https://stackoverflow.com/questions/15198834/bind-failed-address-already-in-use
received "helloworld" from localhost:8000/ on browser It means I m ok now, right ?
Yes.
It should json
{"statusCode":200,"message":"Hello World!"}
ok, got it. Thx for ur help. Now this can be closed now
Great, Please let me know in case of other issues.
When I run in
./my-project-exe
at/service/build
on docker, the err is shown :Is there something I missed ?