Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set a ready being used port ,program coredump #347

Closed
zhanb opened this issue Oct 11, 2018 · 1 comment
Closed

set a ready being used port ,program coredump #347

zhanb opened this issue Oct 11, 2018 · 1 comment
Assignees
Milestone

Comments

@zhanb
Copy link

zhanb commented Oct 11, 2018

hi,when i set a ready being used like this :
settings->set_port(8080);
the progream would coredump,
the error message :
terminate called after throwing an instance of 'std::system_error'
what(): bind: Permission denied
Aborted (core dumped)

the core message:
#0 0x00007fd6e1f08989 in raise () from /lib64/libc.so.6
#1 0x00007fd6e1f0a098 in abort () from /lib64/libc.so.6
#2 0x00007fd6e280cd2d in __gnu_cxx::__verbose_terminate_handler () at ../../../../libstdc++-v3/libsupc++/vterminate.cc:95
#3 0x00007fd6e280ad86 in __cxxabiv1::__terminate (handler=) at ../../../../libstdc++-v3/libsupc++/eh_terminate.cc:47
#4 0x00007fd6e280add1 in std::terminate () at ../../../../libstdc++-v3/libsupc++/eh_terminate.cc:57
#5 0x00007fd6e280b039 in __cxxabiv1::__cxa_rethrow () at ../../../../libstdc++-v3/libsupc++/eh_throw.cc:125
#6 0x00007fd6e3334da1 in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<asio::basic_socket_acceptorasio::ip::tcp, std::allocator<asio::basic_socket_acceptorasio::ip::tcp >, asio::io_context&, asio::ip::basic_endpointasio::ip::tcp >(std::_Sp_make_shared_tag, asio::basic_socket_acceptorasio::ip::tcp*, std::allocator<asio::basic_socket_acceptorasio::ip::tcp > const&, asio::io_context&, asio::ip::basic_endpointasio::ip::tcp&&) () from /home/zhangbo/software/restbed/build/librestbed.so.4
#7 0x00007fd6e33325ef in std::__shared_ptr<asio::basic_socket_acceptorasio::ip::tcp, (__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<asio::basic_socket_acceptorasio::ip::tcp >, asio::io_context&, asio::ip::basic_endpointasio::ip::tcp >(std::_Sp_make_shared_tag, std::allocator<asio::basic_socket_acceptorasio::ip::tcp > const&, asio::io_context&, asio::ip::basic_endpointasio::ip::tcp&&) () from /home/zhangbo/software/restbed/build/librestbed.so.4
#8 0x00007fd6e332fd98 in std::shared_ptr<asio::basic_socket_acceptorasio::ip::tcp >::shared_ptr<std::allocator<asio::basic_socket_acceptorasio::ip::tcp >, asio::io_context&, asio::ip::basic_endpointasio::ip::tcp >(std::_Sp_make_shared_tag, std::allocator<asio::basic_socket_acceptorasio::ip::tcp > const&, asio::io_context&, asio::ip::basic_endpointasio::ip::tcp&&) () from /home/zhangbo/software/restbed/build/librestbed.so.4
#9 0x00007fd6e332ba98 in std::shared_ptr<asio::basic_socket_acceptorasio::ip::tcp > std::allocate_shared<asio::basic_socket_acceptorasio::ip::tcp, std::allocator<asio::basic_socket_acceptorasio::ip::tcp >, asio::io_context&, asio::ip::basic_endpointasio::ip::tcp >(std::allocator<asio::basic_socket_acceptorasio::ip::tcp > const&, asio::io_context&, asio::ip::basic_endpointasio::ip::tcp&&) () from /home/zhangbo/software/restbed/build/librestbed.so.4
#10 0x00007fd6e3328296 in std::shared_ptr<asio::basic_socket_acceptorasio::ip::tcp > std::make_shared<asio::basic_socket_acceptorasio::ip::tcp, asio::io_context&, asio::ip::basic_endpointasio::ip::tcp >(asio::io_context&, asio::ip::basic_endpointasio::ip::tcp&&) () from /home/zhangbo/software/restbed/build/librestbed.so.4
#11 0x00007fd6e331a1a2 in restbed::detail::ServiceImpl::http_start() () from /home/zhangbo/software/restbed/build/librestbed.so.4
#12 0x00007fd6e338c4ec in restbed::Service::start(std::shared_ptr<restbed::Settings const> const&) () from /home/zhangbo/software/restbed/build/librestbed.so.4

should i use the try catch before service start? But i can not find it in the exmple

@ben-crowhurst
Copy link
Member

You don't have permission to bind to that port 8080. Use a port your user has privileges for.

@ben-crowhurst ben-crowhurst self-assigned this Feb 8, 2020
@ben-crowhurst ben-crowhurst added this to the 4.7 milestone Feb 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants