apache won't start - apache

Ok, so this has me so stumped that I don't see myself being able to solve the problem on my own.
I am running apache on my laptop under linux, so that when I'm away from my desktop I can still work with php and mySql. Everything works great. There is nothing wrong with the syntax of the httpd.conf; apachectl configtest returns OK. However, there is one cafe that I go to where apache will not start. I'll go down the street to the next ap and apache will start without issue, but at this one cafe apache won't start. Any help will be appreciated.
The log entry that I believe to be relevant is
[Wed Nov 16 14:03:11 2011] [alert] (EAI 2)Name or service not known: mod_unique_id: unable to find IPv4 address of "laptop"
[Wed Nov 16 14:33:36 2011] [alert] (EAI 2)Name or service not known: mod_unique_id: unable to find IPv4 address of "laptop"
[Wed Nov 16 14:42:48 2011] [alert] (EAI 2)Name or service not known: mod_unique_id: unable to find IPv4 address of "laptop"
[Wed Nov 16 14:45:27 2011] [alert] (EAI 2)Name or service not known: mod_unique_id: unable to find IPv4 address of "laptop"
[Wed Nov 16 14:52:54 2011] [alert] (EAI 2)Name or service not known: mod_unique_id: unable to find IPv4 address of "laptop"

If output of a command hostname is
# hostname
laptop
Giving this error in your logs:
(EAI 2)Name or service not known: mod_unique_id: unable to find IPv4 address of "laptop"
Then you should put in your /etc/hosts file sth like this :
127.0.0.1 laptop.homenetwork laptop localhost
::1 laptop.homenetwork laptop localhost
It also helps some people to put
ServerName localhost
in /etc/apache2/httpd.conf file

wait will apache not start or is the port blocked in this cafe? that would make sense to me and not that apache won't start. also, what happens if apache is running prior to going to this cafe? if you're still having issues, and i don't mean to sound cheeky here, but don't go to that particular cafe :)

Related

WebServers cannot connect to app server ELB - AWS

I have a simple deployment with some webservers connected to an AWS ELB. This ELB in-turn has some application servers behind it.
The webservers are unable to connect to the application server ELB. The httpd error log is full of:
[Thu Dec 22 15:28:05.897273 2016] [proxy:error] [pid 10188] (70007)The timeout specified has expired: AH00957: HTTP: attempt to connect to 54.254.179.37:80 (elblinkhere) failed
[Thu Dec 22 15:28:05.897348 2016] [proxy:error] [pid 10188] AH00959: ap_proxy_connect_backend disabling worker for (elblinkhere) for 60s
[Thu Dec 22 15:28:05.897361 2016] [proxy_http:error] [pid 10188] [client 10.0.0.54:13789] AH01114: HTTP: failed to make connection to backend: elblinkhere
I have tried to check if this is an SELinux issue but that does not seem so.
I have also read a large number of threads on the internet about this and not come across any solutions.
My question(s):
1. What other methods can I use to resolve this?
2. How do I resolve this?
Did you configure your ELB as external and also enabled necessary port for ELB's security group?

Anyone succeeded to Install Laravel on Apache2 with fcgi?

I have successfully installed Laravel on Apache2 with php as a module. The instructions are simple. However, when I try with fcgi it does not work. So it has to do with the server configuration. After I visited http://<mylaraveldomain> (domain not public), I looked at /var/log/apache2/error.log and got this error message
[Thu Mar 26 22:52:34.012794 2015] [fcgid:warn] [pid 30834] (104)Connection reset by peer: [client 65.92.253.153:7785] mod_fcgid: error reading data from FastCGI server
[Thu Mar 26 22:52:34.012862 2015] [core:error] [pid 30834] [client 65.92.253.153:7785] End of script output before headers: php-fcgi-wrapper
[Thu Mar 26 22:52:39.826939 2015] [fcgid:error] [pid 30830] mod_fcgid: process /var/www/default/cgi-bin/php5-default/php-fcgi-wrapper(31115) exit(communication error), get unexpected signal 11
I also looked at all other log files in /var/log recently modified after visiting the URL, but no additional useful info was found. Should I look elsewhere? It is not that fcgi is not working, because if I put a file test.php in laravel public folder I can read it fine at the URL http://<mylaraveldomain>/test.php. Is there some special configuration settings to make laravel works with fcgi ? It is possible that it is specific to my installation of fcgi. So, I would like to know if others have succeeded to install laravel with fcgi on apache2. I am on Ubuntu and I made a recent apt-get upgrade.
I checked syslog and there was additional info. I could see a segment fault. I guessed it could be cache management issue. I commented out the line zend_extension=opcache.so in the file /etc/php5/apache2/conf.d/05-opcache.ini and it worked. Of course, this is only a work around.

mod_jk not changes IP of hostname when occurs changing of IP on DNS

In apache, the module mod_jk not changes IP of hostname when occurs changing of IP on DNS.
Version of apache:
Server version: Apache/2.2.15 (Unix)
Server built: Aug 2 2013 08:02:15
Version mod_jk: 1.2.37
Example:
workers.properties
worker.portalconsultoras_prd.type=ajp13
worker.portalconsultoras_prd.host=hostexample.com.br
worker.portalconsultoras_prd.port=8009
This configuration works fine.
But, when occurs change ip in the host name in DNS, the module md_jk starts fail to connect. Follow below the log of mod_jk:
[Wed Sep 18 12:00:33 2013] [5315:140659824723936] [info] jk_open_socket::jk_connect.c (627): connect to 107.xx.xx.220:8009 failed (errno=115)
[Wed Sep 18 12:00:33 2013] [5315:140659824723936] [info] ajp_connect_to_endpoint::jk_ajp_common.c (995): Failed opening socket to (107.xx.xxx.220:8009) (errno=115)
[Wed Sep 18 12:00:33 2013] [5315:140659824723936] [error] ajp_send_request::jk_ajp_common.c (1630): (portalconsultoras_prd) connecting to backend failed. Tomcat is probably not started or is listening on the wrong port (errno=115)
I would like a configuration of apache that avoid this problem.
Looking for the solutions in google, have turn on the "HostnameLookups", but is inefficient.
Thanks!

Apache WSASocket failed to open the inherited socket. (LMHOSTS disabled)

[Thu Aug 09 11:20:30 2012] [notice] Child 4656: Child process is running
[Thu Aug 09 11:20:30 2012] [crit] (OS 10022)An invalid argument was supplied. : Child 4656: setup_inherited_listeners(), WSASocket failed to open the inherited socket.
[Thu Aug 09 11:20:30 2012] [crit] Parent: child process exited with status 3 -- Aborting.
I have started getting this error unexpectedly. I dont believe I changed any conf files.
Are there are any temporary files I can reset in the apache installation? I have moved everything from /xampp/tmp
I have checked to see if localhost:80 is in use, I dont think this is the case.
I have reset netsh as specified here: https://issues.apache.org/bugzilla/show_bug.cgi?id=31765
Please recommend steps to reset apache as I believe it is possible this is an issue caused by a orphaned PID or something of that nature as nothing has changed and I do unexpected shutdowns of my computer.
This is on Windows XP, apache httpd.exe version is 2.2.11.0
Port 443 was in use. Then magically ceased being in use. Then I guess perhaps netsh reset caused LMHOSTS to be enabled because I ended up with Local Connection being renamed to Local Connection 2 with LMHOSTS enabled. This is called magic.
Panda Media Booster was using 443.

Apache runs after reboot, but does not work

I am running an Apache on Ubuntu which works pretty fine. However, if I issue 'shutdown -r now' and wait until the server has been booted successfully, the website won't show up in the browser.
Then, if I issue: service apache2 start, it'll show:
[Thu Jun 14 11:08:38 2012] [error] (EAI 2)Name or service not known: Could not resolve host name *.443 -- ignoring!
[Thu Jun 14 11:08:38 2012] [warn] The ScriptAlias directive in /etc/apache2/sites-enabled/default2 at line 18 will probably never match because it overlaps an earlier ScriptAlias.
[Thu Jun 14 11:08:38 2012] [warn] The Alias directive in /etc/apache2/sites-enabled/default2 at line 34 will probably never match because it overlaps an earlier Alias.
[Thu Jun 14 11:08:38 2012] [warn] _default_ VirtualHost overlap on port 443, the first has precedence
(98)Address already in use: make_sock: could not bind to address [::]:80
(98)Address already in use: 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.
* Starting web server apache2 FAIL
However, when I issue service apache2 stop, it'll show:
[Thu Jun 14 11:09:34 2012] [error] (EAI 2)Name or service not known: Could not resolve host name *.443 -- ignoring!
[Thu Jun 14 11:09:34 2012] [warn] The ScriptAlias directive in /etc/apache2/sites-enabled/default2 at line 18 will probably never match because it overlaps an earlier ScriptAlias.
[Thu Jun 14 11:09:34 2012] [warn] The Alias directive in /etc/apache2/sites-enabled/default2 at line 34 will probably never match because it overlaps an earlier Alias.
[Thu Jun 14 11:09:34 2012] [warn] _default_ VirtualHost overlap on port 443, the first has precedence
* Stopping web server apache2 OK
However, afterwards netstat -tulpn| grep :80 still shows:
tcp6 0 0 :::80 :::* LISTEN 23561/apache2
Anyways, when I just kill the process shown above, e.g., kill -9 23561, I can successfully startup apache2 with service apache2 start and see my website again in the browser. So, for me it looks like, there is another apache2 running that uses a completely different configuration. Btw, I already assured that I have only one apache2 installation.
Can you help me out with this? Many thanks in advance!!! :-)