Permission issue with binding port 80
Added by Magnus Arntzen over 11 years ago
Hi.
I wondered if any of you might know the reason for this problem:
After a long uptime (I don't know for how long, but at least a month) I suddenly experience that the webpage goes down with this error:
[2013-Dec-09 08:37:46.246115] 14938 - [error] "wthttp: Error occurred when binding to 0.0.0.0:80 bind: Permission denied"
[2013-Dec-09 08:37:46.246255] 14938 - [info] "WServer/wthttp: fatal: Error (asio): bind: Permission denied"
This runs off a virtual machine with linux and there is nothing else running there which might "steal" port 80 as far as I know.
Current Wt version: Release 3.3.1 (October, ? 2013) from git on October 14.
Start-up line:
./myProgram.wt -c /my/path/wt_config.xml ---accesslog log.txt ---http-address 0.0.0.0 ---http-port 80 ---docroot=".;/data,/doc,/css,/resources,/images,/icons,/out" > /my/path/wtlog.txt 2>&1 &
We have also experienced this error one time before (with earlier version of Wt) without figuring out why. Do you know?
Thanks in advance!
Ragards,
Magnus Arntzen
Replies (2)
RE: Permission issue with binding port 80 - Added by Wim Dumon over 11 years ago
Magnus,
On unix, you must be root to listen on any port < 1024. I can't imagine that a running Wt server suddenly stops with this error, so I assume you see this error when restarting the server?
BR,
Wim.
RE: Permission issue with binding port 80 - Added by Magnus Arntzen over 11 years ago
Thanks Wim.
Silly me - of course you are right. The real reason for terminating was this:
terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injectorboost::bad_weak_ptr >'
what(): tr1::bad_weak_ptr
I'll run it in a debugger now, but basically I have no idea what could cause this error. Any guesses at this stage?
Regards,
Magnus