Page: Previous  1, 2, 3, 4  Next

techAdmin
Status: Site Admin
Joined: 26 Sep 2003
Posts: 4124
Location: East Coast, West Coast? I know it's one of them.
Reply Quote
that was my thinking too, re the host name.

So apache added that? or rather, the debian installer for apache added it?

Well, you will laugh when you find out what's wrong, that's my guess, this is not a bug, that's a very educated guess, but a guess.

Your envvars are loading by the looks of it or the log would show errors all over the place.
Back to top
ckosloff
Status: Contributor
Joined: 21 Dec 2011
Posts: 292
Location: South Florida
Reply Quote
Quick reply, yes.
I have 4 computers, all set up the same way: jessie + smxi.
They all have this second line, only difference is their NetBios name.
Let me drink my first cup of coffee, will test and be back here.
Back to top
ckosloff
Status: Contributor
Joined: 21 Dec 2011
Posts: 292
Location: South Florida
Reply Quote
So now I added dumbsite to the second line and deleted it from first in /etc/hosts
Still same goddam errors.
:: Code ::

root@papimalo:/home/ckosloff# service apache2 stop
[ ok ] Stopping web server: apache2.
root@papimalo:/home/ckosloff# apachectl start
root@papimalo:/home/ckosloff# service apache2 start
[ ok ] Starting web server: apache2.
root@papimalo:/home/ckosloff# apache2 -t
[Sat Sep 14 10:32:56.977844 2013] [core:warn] [pid 4803] AH00111: Config variable ${APACHE_LOCK_DIR} is not defined
[Sat Sep 14 10:32:56.978415 2013] [core:warn] [pid 4803] AH00111: Config variable ${APACHE_PID_FILE} is not defined
[Sat Sep 14 10:32:56.978725 2013] [core:warn] [pid 4803] AH00111: Config variable ${APACHE_RUN_USER} is not defined
[Sat Sep 14 10:32:56.978987 2013] [core:warn] [pid 4803] AH00111: Config variable ${APACHE_RUN_GROUP} is not defined
[Sat Sep 14 10:32:56.979248 2013] [core:warn] [pid 4803] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
[Sat Sep 14 10:32:57.052031 2013] [core:warn] [pid 4803] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
[Sat Sep 14 10:32:57.052842 2013] [core:warn] [pid 4803] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
[Sat Sep 14 10:32:57.052971 2013] [core:warn] [pid 4803] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
AH00526: Syntax error on line 74 of /etc/apache2/apache2.conf:
Invalid Mutex directory in argument file:${APACHE_LOCK_DIR}
root@papimalo:/home/ckosloff# service apache2 stop
[ ok ] Stopping web server: apache2.
root@papimalo:/home/ckosloff# apache2ctl stop
httpd (no pid file) not running
root@papimalo:/home/ckosloff# source /etc/apache2/envvars && apache2 -k restart
httpd not running, trying to start
root@papimalo:/home/ckosloff# ls -l /etc/apache2
total 80
-rw-r--r-- 1 root root  7115 Aug  4 04:41 apache2.conf
drwxr-xr-x 2 root root  4096 Sep  9 11:54 conf-available
drwxr-xr-x 2 root root  4096 Sep  9 11:54 conf-enabled
-rw-r--r-- 1 root root  1782 Jul 20 16:44 envvars
-rw-r--r-- 1 root root 31063 Jul 20 16:44 magic
drwxr-xr-x 2 root root 12288 Sep  8 09:08 mods-available
drwxr-xr-x 2 root root  4096 Sep 11 22:23 mods-enabled
-rw-r--r-- 1 root root   320 Aug  4 04:42 ports.conf
drwxr-xr-x 2 root root  4096 Sep 14 10:14 sites-available
drwxr-xr-x 2 root root  4096 Sep 12 19:00 sites-enabled                                                               
root@papimalo:/home/ckosloff# service apache2 start                                                                   
[ ok ] Starting web server: apache2
root@papimalo:/home/ckosloff# a2ensite dumbsite
ERROR: Site dumbsite does not exist!
root@papimalo:/home/ckosloff#

The reason I use a2ensite instead of ln -s is that it shows errors, whereas ln -s creates a non-workable, not accessible, link.
apache2 error log does not show much apart from the "creating 8 session mutexes based on 150 max processes and 0 max threads", already posted.
Please note that these commands don't work:
apachectl start,
source /etc/apache2/envvars && apache2 -k restart.
Apache2 does not complain on starting
I pasted out put of command apache2ctl fullstatus paste.debian.net/40134/
don't want to clog this forum.
Still in the dark.
Back to top
techAdmin
Status: Site Admin
Joined: 26 Sep 2003
Posts: 4124
Location: East Coast, West Coast? I know it's one of them.
Reply Quote
show me the contents of /etc/apache2/ports.conf and /etc/apache2/sites_enabled/000-default

Here's what a working setup looks like, though it's not the only way to do it:

:: Code ::
   Scoreboard Key:
   "_" Waiting for Connection, "S" Starting up, "R" Reading Request,
   "W" Sending Reply, "K" Keepalive (read), "D" DNS Lookup,
   "C" Closing connection, "L" Logging, "G" Gracefully finishing,
   "I" Idle cleanup of worker, "." Open slot with no current process

   Srv PID Acc M CPU SS Req Conn Child Slot Client VHost Request
   1-2 10682 0/0/0 W 0.00 0 0 0.0 0.00 0.00 127.0.0.1 localhost GET
   /server-status HTTP/1.0

ports.conf:
NameVirtualHost 127.0.0.1:80
Listen 80


You'll notice that in your output, the 'client' column does not show the expected data, because it's using IPV6 syntax:
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback

and your apache2 is looking here:
3-1 5150 0/0/ _ 0.00 24 23 0.0 0.00 0.00 ::1 papimalo.POMPANO:80 OPTIONS * HTTP/1.0 1

I am not clear on why your system is using the domain papimalo.POMPANO in the first place, I assume that's something you did when you set up the system without understanding what that would do, I never use that option to assign the system to a domain because it's not a domain, that's why all my stuff points correctly to localhost across all the config files.

So when you translate this into english, your /etc/hosts is telling the system that localhost, 127.0.0.1 is ::1 but apache is looking for your 127.0.1.1 host, or something like that. so the problem may be found in /etc/apache2/ports.conf

I don't remember this part of debian setup, the networking, that's in the installer process, but you added in a domain I believe when you should have left it blank. That's my guess at this point, now you are seeing rippling side effects from that initial error.

On the brighter side, I have learned some new apache debugging stuff which I've never had to learn since I've never had any actual real issues with it beyond the failure to load the variables a long time ago.
Back to top
ckosloff
Status: Contributor
Joined: 21 Dec 2011
Posts: 292
Location: South Florida
Reply Quote
Right you are about me entering that domain stuff when loading system, that's some cr#p leftover from Windoze days.
This is /etc/apache2/ports.conf
:: Code ::

# If you just change the port or add more ports here, you will likely also
# have to change the VirtualHost statement in
# /etc/apache2/sites-enabled/000-default.conf

Listen 80

<IfModule ssl_module>
   Listen 443
</IfModule>

<IfModule mod_gnutls.c>
   Listen 443
</IfModule>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

And this is /etc/apache2/sites_enabled/000-default.conf
:: Code ::

<VirtualHost *:80>
   # The ServerName directive sets the request scheme, hostname and port that
   # the server uses to identify itself. This is used when creating
   # redirection URLs. In the context of virtual hosts, the ServerName
   # specifies what hostname must appear in the request's Host: header to
   # match this virtual host. For the default virtual host (this file) this
   # value is not decisive as it is used as a last resort host regardless.
   # However, you must set it for any further virtual host explicitly.
   #ServerName www.example.com

   ServerAdmin webmaster@localhost
   DocumentRoot /var/www

   # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
   # error, crit, alert, emerg.
   # It is also possible to configure the loglevel for particular
   # modules, e.g.
   #LogLevel info ssl:warn

   ErrorLog ${APACHE_LOG_DIR}/error.log
   CustomLog ${APACHE_LOG_DIR}/access.log combined

   # For most configuration files from conf-available/, which are
   # enabled or disabled at a global level, it is possible to
   # include a line for only one particular virtual host. For example the
   # following line enables the CGI configuration for this host only
   # after it has been globally disabled with "a2disconf".
   #Include conf-available/serve-cgi-bin.conf
</VirtualHost>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

Please note that it has extension .conf in my setup
I already removed dumbsite from that second line and put it back on first, I am also getting ready a test machine so I can mess around with all those conf files without getting in trouble on my main system.
So, at this point, delete second line?
What else do I need to do to remove effects of that pseudo-domain setup?
I am also learning a lot, I have been busy lately on a project entirely different from IT (I remodeled a home for my son), so now I have time to go back full time to what I like to do.
Back to top
techAdmin
Status: Site Admin
Joined: 26 Sep 2003
Posts: 4124
Location: East Coast, West Coast? I know it's one of them.
Reply Quote
The problem was clearly in your initial install, when you created a domain without having one.

Show: ifconfig

the 'lo' line should look something like this:

:: Code ::
lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:183 errors:0 dropped:0 overruns:0 frame:0
          TX packets:183 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:200749 (196.0 KiB)  TX bytes:200749 (196.0 KiB)


In general you can't get support or help if you do the initial base install wrong, which makes the networking wrong, and then when you install apache, it reads that networking data and tries to use it but can't because it's wrong.

That's my initial guess.

Bypass the stuff and edit ports.conf and change

NameVirtualHost 127.0.0.1:80
Listen 80

then edit /etc/hosts and get rid of dumbsite in the 127.0.1.1 line and add it to the 127.0.01 line, then restart apache

Then show apache2ctl readout of what apache does and sees at that point.

There may be other networking failures as well based on your initial error, I have no idea because I've never made that mistake.

I have no idea how to undo the initial error for pseudo domain, I don't know what the debian installer does there, try to google it and see, that's all I'd be doing anyway since I have never seen that mistake, or made it.

Check /etc/network/interfaces and see what it's using for:

auto lo
iface lo inet loopback
address 127.0.0.1
netmask 255.0.0.0

lo is loopback, ie the system sends the request back to itself, not the interweb.
Back to top
ckosloff
Status: Contributor
Joined: 21 Dec 2011
Posts: 292
Location: South Florida
Reply Quote
:: Code ::

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:302 errors:0 dropped:0 overruns:0 frame:0
          TX packets:302 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:26153 (25.5 KiB)  TX bytes:26153 (25.5 KiB)

This looks practically same as what you posted, so we are good there.
Now this is not good
:: Code ::

root@papimalo:/home/ckosloff# /etc/init.d/apache2 restart
[....] Restarting web server: apache2AH00548: NameVirtualHost has no effect and will be removed in the next release /etc/apache2/ports.conf:6
. ok

Please don't tell me that I have to reformat this machine again, I don't want to dial the suicide line.
This is the interfaces file, the two end lines in your post are missing.
:: Code ::

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug eth0
iface eth0 inet dhcp

After deleting second line in /etc/hosts I got this upon restart
:: Code ::

AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 192.168.1.67. Set the 'ServerName' directive globally to suppress this message
. ok

Back to top
ckosloff
Status: Contributor
Joined: 21 Dec 2011
Posts: 292
Location: South Florida
Reply Quote
It gets worse.
Because I am getting same error on all my computers, ergo they are all incorrectly setup.
On the bright side: I can only commit suicide once, and if I fix one of them I will be able to fix the rest.
Back to top
techAdmin
Status: Site Admin
Joined: 26 Sep 2003
Posts: 4124
Location: East Coast, West Coast? I know it's one of them.
Reply Quote
I decided to upgrade my system (infrequently updated sid), to get the new Apache2 and everything else, and also out of curiosity to see if there are any issues.

I saw a few changes from apache 2.2 to 2.4 configs, so I changed my configs to use the new methods, after a few glitches on start, like having to explicitly add in mod_rewrite, and adding in conf-enabled custom stuff I had in apache2.conf before, everything started fine.

I still have to get rid of nameVirtualhost in ports.conf, so I commented it out and now that error disappeared, ie:

httpd.apache.org/docs/2.4/upgrading.html
:: Quote ::
The NameVirtualHost directive no longer has any effect, other than to emit a warning. Any address/port combination appearing in multiple virtual hosts is implicitly treated as a name-based virtual host.


:: Code ::
# NameVirtualHost 127.0.0.1:80
Listen 80


in general, when you are working with stuff, don't delete lines, comment them out, that way you can see they were there, and aren't being used, that's better than trying to remember stuff.

To fix this, I googled the error, and then added to my /etc/apache2/conf-enabled/ the file general-sites.conf with content of:

:: Code ::
ServerName localhost
AddType application/x-httpd-php .php .html .htm
DirectoryIndex index.html index.htm index.php


and now it starts clean. I access in browser: localhost/ and it shows the default apache2 page, so that's all good.

So that's 2.4, pretty clear start up error messages, and after that it's fine again, not a bad update from 2.2, plus cleaning up some old stuff.
Back to top
ckosloff
Status: Contributor
Joined: 21 Dec 2011
Posts: 292
Location: South Florida
Reply Quote
SOLVED!!!
Absurdly simple, Sherlock Holmes would say.
Just add .conf to name of site in sites-available.
Solution was glaring at me from a2ensite command, only sites with .conf extension were available.
DOOOOOOOOOOOOOOHHHHHHHHHHHHHHH
Back to top
Display posts from previous:   
Page: Previous  1, 2, 3, 4  Next
All times are GMT - 8 Hours