what was the reason to get (13)Permission denied: make_sock: could not bind to address [::]:9000 error?
Solution 1
Many a times this error occurs if you are using Selinux ( Only for RedHat base OS) and it is not configured properly. Try disabling Selinux by setenforce 0
or if you don't want to disable selinux than properly configure selinux by :-
semanage port -l | grep http
semanage port -a -t http_port_t -p tcp 9000
Restart your apache server and check.
Also you can check the netstat command ouput to see if ports are already been used or not.
netstat -tunalp | grep :9000
netstat -tunalp | grep :80
Solution 2
There are two issues that need to be resolved:
- Permissions and access to httpd
- Port access
- The first issue involves ownership it could be that your server hasn't the right permissions and you need to chmod a folder (obviously not your document root or any folder that users connecting to the webserver have access to). To check if this is the issue run in terminal
sudo httpd
sudo allows you to run commands as root. If it works as normal then its a permissions issue.
- Only one server can access one port it is assigned. If another server accesses the same port, it will be denied access to that port. So if you have two servers they cannot operate on the same port simultaneously. You will need to change the appropriate configuration files that limit the scope of your server that is accessing port 80, 8080 or 9000. If you have a default apache server (as is sometimes the case in MacOS) then you will need to limit its scope or disable it entirely.
sudo bash -x /usr/sbin/apachectl -k stop
Will stop the default server in MacOS
sudo launchctl unload /System/Library/LaunchDaemons/org.apache.httpd.plist
Will stop future running at startup
Ramnath Reddy
Updated on June 04, 2022Comments
-
Ramnath Reddy almost 2 years
I am trying to configure two sites on different ports of same ip address.
(13)Permission denied: make_sock: could not bind to address [::]:9000
I am getting error . what is reason to this error and how to solve this error ?
my
httpd.conf
file isListen 80 NameVirtualHost 192.168.2.10:80 <VirtualHost 192.168.2.10:80> DocumentRoot /var/www/html/white-socks ServerName www.white-socks.com </VirtualHost> Listen 9000 NameVirtualHost 192.168.2.10:9000 <VirtualHost 192.168.2.10:9000> DocumentRoot /var/www/html/black-socks ServerName www.black-socks.com </VirtualHost>
I am getting error like below.
[root@ram conf]# service httpd start Starting httpd: httpd: apr_sockaddr_info_get() failed for ram httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName (13)Permission denied: make_sock: could not bind to address [::]:9000 (13)Permission denied: make_sock: could not bind to address 0.0.0.0:9000 no listening sockets available, shutting down Unable to open logs [FAILED] [root@ram conf]#
what i have to do fix this ?