I'm trying to install ownCloud on my Raspberry Pi. To install this I use this tutorial: http://forum.owncloud.org/viewtopic.php?f=21&t=21870 (it's in german)
So I did everything like described and after the configtest I wanted to restart with
apache2ctl restart
I got this:
httpd not running, trying to start
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:443
no listening sockets available, shutting down
Unable to open logs
Action 'restart' failed.
The Apache error log may have more information.
I found this information in the error log but I don't understand what the problem is:
[Mon Nov 03 09:17:46 2014] [notice] Apache/2.2.22 (Debian) configured -- resuming normal operations [Mon Nov 03 09:17:59 2014] [notice] caught SIGTERM, shutting down
[Mon Nov 03 09:18:01 2014] [notice] Apache/2.2.22 (Debian) PHP/5.4.4-14+deb7u14 configured -- resuming normal operations
[Mon Nov 03 09:18:46 2014] [notice] Graceful restart requested, doing restart apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
[Mon Nov 03 09:18:50 2014] [notice] Apache/2.2.22 (Debian) PHP/5.4.4-14+deb7u14 configured -- resuming normal operations
[Mon Nov 03 09:24:37 2014] [notice] caught SIGTERM, shutting down [Mon Nov 03 09:24:39 2014] [notice] Apache/2.2.22 (Debian) PHP/5.4.4-14+deb7u14 configured -- resuming normal operations [Mon Nov 03 09:32:51 2014] [notice] Graceful restart requested, doing restart
[Mon Nov 03 09:32:53 2014] [notice] Apache/2.2.22 (Debian) HP/5.4.4-14+deb7u14 configured -- resuming normal operations
[Mon Nov 03 09:36:33 2014] [notice] Graceful restart requested, doing restart
[Mon Nov 03 09:36:35 2014] [notice] Apache/2.2.22 (Debian) HP/5.4.4-14+deb7u14 configured -- resuming normal operations [Mon Nov 03 10:21:15 2014] [notice] SIGHUP received. Attempting to restart (98)Address already in use: make_sock: could not bind to address 0.0.0.0:443 no listening sockets available, shutting down Unable to open logs`
You have something else using port 443. Also, I believe the tutorial you mentioned is incorrect as you cannot bind an SSL VHost on a catchall IP (*:443 is not valid).
Change the vhost bind to read something like 192.168.1.60:443, where this is the static public IP of your Raspberry Pi.
Also, you should check what other services you are running on the system, and see if any of them is bound to run on port 443. You can do this by running the command netstat -lntp.
Related
I have issues with the server constantly. It seems to fail every few hours and I cannot tell why.
This morning I had 503 on all of my websites, I tried to restart Apache but
# service apache2 restart
[....] Restarting web server: apache2(98)Address already in use: make_sock: could not bind to address 127.0.0.1:8080
no listening sockets available, shutting down
Unable to open logs
Action 'start' failed.
The Apache error log may have more information.
failed!
I found out some of processes were still running. Killing them helped to restart Apache.
# grep -ri listen /etc/apache2
/etc/apache2/apache2.conf:# supposed to determine listening ports for incoming connections, and which
/etc/apache2/apache2.conf:# Include list of ports to listen on and which to use for name based vhosts
/etc/apache2/ports.conf:Listen 127.0.0.1:8080
/etc/apache2/ports.conf:#Listen 127.0.0.1:443
/etc/apache2/ports.conf:# Listen 443
/etc/apache2/ports.conf:# Listen 443
# killall -9 apache2
# service apache2 restart
[ ok ] Restarting web server: apache2.
I still have no idea how to prevent it from failing, here are some logs that I totally don't understand. Please help :)
From the time when it failed:
[Sun May 31 06:26:00 2015] [notice] FastCGI: process manager initialized (pid 9466)
[Sun May 31 06:26:00 2015] [error] python_init: Python version mismatch, expected '2.7.2+', found '2.7.3'.
[Sun May 31 06:26:00 2015] [error] python_init: Python executable found '/usr/bin/python'.
[Sun May 31 06:26:00 2015] [error] python_init: Python path being used '/usr/lib/python2.7/:/usr/lib/python2.7/plat-linux2:/usr/lib/python2.7/lib-tk:/usr/lib/python2.7/lib-old:/usr/lib/python2.7/lib-dynload'.
[Sun May 31 06:26:00 2015] [notice] mod_python: Creating 8 session mutexes based on 1000 max processes and 0 max threads.
[Sun May 31 06:26:00 2015] [notice] mod_python: using mutex_directory /tmp
[Sun May 31 06:26:01 2015] [notice] Apache/2.2.22 (Debian) mod_fastcgi/mod_fastcgi-SNAP-0910052141 Phusion_Passenger/5.0.8 PHP/5.5.25-1~dotdeb+7.1 mod_python/3.3.1 Python/2.7.3 mod_ssl/2.2.22 OpenSSL/1.0.1e mod_wsgi/3.3 configured -- resuming normal operations
[Sun May 31 06:26:01 2015] [warn] long lost child came home! (pid 17083)
[Sun May 31 06:26:01 2015] [warn] long lost child came home! (pid 17328)
[Sun May 31 06:26:01 2015] [warn] long lost child came home! (pid 17329)
[Sun May 31 06:26:01 2015] [warn] long lost child came home! (pid 17330)
And this is logged basically constantly:
[Sun May 31 13:36:03 2015] [warn] Couldn't set uid/gid/priority, closing connection.
[Sun May 31 13:36:03 2015] [warn] (itkmpm: pid=30911 uid=1001, gid=1001) itk_post_perdir_config(): setgid(1005): Operation not permitted
[Sun May 31 13:36:03 2015] [warn] Couldn't set uid/gid/priority, closing connection.
[Sun May 31 13:36:03 2015] [warn] (itkmpm: pid=30897 uid=1001, gid=1001) itk_post_perdir_config(): setgid(1005): Operation not permitted
[Sun May 31 13:36:03 2015] [warn] Couldn't set uid/gid/priority, closing connection.
[Sun May 31 13:36:04 2015] [warn] (itkmpm: pid=30930 uid=1001, gid=1001) itk_post_perdir_config(): setgid(33): Operation not permitted
[Sun May 31 13:36:04 2015] [warn] Couldn't set uid/gid/priority, closing connection.
[Sun May 31 13:36:06 2015] [warn] (itkmpm: pid=30938 uid=1001, gid=1001) itk_post_perdir_config(): setgid(33): Operation not permitted
I have an error after updating my packages. When trying to start my webserver, it throws the following error.
$ sudo service apache2 restart
* Restarting web server apache2 [fail]
* The apache2 configtest failed.
Output of config test was:
AH00526: Syntax error on line 84 of /etc/apache2/apache2.conf:
Invalid command 'LockFile', perhaps misspelled or defined by a module not included in the server configuration
Action 'configtest' failed.
The Apache error log may have more information.
And the Apache error log is (from file /var/log/apache2/error.log):
[Sat Aug 17 01:30:03 2013] [notice] Apache/2.2.22 (Ubuntu) PHP/5.4.17RC1 configured -- resuming normal operations
[Sat Aug 17 01:41:38 2013] [notice] caught SIGTERM, shutting down
[Sat Aug 17 03:10:11.132425 2013] [mpm_prefork:notice] [pid 4182] AH00163: Apache/2.4.6 (Ubuntu) PHP/5.5.1-2+debphp.org~raring+2 configured -- resuming normal operations
[Sat Aug 17 03:10:11.143718 2013] [core:notice] [pid 4182] AH00094: Command line: '/usr/sbin/apache2'
[Sat Aug 17 03:13:56.527245 2013] [mpm_prefork:notice] [pid 4182] AH00169: caught SIGTERM, shutting down
What things do I have to do to recover or fix my server up?
Replace in apache2.conf:
LockFile /var/lock/apache2/accept.lock
with
Mutex file:${APACHE_LOCK_DIR} default
Actually, it is better to use a semaphore. Under Unix systems it is a lot faster and uses fewer resources.
And the option is just this:
Mutex sem
Extreme noob question. I am trying to set up my apache web server. I bought a domain name from namecheap.com and have it directing to my servers IP address. I went through all the steps I believe to set up my apache server running with php. When I go to my domain name, I am at home and it is connected to the same wifi the server is, it goes to my webpage without a problem. My problem is that when I attempt to go to my domain name when I am not connected to the same wifi, I get 400 or 404 error messages. Would anyone know what I can do to fix this?
Thank you in advance!
EDIT:
Error Logs.
[Sat Jul 20 04:03:43 2013] [notice] Apache/2.2.25 (Win32) PHP/5.2.17 configured -- resuming normal operations
[Sat Jul 20 04:03:43 2013] [notice] Server built: Jul 10 2013 01:52:12
[Sat Jul 20 04:03:43 2013] [notice] Parent: Created child process 2376
[Sat Jul 20 04:03:43 2013] [notice] Child 2376: Child process is running
[Sat Jul 20 04:03:43 2013] [notice] Child 2376: Acquired the start mutex.
[Sat Jul 20 04:03:43 2013] [notice] Child 2376: Starting 64 worker threads.
[Sat Jul 20 04:03:43 2013] [notice] Child 2376: Starting thread to listen on port 80.
httpd.exe: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
[Sat Jul 20 04:05:37 2013] [warn] pid file C:/webdevs/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Sat Jul 20 04:05:37 2013] [notice] Apache/2.2.25 (Win32) PHP/5.2.17 configured -- resuming normal operations
[Sat Jul 20 04:05:37 2013] [notice] Server built: Jul 10 2013 01:52:12
[Sat Jul 20 04:05:37 2013] [notice] Parent: Created child process 1628
httpd.exe: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
httpd.exe: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
[Sat Jul 20 04:05:37 2013] [notice] Child 1628: Child process is running
[Sat Jul 20 04:05:37 2013] [notice] Child 1628: Acquired the start mutex.
[Sat Jul 20 04:05:37 2013] [notice] Child 1628: Starting 64 worker threads.
[Sat Jul 20 04:05:37 2013] [notice] Child 1628: Starting thread to listen on port 80.
[Sat Jul 20 04:22:20 2013] [warn] pid file C:/webdevs/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Sat Jul 20 04:22:20 2013] [notice] Apache/2.2.25 (Win32) PHP/5.2.17 configured -- resuming normal operations
[Sat Jul 20 04:22:20 2013] [notice] Server built: Jul 10 2013 01:52:12
[Sat Jul 20 04:22:20 2013] [notice] Parent: Created child process 1728
[Sat Jul 20 04:22:22 2013] [notice] Child 1728: Child process is running
[Sat Jul 20 04:22:22 2013] [notice] Child 1728: Acquired the start mutex.
[Sat Jul 20 04:22:22 2013] [notice] Child 1728: Starting 64 worker threads.
[Sat Jul 20 04:22:22 2013] [notice] Child 1728: Starting thread to listen on port 80.
httpd.exe: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
[Sat Jul 20 04:26:09 2013] [warn] pid file C:/webdevs/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Sat Jul 20 04:26:09 2013] [notice] Apache/2.2.25 (Win32) PHP/5.2.17 configured -- resuming normal operations
[Sat Jul 20 04:26:09 2013] [notice] Server built: Jul 10 2013 01:52:12
[Sat Jul 20 04:26:10 2013] [notice] Parent: Created child process 1548
httpd.exe: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
[Sat Jul 20 04:26:10 2013] [notice] Child 1548: Child process is running
[Sat Jul 20 04:26:10 2013] [notice] Child 1548: Acquired the start mutex.
[Sat Jul 20 04:26:10 2013] [notice] Child 1548: Starting 64 worker threads.
[Sat Jul 20 04:26:10 2013] [notice] Child 1548: Starting thread to listen on port 80.
If I'm understanding you correctly, your web server is running on a machine that is connected to your local network. If so, it sounds like your web server is probably not publicly accessible due to a firewall or network configuration.
If your Internet connection uses a dynamic IP address, you'll likely need to set up a dynamic DNS service to point your domain to your IP address. On your network, you might also need to configure port forwarding to forward port 80 traffic to the specific IP address of the server.
For more information, check out http://lifehacker.com/160945/ask-lifehacker--host-my-web-site-at-home
I installed memcache on my Ubuntu 10.04 machine but when it comes to restarting apache it gives me an error. My main root is /var/www/ and there is only index.php file in it.
Everything was working before installing memcache.
This is what I did.
Help please
ERROR:
myubuntu#ubuntu:~$ service apache2 restart
* Restarting web server apache2 (13)Permission denied: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
Action 'start' failed.
The Apache error log may have more information.
APACHE LOG:
myubuntu#ubuntu:~$ tail -f /var/log/apache2/error.log
[Sun Mar 04 14:04:45 2012] [notice] Apache/2.2.16 (Ubuntu) PHP/5.3.3-1ubuntu9.10 with Suhosin-Patch configured -- resuming normal operations
[Sun Mar 04 18:54:35 2012] [notice] caught SIGTERM, shutting down
[Wed Mar 07 20:32:59 2012] [notice] Apache/2.2.16 (Ubuntu) PHP/5.3.3-1ubuntu9.10 with Suhosin-Patch configured -- resuming normal operations
[Wed Mar 07 21:01:57 2012] [notice] caught SIGTERM, shutting down
[Fri Mar 09 22:20:06 2012] [notice] Apache/2.2.16 (Ubuntu) PHP/5.3.3-1ubuntu9.10 with Suhosin-Patch configured -- resuming normal operations
[Sat Mar 10 01:45:00 2012] [notice] caught SIGTERM, shutting down
[Sat Mar 10 10:58:24 2012] [notice] Apache/2.2.16 (Ubuntu) PHP/5.3.3-1ubuntu9.10 with Suhosin-Patch configured -- resuming normal operations
[Sat Mar 10 11:16:49 2012] [error] [client ::1] File does not exist: /var/www/favicon.ico
[Sat Mar 10 11:16:49 2012] [error] [client ::1] File does not exist: /var/www/favicon.ico
You have to be root. You may want to use sudo when starting Apache.
I'm getting a 503 error whenever I try to request any page. I really don't know how to go about fixing this problem. I've checked the error.log and this is what it contains:
[Fri Jan 13 19:03:41 2012] [notice] caught SIGWINCH, shutting down gracefully
[Fri Jan 13 19:03:51 2012] [notice] Apache/2.2.8 (Ubuntu) PHP/5.2.4-2ubuntu5.17 with Suhosin-Patch configured -- resuming normal operations
[Fri Jan 13 19:08:59 2012] [notice] caught SIGWINCH, shutting down gracefully
[Fri Jan 13 19:09:41 2012] [notice] Apache/2.2.8 (Ubuntu) PHP/5.2.4-2ubuntu5.17 with Suhosin-Patch configured -- resuming normal operations
[Fri Jan 13 19:11:59 2012] [notice] caught SIGWINCH, shutting down gracefully
[Fri Jan 13 19:12:45 2012] [notice] Apache/2.2.8 (Ubuntu) PHP/5.2.4-2ubuntu5.17 with Suhosin-Patch configured -- resuming normal operations
[Fri Jan 13 19:13:03 2012] [notice] caught SIGWINCH, shutting down gracefully
[Fri Jan 13 19:13:14 2012] [notice] Apache/2.2.8 (Ubuntu) PHP/5.2.4-2ubuntu5.17 with Suhosin-Patch configured -- resuming normal operations
[Sat Jan 14 11:25:28 2012] [notice] caught SIGWINCH, shutting down gracefully
[Sat Jan 14 11:26:10 2012] [notice] Apache/2.2.8 (Ubuntu) PHP/5.2.4-2ubuntu5.17 with Suhosin-Patch configured -- resuming normal operations
[Sat Jan 14 11:34:34 2012] [notice] caught SIGWINCH, shutting down gracefully
I assume this is just reporting that I've rebooted the server from the AWS console.
Phew, fixed! For the benefit of others, the 503 error seems to have been caused by my elastic load balancer not having any healthy instances to route requests to. This was because the URL I'd been using to check for health was throwing some database errors. I simply changed the health check ping target to a path that was working and everything started working again.