Re: apache not running at boot

2018-07-25 Thread john doe

On 7/25/2018 7:10 PM, mick crane wrote:

On 2018-07-25 14:05, Dave wrote:

On 07/22/2018 01:55 PM, mick crane wrote:


On 2018-07-22 17:52, john doe wrote:



Also what is the output of:

$ systemctl status NetworkManager-wait-online


what would be handy is a way to get a verbose output to the apache2
log on boot.

mick


ah - i found this in the syslog after boot, previously i did not see
this.

Jul 25 08:57:52 www apachectl[600]: (99)Cannot assign requested
address: AH00072: make_sock: could not bind to address
192.168.1.139:80
Jul 25 08:57:52 www apachectl[600]: no listening sockets available,
shutting down
Jul 25 08:57:52 www apachectl[600]: AH00015: Unable to open logs

I think i need a test enviroment to provide open ports.


It seems like an unusual address for DHCP to be giving out.
If it is just webpages.


Looks correct to me, assuming that the OP is behind some kind of 'NAT'.

give new server fixed ipaddress in same range as network 192.168.1.x you 
know to be unused.

You used to be able to do that with ifconfig but these days I don't know.



The OP will need to use NetworkManager (NM) to do that.

get ssh working and copy (scp )over /var/www/html from old server to new 
server, or just copy over via  a usb stick.
You may have problems depending how webpages are linked, by ipaddress or 
name.


If all the 'pages' are in the same directory I guess the OP could use 
relative path.


--
John Doe



Re: apache not running at boot

2018-07-25 Thread mick crane

On 2018-07-25 14:05, Dave wrote:

On 07/22/2018 01:55 PM, mick crane wrote:


On 2018-07-22 17:52, john doe wrote:



Also what is the output of:

$ systemctl status NetworkManager-wait-online


what would be handy is a way to get a verbose output to the apache2
log on boot.

mick


ah - i found this in the syslog after boot, previously i did not see
this.

Jul 25 08:57:52 www apachectl[600]: (99)Cannot assign requested
address: AH00072: make_sock: could not bind to address
192.168.1.139:80
Jul 25 08:57:52 www apachectl[600]: no listening sockets available,
shutting down
Jul 25 08:57:52 www apachectl[600]: AH00015: Unable to open logs

I think i need a test enviroment to provide open ports.


It seems like an unusual address for DHCP to be giving out.
If it is just webpages.
give new server fixed ipaddress in same range as network 192.168.1.x you 
know to be unused.
You used to be able to do that with ifconfig but these days I don't 
know.


get ssh working and copy (scp )over /var/www/html from old server to new 
server, or just copy over via  a usb stick.
You may have problems depending how webpages are linked, by ipaddress or 
name.

I've fixed something like that before with sed on all the html pages.

mick

--
Key ID4BFEBB31



Re: apache not running at boot

2018-07-25 Thread john doe

On 7/25/2018 3:05 PM, Dave wrote:



On 07/22/2018 01:55 PM, mick crane wrote:

On 2018-07-22 17:52, john doe wrote:



Also what is the output of:

$ systemctl status NetworkManager-wait-online


what would be handy is a way to get a verbose output to the apache2 
log on boot.


mick



ah - i found this in the syslog after boot, previously i did not see this.

Jul 25 08:57:52 www apachectl[600]: (99)Cannot assign requested address: 
AH00072: make_sock: could not bind to address 192.168.1.139:80
Jul 25 08:57:52 www apachectl[600]: no listening sockets available, 
shutting down

Jul 25 08:57:52 www apachectl[600]: AH00015: Unable to open logs

I think i need a test enviroment to provide open ports.




Or changing the line in your *.conf file from:

listen 192.168.1.139:80

to:

listen port

Use port 80 only when everything is working properly.

It won't  hurt to have a test env.

If you only have one interface on the "new server" specifying the Ip is 
probably not necessary.


1)  read the rest of the e-mails.
2)  The log file can't be open, that need to be fixed.

--
John Doe



Re: apache not running at boot

2018-07-25 Thread Dave



On 07/22/2018 01:55 PM, mick crane wrote:

On 2018-07-22 17:52, john doe wrote:



Also what is the output of:

$ systemctl status NetworkManager-wait-online


what would be handy is a way to get a verbose output to the apache2 
log on boot.


mick



ah - i found this in the syslog after boot, previously i did not see this.

Jul 25 08:57:52 www apachectl[600]: (99)Cannot assign requested address: 
AH00072: make_sock: could not bind to address 192.168.1.139:80
Jul 25 08:57:52 www apachectl[600]: no listening sockets available, 
shutting down

Jul 25 08:57:52 www apachectl[600]: AH00015: Unable to open logs

I think i need a test enviroment to provide open ports.



Re: apache not running at boot

2018-07-25 Thread Greg Wooledge
On Fri, Jul 20, 2018 at 10:34:12AM +0200, john doe wrote:
> > I have no idea what NM is ... can you provide a path to a configuration
> > file? i will reply with it's contents.

Jeez, I go away for a few days and look what happens.

NM is "Network Manager", which is one of the optional ways to configure
a network interface in Debian.  Usually used in conjunction with a
Desktop Environment (GNOME, etc.).  Usually not used on web servers, but
it's allowed.

The typical way to learn that NM is in charge of your interfaces is by
the comment signature that it leaves at the top of /etc/resolv.conf,
which is why you were asked to examine your /etc/resolv.conf file.

I also saw something up-thread which showed Network Manager output in
the logs of some service or other.

Also you don't have your interface defined in /etc/network/interfaces
at all, which is another good indicator that you might be using Network
Manager.

Then again, your /e/n/i/ contains the "source /etc/network/interfaces.d/*"
line and you didn't tell us whether you've got your interface configured
in there.  You PROBABLY don't, but we can't be 100% certain since you
didn't bother to look there and find out.

So, it's probably NM (Network Manager) which configures your interface.

Now, I know absolutely nothing about NM (except that it leaves behind
a comment in /etc/resolv.conf), so I can't help you with that part.
You need to figure out how to ensure that Apache isn't started until
NM has brought up your interface.

(Perhaps this machine didn't start out as a web server.  Perhaps you
installed it as a desktop machine, and then added Apache to it.  That
would explain why it's got NM.)

At some point you also need to figure out the name of your interface.
It might be eth0, or it might not.  This is basic stuff.  If you don't
know the name of your interface, start with "ip link".  That should
show you all of your interfaces, and some of their current settings.

Blindly putting "auto eth0" in /e/n/i when "eth0" might not even be the
name of your interface is not productive.  My original suggestion was
to CHANGE the line "allow-hotplug whatever" to "auto whatever", which
was written under the assumption that you're using /e/n/i in the first
place, rather than NM (a reasonable guess for a web server).

If your interface isn't named in /e/n/i AT ALL, then don't touch /e/n/i.
You can't change something that's not there.

Also, someone mentioned that you might have told Apache to bind to
a specific IP address instead of binding to all addresses.  Well, that
would be pretty silly, now wouldn't it?  If you've done that, undo it.
Tell Apache to listen/bind on all interfaces, which is the default
behavior.



Re: apache not running at boot

2018-07-23 Thread mick crane

On 2018-07-23 12:13, john doe wrote:


For testing you should read the advice from:

https://www3.ntu.edu.sg/home/ehchua/programming/howto/Apache_HowToConfigure.html#zz-1.

Basically, use the listen directive with only a port above 1024:

listen 8000


from that link
can assume then that there is no need to have

Listen ipaddress

in apache2 conf file because it is listening on local machine 127.0.0.1 
which for all purposes is same as eth0 which is getting its ipaddress 
from DHCP server ?


mick



--
Key ID4BFEBB31



Re: apache not running at boot

2018-07-23 Thread john doe

On 7/23/2018 8:23 AM, john doe wrote:

On 7/23/2018 12:14 AM, Dave wrote:



On 7/22/18 1:04 PM, Cindy-Sue Causey wrote:

On 7/22/18, mick crane  wrote:

On 2018-07-22 16:13, Dave wrote:


i can't imagine why Deb, is not automatically configuring apache2 to
auto start, a well know server for 10+ years and yet it seems in my
case it was not configured properly.

Please if anyone out there may have the answer, let us know.

as it seems that the network comes up after a reboot at this stage I'd
be inclined to remove and re-install apache2 and hope that the install
sorts it out.

but then I don't know what I'm doing.


It's always an option in my own playbook. It's a last resort one, but
still an option.

I go the additional step to secondarily purge any dependencies that
*might* suddenly become orphaned during a remove/uninstall. Apt-get is
friendly about sharing those.

Newly orphaned packages will be offered up as part of the feedback for
a command such as "apt-get upgrade". I don't how other package
managers handle the same.

That extra step is worth it to me because maybe the problem is with a
dependency package and not necessarily the primary desired one.

Cindy :)


I think i should explain something i did not explain before -

I have an old server that is currently running, it is old and running 
Deb 4 , and completely configured to run with our 1 router, server IP, 
dhcp, all ports 80, 443, 22, 21 ect ...


The Apache2 issue is on my new server Deb 9.4 which will replace the 
old server once it is all configured. At this time the new server is 
not configured with the router as i do not believe i can run 2 servers 
at the same time on the same network ( or can i ). and i do not want 
any interruption with the old server running as it is serving the many 
websites and network services needed for my business.


In short i am trying to make a smooth transition.

So perhaps Apache is not starting because my new server is not 
configured with our 1 router .. ? maybe ?


I have 1 internet line, and 1 router.



To keep it simple:

The router will dish out Ip address on a given subnet.
So you may have both servers (old, new) connected on the same subnet 
without inpacting connections to the old server.




For testing you should read the advice from:

https://www3.ntu.edu.sg/home/ehchua/programming/howto/Apache_HowToConfigure.html#zz-1.

Basically, use the listen directive with only a port above 1024:

listen 8000

--
John Doe



Re: apache not running at boot

2018-07-23 Thread john doe

On 7/23/2018 9:42 AM, Joe wrote:

On Sun, 22 Jul 2018 18:14:04 -0400
Dave  wrote:




I think i should explain something i did not explain before -

I have an old server that is currently running, it is old and running
Deb 4 , and completely configured to run with our 1 router, server
IP, dhcp, all ports 80, 443, 22, 21 ect ...

The Apache2 issue is on my new server Deb 9.4 which will replace the
old server once it is all configured. At this time the new server is
not configured with the router as i do not believe i can run 2
servers at the same time on the same network ( or can i ). and i do
not want any interruption with the old server running as it is
serving the many websites and network services needed for my business.

In short i am trying to make a smooth transition.

So perhaps Apache is not starting because my new server is not
configured with our 1 router .. ? maybe ?

I have 1 internet line, and 1 router.



No, there shouldn't be a problem. There can't be two DHCP servers in
one network without a lot of faffing about, but it appears neither of
your servers is providing DHCP.

The issue appears to be one of slow network startup. It's still not
completely clear what software is actually setting the IP address on
your server. Being a server, the IP address should be statically set,
not picking up DHCP, and there should be no real need for Network
Manager, if you have that installed. Until we get to the bottom of
this, there will be no progress.



Looks like NM is used:

https://lists.debian.org/debian-user/2018/07/msg00848.html

--
John Doe



Re: apache not running at boot

2018-07-23 Thread Joe
On Sun, 22 Jul 2018 18:14:04 -0400
Dave  wrote:


> 
> I think i should explain something i did not explain before -
> 
> I have an old server that is currently running, it is old and running 
> Deb 4 , and completely configured to run with our 1 router, server
> IP, dhcp, all ports 80, 443, 22, 21 ect ...
> 
> The Apache2 issue is on my new server Deb 9.4 which will replace the
> old server once it is all configured. At this time the new server is
> not configured with the router as i do not believe i can run 2
> servers at the same time on the same network ( or can i ). and i do
> not want any interruption with the old server running as it is
> serving the many websites and network services needed for my business.
> 
> In short i am trying to make a smooth transition.
> 
> So perhaps Apache is not starting because my new server is not 
> configured with our 1 router .. ? maybe ?
> 
> I have 1 internet line, and 1 router.
> 

No, there shouldn't be a problem. There can't be two DHCP servers in
one network without a lot of faffing about, but it appears neither of
your servers is providing DHCP.

The issue appears to be one of slow network startup. It's still not
completely clear what software is actually setting the IP address on
your server. Being a server, the IP address should be statically set,
not picking up DHCP, and there should be no real need for Network
Manager, if you have that installed. Until we get to the bottom of
this, there will be no progress.

-- 
Joe



Re: apache not running at boot

2018-07-23 Thread john doe

On 7/23/2018 12:14 AM, Dave wrote:



On 7/22/18 1:04 PM, Cindy-Sue Causey wrote:

On 7/22/18, mick crane  wrote:

On 2018-07-22 16:13, Dave wrote:


i can't imagine why Deb, is not automatically configuring apache2 to
auto start, a well know server for 10+ years and yet it seems in my
case it was not configured properly.

Please if anyone out there may have the answer, let us know.

as it seems that the network comes up after a reboot at this stage I'd
be inclined to remove and re-install apache2 and hope that the install
sorts it out.

but then I don't know what I'm doing.


It's always an option in my own playbook. It's a last resort one, but
still an option.

I go the additional step to secondarily purge any dependencies that
*might* suddenly become orphaned during a remove/uninstall. Apt-get is
friendly about sharing those.

Newly orphaned packages will be offered up as part of the feedback for
a command such as "apt-get upgrade". I don't how other package
managers handle the same.

That extra step is worth it to me because maybe the problem is with a
dependency package and not necessarily the primary desired one.

Cindy :)


I think i should explain something i did not explain before -

I have an old server that is currently running, it is old and running 
Deb 4 , and completely configured to run with our 1 router, server IP, 
dhcp, all ports 80, 443, 22, 21 ect ...


The Apache2 issue is on my new server Deb 9.4 which will replace the old 
server once it is all configured. At this time the new server is not 
configured with the router as i do not believe i can run 2 servers at 
the same time on the same network ( or can i ). and i do not want any 
interruption with the old server running as it is serving the many 
websites and network services needed for my business.


In short i am trying to make a smooth transition.

So perhaps Apache is not starting because my new server is not 
configured with our 1 router .. ? maybe ?


I have 1 internet line, and 1 router.



To keep it simple:

The router will dish out Ip address on a given subnet.
So you may have both servers (old, new) connected on the same subnet 
without inpacting connections to the old server.


Don't you have an other router laying around that could be used to 
create a small test network (spare router giving an IP address to new 
router and one client to test how everything is working).


If you want to keep that new isolated server from the network you can 
always asign a fix Ip address to the interface and see how it goes.

NetworkManager will need to be used (I can't help you on that front).

That does not explain though why it is working when you start the 
apache2 manually and not at boot; one explanation could be that 
NetworkManager is configuring that interface.


$ ip addr show 

Hopefully, you are doing the configuration of apache on the new server 
from scratch.


I'm not sure about using NetworkManager on a server; I would rather 
install Debian with no desktop manager and install webmin or something 
similar.


--
John Doe



Re: apache not running at boot

2018-07-22 Thread mick crane

On 2018-07-22 23:30, mick crane wrote:

On 2018-07-22 23:14, Dave wrote:

On 7/22/18 1:04 PM, Cindy-Sue Causey wrote:

On 7/22/18, mick crane  wrote:

On 2018-07-22 16:13, Dave wrote:

i can't imagine why Deb, is not automatically configuring apache2 
to

auto start, a well know server for 10+ years and yet it seems in my
case it was not configured properly.

Please if anyone out there may have the answer, let us know.
as it seems that the network comes up after a reboot at this stage 
I'd
be inclined to remove and re-install apache2 and hope that the 
install

sorts it out.

but then I don't know what I'm doing.


It's always an option in my own playbook. It's a last resort one, but
still an option.

I go the additional step to secondarily purge any dependencies that
*might* suddenly become orphaned during a remove/uninstall. Apt-get 
is

friendly about sharing those.

Newly orphaned packages will be offered up as part of the feedback 
for

a command such as "apt-get upgrade". I don't how other package
managers handle the same.

That extra step is worth it to me because maybe the problem is with a
dependency package and not necessarily the primary desired one.

Cindy :)


I think i should explain something i did not explain before -

I have an old server that is currently running, it is old and running
Deb 4 , and completely configured to run with our 1 router, server
IP,  dhcp, all ports 80, 443, 22, 21 ect ...

The Apache2 issue is on my new server Deb 9.4 which will replace the
old server once it is all configured. At this time the new server is
not configured with the router as i do not believe i can run 2 servers
at the same time on the same network ( or can i ). and i do not want
any interruption with the old server running as it is serving the many
websites and network services needed for my business.

In short i am trying to make a smooth transition.

So perhaps Apache is not starting because my new server is not
configured with our 1 router .. ? maybe ?

I have 1 internet line, and 1 router.


cool you should mention that
seems like you have organised some conflicts for yourself.
shutdown old server and try again

mick

sorry but.
you can put other server on network but with other ipaddress in same 
range if not doing anything.

then change on whatever needs to know where it is and unplug old server.
this is likely the problem with ipaddresses.

--
Key ID4BFEBB31



Re: apache not running at boot

2018-07-22 Thread mick crane

On 2018-07-22 23:14, Dave wrote:

On 7/22/18 1:04 PM, Cindy-Sue Causey wrote:

On 7/22/18, mick crane  wrote:

On 2018-07-22 16:13, Dave wrote:


i can't imagine why Deb, is not automatically configuring apache2 to
auto start, a well know server for 10+ years and yet it seems in my
case it was not configured properly.

Please if anyone out there may have the answer, let us know.
as it seems that the network comes up after a reboot at this stage 
I'd
be inclined to remove and re-install apache2 and hope that the 
install

sorts it out.

but then I don't know what I'm doing.


It's always an option in my own playbook. It's a last resort one, but
still an option.

I go the additional step to secondarily purge any dependencies that
*might* suddenly become orphaned during a remove/uninstall. Apt-get is
friendly about sharing those.

Newly orphaned packages will be offered up as part of the feedback for
a command such as "apt-get upgrade". I don't how other package
managers handle the same.

That extra step is worth it to me because maybe the problem is with a
dependency package and not necessarily the primary desired one.

Cindy :)


I think i should explain something i did not explain before -

I have an old server that is currently running, it is old and running
Deb 4 , and completely configured to run with our 1 router, server
IP,  dhcp, all ports 80, 443, 22, 21 ect ...

The Apache2 issue is on my new server Deb 9.4 which will replace the
old server once it is all configured. At this time the new server is
not configured with the router as i do not believe i can run 2 servers
at the same time on the same network ( or can i ). and i do not want
any interruption with the old server running as it is serving the many
websites and network services needed for my business.

In short i am trying to make a smooth transition.

So perhaps Apache is not starting because my new server is not
configured with our 1 router .. ? maybe ?

I have 1 internet line, and 1 router.


cool you should mention that
seems like you have organised some conflicts for yourself.
shutdown old server and try again

mick

--
Key ID4BFEBB31



Re: apache not running at boot

2018-07-22 Thread Dave




On 7/22/18 1:04 PM, Cindy-Sue Causey wrote:

On 7/22/18, mick crane  wrote:

On 2018-07-22 16:13, Dave wrote:


i can't imagine why Deb, is not automatically configuring apache2 to
auto start, a well know server for 10+ years and yet it seems in my
case it was not configured properly.

Please if anyone out there may have the answer, let us know.

as it seems that the network comes up after a reboot at this stage I'd
be inclined to remove and re-install apache2 and hope that the install
sorts it out.

but then I don't know what I'm doing.


It's always an option in my own playbook. It's a last resort one, but
still an option.

I go the additional step to secondarily purge any dependencies that
*might* suddenly become orphaned during a remove/uninstall. Apt-get is
friendly about sharing those.

Newly orphaned packages will be offered up as part of the feedback for
a command such as "apt-get upgrade". I don't how other package
managers handle the same.

That extra step is worth it to me because maybe the problem is with a
dependency package and not necessarily the primary desired one.

Cindy :)


I think i should explain something i did not explain before -

I have an old server that is currently running, it is old and running 
Deb 4 , and completely configured to run with our 1 router, server IP,  
dhcp, all ports 80, 443, 22, 21 ect ...


The Apache2 issue is on my new server Deb 9.4 which will replace the old 
server once it is all configured. At this time the new server is not 
configured with the router as i do not believe i can run 2 servers at 
the same time on the same network ( or can i ). and i do not want any 
interruption with the old server running as it is serving the many 
websites and network services needed for my business.


In short i am trying to make a smooth transition.

So perhaps Apache is not starting because my new server is not 
configured with our 1 router .. ? maybe ?


I have 1 internet line, and 1 router.



Re: apache not running at boot

2018-07-22 Thread mick crane

On 2018-07-22 17:52, john doe wrote:



Also what is the output of:

$ systemctl status NetworkManager-wait-online


what would be handy is a way to get a verbose output to the apache2 log 
on boot.


mick

--
Key ID4BFEBB31



Re: apache not running at boot

2018-07-22 Thread Cindy-Sue Causey
On 7/22/18, mick crane  wrote:
> On 2018-07-22 16:13, Dave wrote:
> 
>> i can't imagine why Deb, is not automatically configuring apache2 to
>> auto start, a well know server for 10+ years and yet it seems in my
>> case it was not configured properly.
>>
>> Please if anyone out there may have the answer, let us know.
>
> as it seems that the network comes up after a reboot at this stage I'd
> be inclined to remove and re-install apache2 and hope that the install
> sorts it out.
>
> but then I don't know what I'm doing.


It's always an option in my own playbook. It's a last resort one, but
still an option.

I go the additional step to secondarily purge any dependencies that
*might* suddenly become orphaned during a remove/uninstall. Apt-get is
friendly about sharing those.

Newly orphaned packages will be offered up as part of the feedback for
a command such as "apt-get upgrade". I don't how other package
managers handle the same.

That extra step is worth it to me because maybe the problem is with a
dependency package and not necessarily the primary desired one.

Cindy :)
-- 
Cindy-Sue Causey
Talking Rock, Pickens County, Georgia, USA

* runs with duct tape *



Re: apache not running at boot

2018-07-22 Thread john doe

On 7/22/2018 5:32 PM, john doe wrote:

On 7/22/2018 5:13 PM, Dave wrote:



On 07/22/2018 10:59 AM, john doe wrote:

On 7/22/2018 4:48 PM, Dave wrote:

On 07/22/2018 10:39 AM, john doe wrote:

On 7/22/2018 4:08 PM, Dave wrote:



On 07/22/2018 09:17 AM, john doe wrote:

On 7/22/2018 2:57 PM, Dave wrote:



On 07/22/2018 02:14 AM, john doe wrote:

On 7/21/2018 11:22 PM, Dave wrote:



On 07/21/2018 11:38 AM, john doe wrote:

On 7/21/2018 3:46 PM, Dave wrote:



On 07/21/2018 08:42 AM, mick crane wrote:

On 2018-07-21 13:00, john doe wrote:

On 7/21/2018 11:21 AM, mick crane wrote:

On 2018-07-21 09:56, mick crane wrote:

On 2018-07-21 09:39, john doe wrote:

my interfaces file is identical and apache starts OK 
so it is probably something else.

in /lib/systemd/system/apache2.target

do you have the "after" bit

   1 [Unit]
   2 Description=The Apache HTTP Server
   3 After=network.target remote-fs.target 
nss-lookup.target




Or looking if "NetworkManager-wait-online.service" is 
enabled.
For systemd-networkd that is : 
"systemd-networkd-wait-online.service".


https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/ 



If your '/etc/network/interfaces' file is empty with 
the exception of
the 'lo' interface, your interfaces are probably 
handled by an other
"program" and you need to determine which "program" is 
responsible for

your interfaces.


I'm quite cheerful as everything seems to be working but 
it wouldn't

hurt to find out and may assist OP.


Appologies for the confusion, I read your answer and think 
I could add

to it but was not in anycase directed towards you! :)

Yes, my comment was for the OP (taking into account other 
answers he

has sent to the list).


looking at links you posted if I was OP I would probably 
try adding


After=network-online.target
Wants=network-online.target

to  /lib/systemd/system/apache2.target

and see if apache starts at boot

mick


hello - my Deb 9.4 / Apache 2.4 has no file called 
apache2.target, however there is a 
/lib/systemd/system/apache2.service file:: the contents as 
follows

Description=The Apache HTTP Server
After=network.target remote-fs.target nss-lookup.target

[Service]
Type=forking
Environment=APACHE_STARTED_BY_SYSTEMD=true
ExecStart=/usr/sbin/apachectl start
ExecStop=/usr/sbin/apachectl stop
ExecReload=/usr/sbin/apachectl graceful
PrivateTmp=true
Restart=on-abort

[Install]
WantedBy=multi-user.target
root@culser:/lib/systemd/system#




Ok -- lets try:

Undo any changes in '/etc/network/interfaces'.

As root:

$ mkdir -p /etc/systemd/apache2.d
$ printf "%s\n%s\n" "After=network-online.target" 
"Wants=network-online.target" > 
/etc/systemd/apache2.d/boot-args.conf


Then try:

$ systemctl enable NetworkManager-wait-online
$ systemctl reboot

If it is not working:

$ systemctl disable NetworkManager-wait-online.service
$ systemctl enable systemd-networkd-wait-online.service
$ systemctl reboot


Note that the lines starting with a '$' are commands and 
should be entered on one line.


https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/
https://www.freedesktop.org/software/systemd/man/systemd.unit.html 





I tried both those options, apache2 does not start at boot.
the contents of /boot-args.conf is as follows:

After=network-online.target
Wants=network-online.target

To check if apache is running after boot i check the 
/var/run/apache2.pid file is present. it is not present.

I also use ps -e | grep apache  and nothing is returned.







After a reboot what output do  you get:

$ systemctl status apache2



after boot or reboot the systemctl cmd prints the following:

● apache2.service - The Apache HTTP Server
    Loaded: loaded (/lib/systemd/system/apache2.service; 
enabled; vendor preset: enabled)
    Active: failed (Result: exit-code) since Sun 2018-07-22 
08:55:17 EDT; 51s ago
   Process: 588 ExecStart=/usr/sbin/apachectl start 
(code=exited, status=1/FAILURE)


Jul 22 08:55:17 culser systemd[1]: Starting The Apache HTTP 
Server...
Jul 22 08:55:17 culser apachectl[588]: (99)Cannot assign 
requested address: AH00072: make_sock: coul
Jul 22 08:55:17 culser apachectl[588]: no listening sockets 
available, shutting down

Jul 22 08:55:17 culser apachectl[588]: AH00015: Unable to open logs
Jul 22 08:55:17 culser apachectl[588]: Action 'start' failed.
Jul 22 08:55:17 culser apachectl[588]: The Apache error log may 
have more information.
Jul 22 08:55:17 culser systemd[1]: apache2.service: Control 
process exited, code=exited status=1
Jul 22 08:55:17 culser systemd[1]: Failed to start The Apache 
HTTP Server.
Jul 22 08:55:17 culser systemd[1]: apache2.service: Unit entered 
failed state.
Jul 22 08:55:17 culser systemd[1]: apache2.service: Failed with 
result 'exit-code'.






Is it properly starting if you do?:

$ systemctl start apache2
$/usr/sbin/apachectl start

If you get any errors it is most likely that the issue lies in 
Apache's configuration.



John,

After boot - systemctl start apache2, gets no 

Re: apache not running at boot

2018-07-22 Thread Curt
On 2018-07-22, Dave  wrote:
>
>
>>>
>>> Jul 22 10:42:59 culser NetworkManager[574]:  [1532270579.0341] 
>>> dhcp4 (enp5s0):   domain name
   **
I don't know anything about this. I do notice your network device
doesn't seem to be called 'eth0', so using that designation in your
/e/n/i probably does exactly zero.

Maybe I'm wrong and/or this has nothing to do with the price of tea in
China.

Good luck.

-- 
Boris sober and Boris drunk are such different people, they’ve never even met. 
-- Sergei Dovlatov, Pushkin Hills



Re: apache not running at boot

2018-07-22 Thread john doe

On 7/22/2018 5:13 PM, Dave wrote:



On 07/22/2018 10:59 AM, john doe wrote:

On 7/22/2018 4:48 PM, Dave wrote:

On 07/22/2018 10:39 AM, john doe wrote:

On 7/22/2018 4:08 PM, Dave wrote:



On 07/22/2018 09:17 AM, john doe wrote:

On 7/22/2018 2:57 PM, Dave wrote:



On 07/22/2018 02:14 AM, john doe wrote:

On 7/21/2018 11:22 PM, Dave wrote:



On 07/21/2018 11:38 AM, john doe wrote:

On 7/21/2018 3:46 PM, Dave wrote:



On 07/21/2018 08:42 AM, mick crane wrote:

On 2018-07-21 13:00, john doe wrote:

On 7/21/2018 11:21 AM, mick crane wrote:

On 2018-07-21 09:56, mick crane wrote:

On 2018-07-21 09:39, john doe wrote:

my interfaces file is identical and apache starts OK so 
it is probably something else.

in /lib/systemd/system/apache2.target

do you have the "after" bit

   1 [Unit]
   2 Description=The Apache HTTP Server
   3 After=network.target remote-fs.target 
nss-lookup.target




Or looking if "NetworkManager-wait-online.service" is 
enabled.
For systemd-networkd that is : 
"systemd-networkd-wait-online.service".


https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/ 



If your '/etc/network/interfaces' file is empty with the 
exception of
the 'lo' interface, your interfaces are probably handled 
by an other
"program" and you need to determine which "program" is 
responsible for

your interfaces.


I'm quite cheerful as everything seems to be working but 
it wouldn't

hurt to find out and may assist OP.


Appologies for the confusion, I read your answer and think 
I could add

to it but was not in anycase directed towards you! :)

Yes, my comment was for the OP (taking into account other 
answers he

has sent to the list).


looking at links you posted if I was OP I would probably try 
adding


After=network-online.target
Wants=network-online.target

to  /lib/systemd/system/apache2.target

and see if apache starts at boot

mick


hello - my Deb 9.4 / Apache 2.4 has no file called 
apache2.target, however there is a 
/lib/systemd/system/apache2.service file:: the contents as 
follows

Description=The Apache HTTP Server
After=network.target remote-fs.target nss-lookup.target

[Service]
Type=forking
Environment=APACHE_STARTED_BY_SYSTEMD=true
ExecStart=/usr/sbin/apachectl start
ExecStop=/usr/sbin/apachectl stop
ExecReload=/usr/sbin/apachectl graceful
PrivateTmp=true
Restart=on-abort

[Install]
WantedBy=multi-user.target
root@culser:/lib/systemd/system#




Ok -- lets try:

Undo any changes in '/etc/network/interfaces'.

As root:

$ mkdir -p /etc/systemd/apache2.d
$ printf "%s\n%s\n" "After=network-online.target" 
"Wants=network-online.target" > 
/etc/systemd/apache2.d/boot-args.conf


Then try:

$ systemctl enable NetworkManager-wait-online
$ systemctl reboot

If it is not working:

$ systemctl disable NetworkManager-wait-online.service
$ systemctl enable systemd-networkd-wait-online.service
$ systemctl reboot


Note that the lines starting with a '$' are commands and 
should be entered on one line.


https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/
https://www.freedesktop.org/software/systemd/man/systemd.unit.html 





I tried both those options, apache2 does not start at boot.
the contents of /boot-args.conf is as follows:

After=network-online.target
Wants=network-online.target

To check if apache is running after boot i check the 
/var/run/apache2.pid file is present. it is not present.

I also use ps -e | grep apache  and nothing is returned.







After a reboot what output do  you get:

$ systemctl status apache2



after boot or reboot the systemctl cmd prints the following:

● apache2.service - The Apache HTTP Server
    Loaded: loaded (/lib/systemd/system/apache2.service; enabled; 
vendor preset: enabled)
    Active: failed (Result: exit-code) since Sun 2018-07-22 
08:55:17 EDT; 51s ago
   Process: 588 ExecStart=/usr/sbin/apachectl start (code=exited, 
status=1/FAILURE)


Jul 22 08:55:17 culser systemd[1]: Starting The Apache HTTP 
Server...
Jul 22 08:55:17 culser apachectl[588]: (99)Cannot assign 
requested address: AH00072: make_sock: coul
Jul 22 08:55:17 culser apachectl[588]: no listening sockets 
available, shutting down

Jul 22 08:55:17 culser apachectl[588]: AH00015: Unable to open logs
Jul 22 08:55:17 culser apachectl[588]: Action 'start' failed.
Jul 22 08:55:17 culser apachectl[588]: The Apache error log may 
have more information.
Jul 22 08:55:17 culser systemd[1]: apache2.service: Control 
process exited, code=exited status=1
Jul 22 08:55:17 culser systemd[1]: Failed to start The Apache 
HTTP Server.
Jul 22 08:55:17 culser systemd[1]: apache2.service: Unit entered 
failed state.
Jul 22 08:55:17 culser systemd[1]: apache2.service: Failed with 
result 'exit-code'.






Is it properly starting if you do?:

$ systemctl start apache2
$/usr/sbin/apachectl start

If you get any errors it is most likely that the issue lies in 
Apache's configuration.



John,

After boot - systemctl start apache2, gets no errors.
ps -e shows apache2 is 

Re: apache not running at boot

2018-07-22 Thread mick crane

On 2018-07-22 16:13, Dave wrote:


i can't imagine why Deb, is not automatically configuring apache2 to
auto start, a well know server for 10+ years and yet it seems in my
case it was not configured properly.

Please if anyone out there may have the answer, let us know.


as it seems that the network comes up after a reboot at this stage I'd 
be inclined to remove and re-install apache2 and hope that the install 
sorts it out.


but then I don't know what I'm doing.
mick

--
Key ID4BFEBB31



Re: apache not running at boot

2018-07-22 Thread Dave




On 07/22/2018 10:59 AM, john doe wrote:

On 7/22/2018 4:48 PM, Dave wrote:

On 07/22/2018 10:39 AM, john doe wrote:

On 7/22/2018 4:08 PM, Dave wrote:



On 07/22/2018 09:17 AM, john doe wrote:

On 7/22/2018 2:57 PM, Dave wrote:



On 07/22/2018 02:14 AM, john doe wrote:

On 7/21/2018 11:22 PM, Dave wrote:



On 07/21/2018 11:38 AM, john doe wrote:

On 7/21/2018 3:46 PM, Dave wrote:



On 07/21/2018 08:42 AM, mick crane wrote:

On 2018-07-21 13:00, john doe wrote:

On 7/21/2018 11:21 AM, mick crane wrote:

On 2018-07-21 09:56, mick crane wrote:

On 2018-07-21 09:39, john doe wrote:

my interfaces file is identical and apache starts OK so 
it is probably something else.

in /lib/systemd/system/apache2.target

do you have the "after" bit

   1 [Unit]
   2 Description=The Apache HTTP Server
   3 After=network.target remote-fs.target 
nss-lookup.target




Or looking if "NetworkManager-wait-online.service" is 
enabled.
For systemd-networkd that is : 
"systemd-networkd-wait-online.service".


https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/ 



If your '/etc/network/interfaces' file is empty with the 
exception of
the 'lo' interface, your interfaces are probably handled 
by an other
"program" and you need to determine which "program" is 
responsible for

your interfaces.


I'm quite cheerful as everything seems to be working but 
it wouldn't

hurt to find out and may assist OP.


Appologies for the confusion, I read your answer and think 
I could add

to it but was not in anycase directed towards you! :)

Yes, my comment was for the OP (taking into account other 
answers he

has sent to the list).


looking at links you posted if I was OP I would probably try 
adding


After=network-online.target
Wants=network-online.target

to  /lib/systemd/system/apache2.target

and see if apache starts at boot

mick


hello - my Deb 9.4 / Apache 2.4 has no file called 
apache2.target, however there is a 
/lib/systemd/system/apache2.service file:: the contents as 
follows

Description=The Apache HTTP Server
After=network.target remote-fs.target nss-lookup.target

[Service]
Type=forking
Environment=APACHE_STARTED_BY_SYSTEMD=true
ExecStart=/usr/sbin/apachectl start
ExecStop=/usr/sbin/apachectl stop
ExecReload=/usr/sbin/apachectl graceful
PrivateTmp=true
Restart=on-abort

[Install]
WantedBy=multi-user.target
root@culser:/lib/systemd/system#




Ok -- lets try:

Undo any changes in '/etc/network/interfaces'.

As root:

$ mkdir -p /etc/systemd/apache2.d
$ printf "%s\n%s\n" "After=network-online.target" 
"Wants=network-online.target" > 
/etc/systemd/apache2.d/boot-args.conf


Then try:

$ systemctl enable NetworkManager-wait-online
$ systemctl reboot

If it is not working:

$ systemctl disable NetworkManager-wait-online.service
$ systemctl enable systemd-networkd-wait-online.service
$ systemctl reboot


Note that the lines starting with a '$' are commands and 
should be entered on one line.


https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/
https://www.freedesktop.org/software/systemd/man/systemd.unit.html 





I tried both those options, apache2 does not start at boot.
the contents of /boot-args.conf is as follows:

After=network-online.target
Wants=network-online.target

To check if apache is running after boot i check the 
/var/run/apache2.pid file is present. it is not present.

I also use ps -e | grep apache  and nothing is returned.







After a reboot what output do  you get:

$ systemctl status apache2



after boot or reboot the systemctl cmd prints the following:

● apache2.service - The Apache HTTP Server
    Loaded: loaded (/lib/systemd/system/apache2.service; enabled; 
vendor preset: enabled)
    Active: failed (Result: exit-code) since Sun 2018-07-22 
08:55:17 EDT; 51s ago
   Process: 588 ExecStart=/usr/sbin/apachectl start (code=exited, 
status=1/FAILURE)


Jul 22 08:55:17 culser systemd[1]: Starting The Apache HTTP 
Server...
Jul 22 08:55:17 culser apachectl[588]: (99)Cannot assign 
requested address: AH00072: make_sock: coul
Jul 22 08:55:17 culser apachectl[588]: no listening sockets 
available, shutting down

Jul 22 08:55:17 culser apachectl[588]: AH00015: Unable to open logs
Jul 22 08:55:17 culser apachectl[588]: Action 'start' failed.
Jul 22 08:55:17 culser apachectl[588]: The Apache error log may 
have more information.
Jul 22 08:55:17 culser systemd[1]: apache2.service: Control 
process exited, code=exited status=1
Jul 22 08:55:17 culser systemd[1]: Failed to start The Apache 
HTTP Server.
Jul 22 08:55:17 culser systemd[1]: apache2.service: Unit entered 
failed state.
Jul 22 08:55:17 culser systemd[1]: apache2.service: Failed with 
result 'exit-code'.






Is it properly starting if you do?:

$ systemctl start apache2
$/usr/sbin/apachectl start

If you get any errors it is most likely that the issue lies in 
Apache's configuration.



John,

After boot - systemctl start apache2, gets no errors.
ps -e shows apache2 is running.
/var/run/apache.pid is present.


Re: apache not running at boot

2018-07-22 Thread john doe

On 7/22/2018 4:48 PM, Dave wrote:

On 07/22/2018 10:39 AM, john doe wrote:

On 7/22/2018 4:08 PM, Dave wrote:



On 07/22/2018 09:17 AM, john doe wrote:

On 7/22/2018 2:57 PM, Dave wrote:



On 07/22/2018 02:14 AM, john doe wrote:

On 7/21/2018 11:22 PM, Dave wrote:



On 07/21/2018 11:38 AM, john doe wrote:

On 7/21/2018 3:46 PM, Dave wrote:



On 07/21/2018 08:42 AM, mick crane wrote:

On 2018-07-21 13:00, john doe wrote:

On 7/21/2018 11:21 AM, mick crane wrote:

On 2018-07-21 09:56, mick crane wrote:

On 2018-07-21 09:39, john doe wrote:

my interfaces file is identical and apache starts OK so 
it is probably something else.

in /lib/systemd/system/apache2.target

do you have the "after" bit

   1 [Unit]
   2 Description=The Apache HTTP Server
   3 After=network.target remote-fs.target 
nss-lookup.target




Or looking if "NetworkManager-wait-online.service" is 
enabled.
For systemd-networkd that is : 
"systemd-networkd-wait-online.service".


https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/ 



If your '/etc/network/interfaces' file is empty with the 
exception of
the 'lo' interface, your interfaces are probably handled 
by an other
"program" and you need to determine which "program" is 
responsible for

your interfaces.


I'm quite cheerful as everything seems to be working but it 
wouldn't

hurt to find out and may assist OP.


Appologies for the confusion, I read your answer and think I 
could add

to it but was not in anycase directed towards you! :)

Yes, my comment was for the OP (taking into account other 
answers he

has sent to the list).


looking at links you posted if I was OP I would probably try 
adding


After=network-online.target
Wants=network-online.target

to  /lib/systemd/system/apache2.target

and see if apache starts at boot

mick


hello - my Deb 9.4 / Apache 2.4 has no file called 
apache2.target, however there is a 
/lib/systemd/system/apache2.service file:: the contents as follows

Description=The Apache HTTP Server
After=network.target remote-fs.target nss-lookup.target

[Service]
Type=forking
Environment=APACHE_STARTED_BY_SYSTEMD=true
ExecStart=/usr/sbin/apachectl start
ExecStop=/usr/sbin/apachectl stop
ExecReload=/usr/sbin/apachectl graceful
PrivateTmp=true
Restart=on-abort

[Install]
WantedBy=multi-user.target
root@culser:/lib/systemd/system#




Ok -- lets try:

Undo any changes in '/etc/network/interfaces'.

As root:

$ mkdir -p /etc/systemd/apache2.d
$ printf "%s\n%s\n" "After=network-online.target" 
"Wants=network-online.target" > 
/etc/systemd/apache2.d/boot-args.conf


Then try:

$ systemctl enable NetworkManager-wait-online
$ systemctl reboot

If it is not working:

$ systemctl disable NetworkManager-wait-online.service
$ systemctl enable systemd-networkd-wait-online.service
$ systemctl reboot


Note that the lines starting with a '$' are commands and should 
be entered on one line.


https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/
https://www.freedesktop.org/software/systemd/man/systemd.unit.html



I tried both those options, apache2 does not start at boot.
the contents of /boot-args.conf is as follows:

After=network-online.target
Wants=network-online.target

To check if apache is running after boot i check the 
/var/run/apache2.pid file is present. it is not present.

I also use ps -e | grep apache  and nothing is returned.







After a reboot what output do  you get:

$ systemctl status apache2



after boot or reboot the systemctl cmd prints the following:

● apache2.service - The Apache HTTP Server
    Loaded: loaded (/lib/systemd/system/apache2.service; enabled; 
vendor preset: enabled)
    Active: failed (Result: exit-code) since Sun 2018-07-22 
08:55:17 EDT; 51s ago
   Process: 588 ExecStart=/usr/sbin/apachectl start (code=exited, 
status=1/FAILURE)


Jul 22 08:55:17 culser systemd[1]: Starting The Apache HTTP Server...
Jul 22 08:55:17 culser apachectl[588]: (99)Cannot assign requested 
address: AH00072: make_sock: coul
Jul 22 08:55:17 culser apachectl[588]: no listening sockets 
available, shutting down

Jul 22 08:55:17 culser apachectl[588]: AH00015: Unable to open logs
Jul 22 08:55:17 culser apachectl[588]: Action 'start' failed.
Jul 22 08:55:17 culser apachectl[588]: The Apache error log may 
have more information.
Jul 22 08:55:17 culser systemd[1]: apache2.service: Control process 
exited, code=exited status=1
Jul 22 08:55:17 culser systemd[1]: Failed to start The Apache HTTP 
Server.
Jul 22 08:55:17 culser systemd[1]: apache2.service: Unit entered 
failed state.
Jul 22 08:55:17 culser systemd[1]: apache2.service: Failed with 
result 'exit-code'.






Is it properly starting if you do?:

$ systemctl start apache2
$/usr/sbin/apachectl start

If you get any errors it is most likely that the issue lies in 
Apache's configuration.



John,

After boot - systemctl start apache2, gets no errors.
ps -e shows apache2 is running.
/var/run/apache.pid is present.

systemctl status apache2 produces the following:

Re: apache not running at boot

2018-07-22 Thread Dave

On 07/22/2018 10:39 AM, john doe wrote:

On 7/22/2018 4:08 PM, Dave wrote:



On 07/22/2018 09:17 AM, john doe wrote:

On 7/22/2018 2:57 PM, Dave wrote:



On 07/22/2018 02:14 AM, john doe wrote:

On 7/21/2018 11:22 PM, Dave wrote:



On 07/21/2018 11:38 AM, john doe wrote:

On 7/21/2018 3:46 PM, Dave wrote:



On 07/21/2018 08:42 AM, mick crane wrote:

On 2018-07-21 13:00, john doe wrote:

On 7/21/2018 11:21 AM, mick crane wrote:

On 2018-07-21 09:56, mick crane wrote:

On 2018-07-21 09:39, john doe wrote:

my interfaces file is identical and apache starts OK so 
it is probably something else.

in /lib/systemd/system/apache2.target

do you have the "after" bit

   1 [Unit]
   2 Description=The Apache HTTP Server
   3 After=network.target remote-fs.target 
nss-lookup.target




Or looking if "NetworkManager-wait-online.service" is 
enabled.
For systemd-networkd that is : 
"systemd-networkd-wait-online.service".


https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/ 



If your '/etc/network/interfaces' file is empty with the 
exception of
the 'lo' interface, your interfaces are probably handled 
by an other
"program" and you need to determine which "program" is 
responsible for

your interfaces.


I'm quite cheerful as everything seems to be working but it 
wouldn't

hurt to find out and may assist OP.


Appologies for the confusion, I read your answer and think I 
could add

to it but was not in anycase directed towards you! :)

Yes, my comment was for the OP (taking into account other 
answers he

has sent to the list).


looking at links you posted if I was OP I would probably try 
adding


After=network-online.target
Wants=network-online.target

to  /lib/systemd/system/apache2.target

and see if apache starts at boot

mick


hello - my Deb 9.4 / Apache 2.4 has no file called 
apache2.target, however there is a 
/lib/systemd/system/apache2.service file:: the contents as follows

Description=The Apache HTTP Server
After=network.target remote-fs.target nss-lookup.target

[Service]
Type=forking
Environment=APACHE_STARTED_BY_SYSTEMD=true
ExecStart=/usr/sbin/apachectl start
ExecStop=/usr/sbin/apachectl stop
ExecReload=/usr/sbin/apachectl graceful
PrivateTmp=true
Restart=on-abort

[Install]
WantedBy=multi-user.target
root@culser:/lib/systemd/system#




Ok -- lets try:

Undo any changes in '/etc/network/interfaces'.

As root:

$ mkdir -p /etc/systemd/apache2.d
$ printf "%s\n%s\n" "After=network-online.target" 
"Wants=network-online.target" > 
/etc/systemd/apache2.d/boot-args.conf


Then try:

$ systemctl enable NetworkManager-wait-online
$ systemctl reboot

If it is not working:

$ systemctl disable NetworkManager-wait-online.service
$ systemctl enable systemd-networkd-wait-online.service
$ systemctl reboot


Note that the lines starting with a '$' are commands and should 
be entered on one line.


https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/
https://www.freedesktop.org/software/systemd/man/systemd.unit.html



I tried both those options, apache2 does not start at boot.
the contents of /boot-args.conf is as follows:

After=network-online.target
Wants=network-online.target

To check if apache is running after boot i check the 
/var/run/apache2.pid file is present. it is not present.

I also use ps -e | grep apache  and nothing is returned.







After a reboot what output do  you get:

$ systemctl status apache2



after boot or reboot the systemctl cmd prints the following:

● apache2.service - The Apache HTTP Server
    Loaded: loaded (/lib/systemd/system/apache2.service; enabled; 
vendor preset: enabled)
    Active: failed (Result: exit-code) since Sun 2018-07-22 
08:55:17 EDT; 51s ago
   Process: 588 ExecStart=/usr/sbin/apachectl start (code=exited, 
status=1/FAILURE)


Jul 22 08:55:17 culser systemd[1]: Starting The Apache HTTP Server...
Jul 22 08:55:17 culser apachectl[588]: (99)Cannot assign requested 
address: AH00072: make_sock: coul
Jul 22 08:55:17 culser apachectl[588]: no listening sockets 
available, shutting down

Jul 22 08:55:17 culser apachectl[588]: AH00015: Unable to open logs
Jul 22 08:55:17 culser apachectl[588]: Action 'start' failed.
Jul 22 08:55:17 culser apachectl[588]: The Apache error log may 
have more information.
Jul 22 08:55:17 culser systemd[1]: apache2.service: Control process 
exited, code=exited status=1
Jul 22 08:55:17 culser systemd[1]: Failed to start The Apache HTTP 
Server.
Jul 22 08:55:17 culser systemd[1]: apache2.service: Unit entered 
failed state.
Jul 22 08:55:17 culser systemd[1]: apache2.service: Failed with 
result 'exit-code'.






Is it properly starting if you do?:

$ systemctl start apache2
$/usr/sbin/apachectl start

If you get any errors it is most likely that the issue lies in 
Apache's configuration.



John,

After boot - systemctl start apache2, gets no errors.
ps -e shows apache2 is running.
/var/run/apache.pid is present.

systemctl status apache2 produces the following:

● apache2.service - The Apache 

Re: apache not running at boot

2018-07-22 Thread john doe

On 7/22/2018 4:08 PM, Dave wrote:



On 07/22/2018 09:17 AM, john doe wrote:

On 7/22/2018 2:57 PM, Dave wrote:



On 07/22/2018 02:14 AM, john doe wrote:

On 7/21/2018 11:22 PM, Dave wrote:



On 07/21/2018 11:38 AM, john doe wrote:

On 7/21/2018 3:46 PM, Dave wrote:



On 07/21/2018 08:42 AM, mick crane wrote:

On 2018-07-21 13:00, john doe wrote:

On 7/21/2018 11:21 AM, mick crane wrote:

On 2018-07-21 09:56, mick crane wrote:

On 2018-07-21 09:39, john doe wrote:

my interfaces file is identical and apache starts OK so it 
is probably something else.

in /lib/systemd/system/apache2.target

do you have the "after" bit

   1 [Unit]
   2 Description=The Apache HTTP Server
   3 After=network.target remote-fs.target 
nss-lookup.target




Or looking if "NetworkManager-wait-online.service" is enabled.
For systemd-networkd that is : 
"systemd-networkd-wait-online.service".


https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/ 



If your '/etc/network/interfaces' file is empty with the 
exception of
the 'lo' interface, your interfaces are probably handled by 
an other
"program" and you need to determine which "program" is 
responsible for

your interfaces.


I'm quite cheerful as everything seems to be working but it 
wouldn't

hurt to find out and may assist OP.


Appologies for the confusion, I read your answer and think I 
could add

to it but was not in anycase directed towards you! :)

Yes, my comment was for the OP (taking into account other 
answers he

has sent to the list).


looking at links you posted if I was OP I would probably try adding

After=network-online.target
Wants=network-online.target

to  /lib/systemd/system/apache2.target

and see if apache starts at boot

mick


hello - my Deb 9.4 / Apache 2.4 has no file called 
apache2.target, however there is a 
/lib/systemd/system/apache2.service file:: the contents as follows

Description=The Apache HTTP Server
After=network.target remote-fs.target nss-lookup.target

[Service]
Type=forking
Environment=APACHE_STARTED_BY_SYSTEMD=true
ExecStart=/usr/sbin/apachectl start
ExecStop=/usr/sbin/apachectl stop
ExecReload=/usr/sbin/apachectl graceful
PrivateTmp=true
Restart=on-abort

[Install]
WantedBy=multi-user.target
root@culser:/lib/systemd/system#




Ok -- lets try:

Undo any changes in '/etc/network/interfaces'.

As root:

$ mkdir -p /etc/systemd/apache2.d
$ printf "%s\n%s\n" "After=network-online.target" 
"Wants=network-online.target" > /etc/systemd/apache2.d/boot-args.conf


Then try:

$ systemctl enable NetworkManager-wait-online
$ systemctl reboot

If it is not working:

$ systemctl disable NetworkManager-wait-online.service
$ systemctl enable systemd-networkd-wait-online.service
$ systemctl reboot


Note that the lines starting with a '$' are commands and should be 
entered on one line.


https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/
https://www.freedesktop.org/software/systemd/man/systemd.unit.html



I tried both those options, apache2 does not start at boot.
the contents of /boot-args.conf is as follows:

After=network-online.target
Wants=network-online.target

To check if apache is running after boot i check the 
/var/run/apache2.pid file is present. it is not present.

I also use ps -e | grep apache  and nothing is returned.







After a reboot what output do  you get:

$ systemctl status apache2



after boot or reboot the systemctl cmd prints the following:

● apache2.service - The Apache HTTP Server
    Loaded: loaded (/lib/systemd/system/apache2.service; enabled; 
vendor preset: enabled)
    Active: failed (Result: exit-code) since Sun 2018-07-22 08:55:17 
EDT; 51s ago
   Process: 588 ExecStart=/usr/sbin/apachectl start (code=exited, 
status=1/FAILURE)


Jul 22 08:55:17 culser systemd[1]: Starting The Apache HTTP Server...
Jul 22 08:55:17 culser apachectl[588]: (99)Cannot assign requested 
address: AH00072: make_sock: coul
Jul 22 08:55:17 culser apachectl[588]: no listening sockets 
available, shutting down

Jul 22 08:55:17 culser apachectl[588]: AH00015: Unable to open logs
Jul 22 08:55:17 culser apachectl[588]: Action 'start' failed.
Jul 22 08:55:17 culser apachectl[588]: The Apache error log may have 
more information.
Jul 22 08:55:17 culser systemd[1]: apache2.service: Control process 
exited, code=exited status=1
Jul 22 08:55:17 culser systemd[1]: Failed to start The Apache HTTP 
Server.
Jul 22 08:55:17 culser systemd[1]: apache2.service: Unit entered 
failed state.
Jul 22 08:55:17 culser systemd[1]: apache2.service: Failed with 
result 'exit-code'.






Is it properly starting if you do?:

$ systemctl start apache2
$/usr/sbin/apachectl start

If you get any errors it is most likely that the issue lies in 
Apache's configuration.



John,

After boot - systemctl start apache2, gets no errors.
ps -e shows apache2 is running.
/var/run/apache.pid is present.

systemctl status apache2 produces the following:

● apache2.service - The Apache HTTP Server
    Loaded: loaded 

Re: apache not running at boot

2018-07-22 Thread Dave



On 07/22/2018 09:17 AM, john doe wrote:

On 7/22/2018 2:57 PM, Dave wrote:



On 07/22/2018 02:14 AM, john doe wrote:

On 7/21/2018 11:22 PM, Dave wrote:



On 07/21/2018 11:38 AM, john doe wrote:

On 7/21/2018 3:46 PM, Dave wrote:



On 07/21/2018 08:42 AM, mick crane wrote:

On 2018-07-21 13:00, john doe wrote:

On 7/21/2018 11:21 AM, mick crane wrote:

On 2018-07-21 09:56, mick crane wrote:

On 2018-07-21 09:39, john doe wrote:

my interfaces file is identical and apache starts OK so it 
is probably something else.

in /lib/systemd/system/apache2.target

do you have the "after" bit

   1 [Unit]
   2 Description=The Apache HTTP Server
   3 After=network.target remote-fs.target 
nss-lookup.target




Or looking if "NetworkManager-wait-online.service" is enabled.
For systemd-networkd that is : 
"systemd-networkd-wait-online.service".


https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/ 



If your '/etc/network/interfaces' file is empty with the 
exception of
the 'lo' interface, your interfaces are probably handled by 
an other
"program" and you need to determine which "program" is 
responsible for

your interfaces.


I'm quite cheerful as everything seems to be working but it 
wouldn't

hurt to find out and may assist OP.


Appologies for the confusion, I read your answer and think I 
could add

to it but was not in anycase directed towards you! :)

Yes, my comment was for the OP (taking into account other 
answers he

has sent to the list).


looking at links you posted if I was OP I would probably try adding

After=network-online.target
Wants=network-online.target

to  /lib/systemd/system/apache2.target

and see if apache starts at boot

mick


hello - my Deb 9.4 / Apache 2.4 has no file called 
apache2.target, however there is a 
/lib/systemd/system/apache2.service file:: the contents as follows

Description=The Apache HTTP Server
After=network.target remote-fs.target nss-lookup.target

[Service]
Type=forking
Environment=APACHE_STARTED_BY_SYSTEMD=true
ExecStart=/usr/sbin/apachectl start
ExecStop=/usr/sbin/apachectl stop
ExecReload=/usr/sbin/apachectl graceful
PrivateTmp=true
Restart=on-abort

[Install]
WantedBy=multi-user.target
root@culser:/lib/systemd/system#




Ok -- lets try:

Undo any changes in '/etc/network/interfaces'.

As root:

$ mkdir -p /etc/systemd/apache2.d
$ printf "%s\n%s\n" "After=network-online.target" 
"Wants=network-online.target" > /etc/systemd/apache2.d/boot-args.conf


Then try:

$ systemctl enable NetworkManager-wait-online
$ systemctl reboot

If it is not working:

$ systemctl disable NetworkManager-wait-online.service
$ systemctl enable systemd-networkd-wait-online.service
$ systemctl reboot


Note that the lines starting with a '$' are commands and should be 
entered on one line.


https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/
https://www.freedesktop.org/software/systemd/man/systemd.unit.html



I tried both those options, apache2 does not start at boot.
the contents of /boot-args.conf is as follows:

After=network-online.target
Wants=network-online.target

To check if apache is running after boot i check the 
/var/run/apache2.pid file is present. it is not present.

I also use ps -e | grep apache  and nothing is returned.







After a reboot what output do  you get:

$ systemctl status apache2



after boot or reboot the systemctl cmd prints the following:

● apache2.service - The Apache HTTP Server
    Loaded: loaded (/lib/systemd/system/apache2.service; enabled; 
vendor preset: enabled)
    Active: failed (Result: exit-code) since Sun 2018-07-22 08:55:17 
EDT; 51s ago
   Process: 588 ExecStart=/usr/sbin/apachectl start (code=exited, 
status=1/FAILURE)


Jul 22 08:55:17 culser systemd[1]: Starting The Apache HTTP Server...
Jul 22 08:55:17 culser apachectl[588]: (99)Cannot assign requested 
address: AH00072: make_sock: coul
Jul 22 08:55:17 culser apachectl[588]: no listening sockets 
available, shutting down

Jul 22 08:55:17 culser apachectl[588]: AH00015: Unable to open logs
Jul 22 08:55:17 culser apachectl[588]: Action 'start' failed.
Jul 22 08:55:17 culser apachectl[588]: The Apache error log may have 
more information.
Jul 22 08:55:17 culser systemd[1]: apache2.service: Control process 
exited, code=exited status=1
Jul 22 08:55:17 culser systemd[1]: Failed to start The Apache HTTP 
Server.
Jul 22 08:55:17 culser systemd[1]: apache2.service: Unit entered 
failed state.
Jul 22 08:55:17 culser systemd[1]: apache2.service: Failed with 
result 'exit-code'.






Is it properly starting if you do?:

$ systemctl start apache2
$/usr/sbin/apachectl start

If you get any errors it is most likely that the issue lies in 
Apache's configuration.



John,

After boot - systemctl start apache2, gets no errors.
ps -e shows apache2 is running.
/var/run/apache.pid is present.

systemctl status apache2 produces the following:

● apache2.service - The Apache HTTP Server
   Loaded: loaded (/lib/systemd/system/apache2.service; enabled; 

Re: apache not running at boot

2018-07-22 Thread john doe

On 7/22/2018 2:57 PM, Dave wrote:



On 07/22/2018 02:14 AM, john doe wrote:

On 7/21/2018 11:22 PM, Dave wrote:



On 07/21/2018 11:38 AM, john doe wrote:

On 7/21/2018 3:46 PM, Dave wrote:



On 07/21/2018 08:42 AM, mick crane wrote:

On 2018-07-21 13:00, john doe wrote:

On 7/21/2018 11:21 AM, mick crane wrote:

On 2018-07-21 09:56, mick crane wrote:

On 2018-07-21 09:39, john doe wrote:

my interfaces file is identical and apache starts OK so it is 
probably something else.

in /lib/systemd/system/apache2.target

do you have the "after" bit

   1 [Unit]
   2 Description=The Apache HTTP Server
   3 After=network.target remote-fs.target nss-lookup.target



Or looking if "NetworkManager-wait-online.service" is enabled.
For systemd-networkd that is : 
"systemd-networkd-wait-online.service".


https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/

If your '/etc/network/interfaces' file is empty with the 
exception of
the 'lo' interface, your interfaces are probably handled by an 
other
"program" and you need to determine which "program" is 
responsible for

your interfaces.


I'm quite cheerful as everything seems to be working but it 
wouldn't

hurt to find out and may assist OP.


Appologies for the confusion, I read your answer and think I 
could add

to it but was not in anycase directed towards you! :)

Yes, my comment was for the OP (taking into account other answers he
has sent to the list).


looking at links you posted if I was OP I would probably try adding

After=network-online.target
Wants=network-online.target

to  /lib/systemd/system/apache2.target

and see if apache starts at boot

mick


hello - my Deb 9.4 / Apache 2.4 has no file called apache2.target, 
however there is a /lib/systemd/system/apache2.service file:: the 
contents as follows

Description=The Apache HTTP Server
After=network.target remote-fs.target nss-lookup.target

[Service]
Type=forking
Environment=APACHE_STARTED_BY_SYSTEMD=true
ExecStart=/usr/sbin/apachectl start
ExecStop=/usr/sbin/apachectl stop
ExecReload=/usr/sbin/apachectl graceful
PrivateTmp=true
Restart=on-abort

[Install]
WantedBy=multi-user.target
root@culser:/lib/systemd/system#




Ok -- lets try:

Undo any changes in '/etc/network/interfaces'.

As root:

$ mkdir -p /etc/systemd/apache2.d
$ printf "%s\n%s\n" "After=network-online.target" 
"Wants=network-online.target" > /etc/systemd/apache2.d/boot-args.conf


Then try:

$ systemctl enable NetworkManager-wait-online
$ systemctl reboot

If it is not working:

$ systemctl disable NetworkManager-wait-online.service
$ systemctl enable systemd-networkd-wait-online.service
$ systemctl reboot


Note that the lines starting with a '$' are commands and should be 
entered on one line.


https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/
https://www.freedesktop.org/software/systemd/man/systemd.unit.html



I tried both those options, apache2 does not start at boot.
the contents of /boot-args.conf is as follows:

After=network-online.target
Wants=network-online.target

To check if apache is running after boot i check the 
/var/run/apache2.pid file is present. it is not present.

I also use ps -e | grep apache  and nothing is returned.







After a reboot what output do  you get:

$ systemctl status apache2



after boot or reboot the systemctl cmd prints the following:

● apache2.service - The Apache HTTP Server
    Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor 
preset: enabled)
    Active: failed (Result: exit-code) since Sun 2018-07-22 08:55:17 
EDT; 51s ago
   Process: 588 ExecStart=/usr/sbin/apachectl start (code=exited, 
status=1/FAILURE)


Jul 22 08:55:17 culser systemd[1]: Starting The Apache HTTP Server...
Jul 22 08:55:17 culser apachectl[588]: (99)Cannot assign requested 
address: AH00072: make_sock: coul
Jul 22 08:55:17 culser apachectl[588]: no listening sockets available, 
shutting down

Jul 22 08:55:17 culser apachectl[588]: AH00015: Unable to open logs
Jul 22 08:55:17 culser apachectl[588]: Action 'start' failed.
Jul 22 08:55:17 culser apachectl[588]: The Apache error log may have 
more information.
Jul 22 08:55:17 culser systemd[1]: apache2.service: Control process 
exited, code=exited status=1

Jul 22 08:55:17 culser systemd[1]: Failed to start The Apache HTTP Server.
Jul 22 08:55:17 culser systemd[1]: apache2.service: Unit entered failed 
state.
Jul 22 08:55:17 culser systemd[1]: apache2.service: Failed with result 
'exit-code'.






Is it properly starting if you do?:

$ systemctl start apache2
$/usr/sbin/apachectl start

If you get any errors it is most likely that the issue lies in Apache's 
configuration.


--
John Doe



Re: apache not running at boot

2018-07-22 Thread Dave



On 07/22/2018 02:14 AM, john doe wrote:

On 7/21/2018 11:22 PM, Dave wrote:



On 07/21/2018 11:38 AM, john doe wrote:

On 7/21/2018 3:46 PM, Dave wrote:



On 07/21/2018 08:42 AM, mick crane wrote:

On 2018-07-21 13:00, john doe wrote:

On 7/21/2018 11:21 AM, mick crane wrote:

On 2018-07-21 09:56, mick crane wrote:

On 2018-07-21 09:39, john doe wrote:

my interfaces file is identical and apache starts OK so it is 
probably something else.

in /lib/systemd/system/apache2.target

do you have the "after" bit

   1 [Unit]
   2 Description=The Apache HTTP Server
   3 After=network.target remote-fs.target nss-lookup.target



Or looking if "NetworkManager-wait-online.service" is enabled.
For systemd-networkd that is : 
"systemd-networkd-wait-online.service".


https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/

If your '/etc/network/interfaces' file is empty with the 
exception of
the 'lo' interface, your interfaces are probably handled by an 
other
"program" and you need to determine which "program" is 
responsible for

your interfaces.


I'm quite cheerful as everything seems to be working but it 
wouldn't

hurt to find out and may assist OP.


Appologies for the confusion, I read your answer and think I 
could add

to it but was not in anycase directed towards you! :)

Yes, my comment was for the OP (taking into account other answers he
has sent to the list).


looking at links you posted if I was OP I would probably try adding

After=network-online.target
Wants=network-online.target

to  /lib/systemd/system/apache2.target

and see if apache starts at boot

mick


hello - my Deb 9.4 / Apache 2.4 has no file called apache2.target, 
however there is a /lib/systemd/system/apache2.service file:: the 
contents as follows

Description=The Apache HTTP Server
After=network.target remote-fs.target nss-lookup.target

[Service]
Type=forking
Environment=APACHE_STARTED_BY_SYSTEMD=true
ExecStart=/usr/sbin/apachectl start
ExecStop=/usr/sbin/apachectl stop
ExecReload=/usr/sbin/apachectl graceful
PrivateTmp=true
Restart=on-abort

[Install]
WantedBy=multi-user.target
root@culser:/lib/systemd/system#




Ok -- lets try:

Undo any changes in '/etc/network/interfaces'.

As root:

$ mkdir -p /etc/systemd/apache2.d
$ printf "%s\n%s\n" "After=network-online.target" 
"Wants=network-online.target" > /etc/systemd/apache2.d/boot-args.conf


Then try:

$ systemctl enable NetworkManager-wait-online
$ systemctl reboot

If it is not working:

$ systemctl disable NetworkManager-wait-online.service
$ systemctl enable systemd-networkd-wait-online.service
$ systemctl reboot


Note that the lines starting with a '$' are commands and should be 
entered on one line.


https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/
https://www.freedesktop.org/software/systemd/man/systemd.unit.html



I tried both those options, apache2 does not start at boot.
the contents of /boot-args.conf is as follows:

After=network-online.target
Wants=network-online.target

To check if apache is running after boot i check the 
/var/run/apache2.pid file is present. it is not present.

I also use ps -e | grep apache  and nothing is returned.







After a reboot what output do  you get:

$ systemctl status apache2



after boot or reboot the systemctl cmd prints the following:

● apache2.service - The Apache HTTP Server
   Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor 
preset: enabled)
   Active: failed (Result: exit-code) since Sun 2018-07-22 08:55:17 
EDT; 51s ago
  Process: 588 ExecStart=/usr/sbin/apachectl start (code=exited, 
status=1/FAILURE)


Jul 22 08:55:17 culser systemd[1]: Starting The Apache HTTP Server...
Jul 22 08:55:17 culser apachectl[588]: (99)Cannot assign requested 
address: AH00072: make_sock: coul
Jul 22 08:55:17 culser apachectl[588]: no listening sockets available, 
shutting down

Jul 22 08:55:17 culser apachectl[588]: AH00015: Unable to open logs
Jul 22 08:55:17 culser apachectl[588]: Action 'start' failed.
Jul 22 08:55:17 culser apachectl[588]: The Apache error log may have 
more information.
Jul 22 08:55:17 culser systemd[1]: apache2.service: Control process 
exited, code=exited status=1

Jul 22 08:55:17 culser systemd[1]: Failed to start The Apache HTTP Server.
Jul 22 08:55:17 culser systemd[1]: apache2.service: Unit entered failed 
state.
Jul 22 08:55:17 culser systemd[1]: apache2.service: Failed with result 
'exit-code'.





Re: apache not running at boot

2018-07-22 Thread john doe

On 7/21/2018 11:22 PM, Dave wrote:



On 07/21/2018 11:38 AM, john doe wrote:

On 7/21/2018 3:46 PM, Dave wrote:



On 07/21/2018 08:42 AM, mick crane wrote:

On 2018-07-21 13:00, john doe wrote:

On 7/21/2018 11:21 AM, mick crane wrote:

On 2018-07-21 09:56, mick crane wrote:

On 2018-07-21 09:39, john doe wrote:

my interfaces file is identical and apache starts OK so it is 
probably something else.

in /lib/systemd/system/apache2.target

do you have the "after" bit

   1 [Unit]
   2 Description=The Apache HTTP Server
   3 After=network.target remote-fs.target nss-lookup.target



Or looking if "NetworkManager-wait-online.service" is enabled.
For systemd-networkd that is : 
"systemd-networkd-wait-online.service".


https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/

If your '/etc/network/interfaces' file is empty with the 
exception of
the 'lo' interface, your interfaces are probably handled by an 
other
"program" and you need to determine which "program" is 
responsible for

your interfaces.


I'm quite cheerful as everything seems to be working but it wouldn't
hurt to find out and may assist OP.


Appologies for the confusion, I read your answer and think I could add
to it but was not in anycase directed towards you! :)

Yes, my comment was for the OP (taking into account other answers he
has sent to the list).


looking at links you posted if I was OP I would probably try adding

After=network-online.target
Wants=network-online.target

to  /lib/systemd/system/apache2.target

and see if apache starts at boot

mick


hello - my Deb 9.4 / Apache 2.4 has no file called apache2.target, 
however there is a /lib/systemd/system/apache2.service file:: the 
contents as follows

Description=The Apache HTTP Server
After=network.target remote-fs.target nss-lookup.target

[Service]
Type=forking
Environment=APACHE_STARTED_BY_SYSTEMD=true
ExecStart=/usr/sbin/apachectl start
ExecStop=/usr/sbin/apachectl stop
ExecReload=/usr/sbin/apachectl graceful
PrivateTmp=true
Restart=on-abort

[Install]
WantedBy=multi-user.target
root@culser:/lib/systemd/system#




Ok -- lets try:

Undo any changes in '/etc/network/interfaces'.

As root:

$ mkdir -p /etc/systemd/apache2.d
$ printf "%s\n%s\n" "After=network-online.target" 
"Wants=network-online.target" > /etc/systemd/apache2.d/boot-args.conf


Then try:

$ systemctl enable NetworkManager-wait-online
$ systemctl reboot

If it is not working:

$ systemctl disable NetworkManager-wait-online.service
$ systemctl enable systemd-networkd-wait-online.service
$ systemctl reboot


Note that the lines starting with a '$' are commands and should be 
entered on one line.


https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/
https://www.freedesktop.org/software/systemd/man/systemd.unit.html



I tried both those options, apache2 does not start at boot.
the contents of /boot-args.conf is as follows:

After=network-online.target
Wants=network-online.target

To check if apache is running after boot i check the 
/var/run/apache2.pid file is present. it is not present.

I also use ps -e | grep apache  and nothing is returned.







After a reboot what output do  you get:

$ systemctl status apache2

--
John Doe



Re: apache not running at boot

2018-07-21 Thread Dave



On 07/21/2018 11:38 AM, john doe wrote:

On 7/21/2018 3:46 PM, Dave wrote:



On 07/21/2018 08:42 AM, mick crane wrote:

On 2018-07-21 13:00, john doe wrote:

On 7/21/2018 11:21 AM, mick crane wrote:

On 2018-07-21 09:56, mick crane wrote:

On 2018-07-21 09:39, john doe wrote:

my interfaces file is identical and apache starts OK so it is 
probably something else.

in /lib/systemd/system/apache2.target

do you have the "after" bit

   1 [Unit]
   2 Description=The Apache HTTP Server
   3 After=network.target remote-fs.target nss-lookup.target



Or looking if "NetworkManager-wait-online.service" is enabled.
For systemd-networkd that is : 
"systemd-networkd-wait-online.service".


https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/

If your '/etc/network/interfaces' file is empty with the 
exception of
the 'lo' interface, your interfaces are probably handled by an 
other
"program" and you need to determine which "program" is 
responsible for

your interfaces.


I'm quite cheerful as everything seems to be working but it wouldn't
hurt to find out and may assist OP.


Appologies for the confusion, I read your answer and think I could add
to it but was not in anycase directed towards you! :)

Yes, my comment was for the OP (taking into account other answers he
has sent to the list).


looking at links you posted if I was OP I would probably try adding

After=network-online.target
Wants=network-online.target

to  /lib/systemd/system/apache2.target

and see if apache starts at boot

mick


hello - my Deb 9.4 / Apache 2.4 has no file called apache2.target, 
however there is a /lib/systemd/system/apache2.service file:: the 
contents as follows

Description=The Apache HTTP Server
After=network.target remote-fs.target nss-lookup.target

[Service]
Type=forking
Environment=APACHE_STARTED_BY_SYSTEMD=true
ExecStart=/usr/sbin/apachectl start
ExecStop=/usr/sbin/apachectl stop
ExecReload=/usr/sbin/apachectl graceful
PrivateTmp=true
Restart=on-abort

[Install]
WantedBy=multi-user.target
root@culser:/lib/systemd/system#




Ok -- lets try:

Undo any changes in '/etc/network/interfaces'.

As root:

$ mkdir -p /etc/systemd/apache2.d
$ printf "%s\n%s\n" "After=network-online.target" 
"Wants=network-online.target" > /etc/systemd/apache2.d/boot-args.conf


Then try:

$ systemctl enable NetworkManager-wait-online
$ systemctl reboot

If it is not working:

$ systemctl disable NetworkManager-wait-online.service
$ systemctl enable systemd-networkd-wait-online.service
$ systemctl reboot


Note that the lines starting with a '$' are commands and should be 
entered on one line.


https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/
https://www.freedesktop.org/software/systemd/man/systemd.unit.html



I tried both those options, apache2 does not start at boot.
the contents of /boot-args.conf is as follows:

After=network-online.target
Wants=network-online.target

To check if apache is running after boot i check the 
/var/run/apache2.pid file is present. it is not present.

I also use ps -e | grep apache  and nothing is returned.






Re: apache not running at boot

2018-07-21 Thread Dave



On 07/21/2018 11:43 AM, Curt wrote:

On 2018-07-21, Dave  wrote:


i added "eth0"
i added the "iface eth0 inet dhcp"
rebooted
and apache2 is still not starting on boot.



What about Otto (I mean auto)? Or is this an inadvertent omission in
your post and not in your /e/n/i?

  auto eth0
  iface eth0 inet dhcp

would correspond to the man page (but not exactly the
wiki--https://wiki.debian.org/NetworkConfiguration--which appears
to suggest *both* 'auto eth0' and 'allow-hotplug eth0' for those 'just'
using DHCP but whatever, nothing is ever clear, and the cats get skinned
all over the place and any which way).

But then I thought the conclusion was your network was being brought
up/configured by other means than /e/n/i (yet to be discovered or
divulged).


/etc/network/interfaces  the current and default installed is as follows:

# This file describes the network interfaces available on your system # 
and how to activate them. For more information, see interfaces(5). 
source /etc/network/interfaces.d/* # The loopback network interface auto 
lo eth0 iface lo inet loopback iface eth0 inet dhcp




Re: apache not running at boot

2018-07-21 Thread Curt
On 2018-07-21, Dave  wrote:
>
>
> i added "eth0"
> i added the "iface eth0 inet dhcp"
> rebooted
> and apache2 is still not starting on boot.
>
>

What about Otto (I mean auto)? Or is this an inadvertent omission in
your post and not in your /e/n/i?

 auto eth0
 iface eth0 inet dhcp

would correspond to the man page (but not exactly the
wiki--https://wiki.debian.org/NetworkConfiguration--which appears
to suggest *both* 'auto eth0' and 'allow-hotplug eth0' for those 'just'
using DHCP but whatever, nothing is ever clear, and the cats get skinned
all over the place and any which way).

But then I thought the conclusion was your network was being brought
up/configured by other means than /e/n/i (yet to be discovered or
divulged).

-- 
Boris sober and Boris drunk are such different people, they’ve never even met. 
-- Sergei Dovlatov, Pushkin Hills



Re: apache not running at boot

2018-07-21 Thread john doe

On 7/21/2018 3:46 PM, Dave wrote:



On 07/21/2018 08:42 AM, mick crane wrote:

On 2018-07-21 13:00, john doe wrote:

On 7/21/2018 11:21 AM, mick crane wrote:

On 2018-07-21 09:56, mick crane wrote:

On 2018-07-21 09:39, john doe wrote:

my interfaces file is identical and apache starts OK so it is 
probably something else.

in /lib/systemd/system/apache2.target

do you have the "after" bit

   1 [Unit]
   2 Description=The Apache HTTP Server
   3 After=network.target remote-fs.target nss-lookup.target



Or looking if "NetworkManager-wait-online.service" is enabled.
For systemd-networkd that is : 
"systemd-networkd-wait-online.service".


https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/

If your '/etc/network/interfaces' file is empty with the exception of
the 'lo' interface, your interfaces are probably handled by an other
"program" and you need to determine which "program" is responsible 
for

your interfaces.


I'm quite cheerful as everything seems to be working but it wouldn't
hurt to find out and may assist OP.


Appologies for the confusion, I read your answer and think I could add
to it but was not in anycase directed towards you! :)

Yes, my comment was for the OP (taking into account other answers he
has sent to the list).


looking at links you posted if I was OP I would probably try adding

After=network-online.target
Wants=network-online.target

to  /lib/systemd/system/apache2.target

and see if apache starts at boot

mick


hello - my Deb 9.4 / Apache 2.4 has no file called apache2.target, 
however there is a /lib/systemd/system/apache2.service file:: the 
contents as follows

Description=The Apache HTTP Server
After=network.target remote-fs.target nss-lookup.target

[Service]
Type=forking
Environment=APACHE_STARTED_BY_SYSTEMD=true
ExecStart=/usr/sbin/apachectl start
ExecStop=/usr/sbin/apachectl stop
ExecReload=/usr/sbin/apachectl graceful
PrivateTmp=true
Restart=on-abort

[Install]
WantedBy=multi-user.target
root@culser:/lib/systemd/system#




Ok -- lets try:

Undo any changes in '/etc/network/interfaces'.

As root:

$ mkdir -p /etc/systemd/apache2.d
$ printf "%s\n%s\n" "After=network-online.target" 
"Wants=network-online.target" > /etc/systemd/apache2.d/boot-args.conf


Then try:

$ systemctl enable NetworkManager-wait-online
$ systemctl reboot

If it is not working:

$ systemctl disable NetworkManager-wait-online.service
$ systemctl enable systemd-networkd-wait-online.service
$ systemctl reboot


Note that the lines starting with a '$' are commands and should be 
entered on one line.


https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/
https://www.freedesktop.org/software/systemd/man/systemd.unit.html

--
John Doe



Re: apache not running at boot

2018-07-21 Thread mick crane

On 2018-07-21 14:46, Dave wrote:

On 07/21/2018 08:42 AM, mick crane wrote:


On 2018-07-21 13:00, john doe wrote:
On 7/21/2018 11:21 AM, mick crane wrote:
On 2018-07-21 09:56, mick crane wrote:
On 2018-07-21 09:39, john doe wrote:

my interfaces file is identical and apache starts OK so it is
probably something else.
in /lib/systemd/system/apache2.target

do you have the "after" bit

1 [Unit]
2 Description=The Apache HTTP Server
3 After=network.target remote-fs.target nss-lookup.target

Or looking if "NetworkManager-wait-online.service" is enabled.
For systemd-networkd that is :
"systemd-networkd-wait-online.service".

https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/

If your '/etc/network/interfaces' file is empty with the exception
of
the 'lo' interface, your interfaces are probably handled by an other

"program" and you need to determine which "program" is responsible
for
your interfaces.


I'm quite cheerful as everything seems to be working but it wouldn't
hurt to find out and may assist OP.

Appologies for the confusion, I read your answer and think I could add

to it but was not in anycase directed towards you! :)

Yes, my comment was for the OP (taking into account other answers he
has sent to the list).

looking at links you posted if I was OP I would probably try adding

After=network-online.target
Wants=network-online.target

to  /lib/systemd/system/apache2.target

and see if apache starts at boot

mick

hello - my Deb 9.4 / Apache 2.4 has no file called apache2.target,
however there is a /lib/systemd/system/apache2.service file:: the
contents as follows
Description=The Apache HTTP Server
After=network.target remote-fs.target nss-lookup.target


sorry my bad

mick

--
Key ID4BFEBB31



Re: apache not running at boot

2018-07-21 Thread Dave




On 07/21/2018 12:40 AM, メット wrote:


On 2018年7月21日 12:53:32 JST, Dave  wrote:


On 07/19/2018 06:57 PM, Dave wrote:

On 7/19/18 4:27 AM, Curt wrote:

On 2018-07-19, Dave  wrote:

after boot apache is not running,
if i run systemctl status apache2, i get the address bind error
shown above

at the command line after boot if i run apache2 -k restart, no

errors.

after boot if i start apache2 via /etc/init.d/apache2 start or
/usr/sbin/apache2ctl start
then - systemctl does not get the error.

/var/log/apache2 the error.log is "0" bytes

how may i start apache2 at boot with out the error.


Does this not confirm or at least support Greg W.'s hypothesis?

Did you try changing "allow-hotplug" to "auto" in your
/etc/network/interfaces file as he suggested?


Oh no - i did not change the /etc/network/interfaces file. i missed
that suggestion... I will try it.



hello .. the contents of the /etc/network/interfaces file seems to
already be set to "auto"

# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

Hi
only ur loopback interface is here
u need one more line and one more word:

auto lo eth0
iface lo inet loopback
iface eth0 inet dhcp

hth

ps:studying a little the fine manual
wouldn't hurt
ps2:i suppose u re under dhcp




i added "eth0"
i added the "iface eth0 inet dhcp"
rebooted
and apache2 is still not starting on boot.



Re: apache not running at boot

2018-07-21 Thread Dave



On 07/21/2018 08:42 AM, mick crane wrote:

On 2018-07-21 13:00, john doe wrote:

On 7/21/2018 11:21 AM, mick crane wrote:

On 2018-07-21 09:56, mick crane wrote:

On 2018-07-21 09:39, john doe wrote:

my interfaces file is identical and apache starts OK so it is 
probably something else.

in /lib/systemd/system/apache2.target

do you have the "after" bit

   1 [Unit]
   2 Description=The Apache HTTP Server
   3 After=network.target remote-fs.target nss-lookup.target



Or looking if "NetworkManager-wait-online.service" is enabled.
For systemd-networkd that is : 
"systemd-networkd-wait-online.service".


https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/

If your '/etc/network/interfaces' file is empty with the exception of
the 'lo' interface, your interfaces are probably handled by an other
"program" and you need to determine which "program" is responsible 
for

your interfaces.


I'm quite cheerful as everything seems to be working but it wouldn't
hurt to find out and may assist OP.


Appologies for the confusion, I read your answer and think I could add
to it but was not in anycase directed towards you! :)

Yes, my comment was for the OP (taking into account other answers he
has sent to the list).


looking at links you posted if I was OP I would probably try adding

After=network-online.target
Wants=network-online.target

to  /lib/systemd/system/apache2.target

and see if apache starts at boot

mick


hello - my Deb 9.4 / Apache 2.4 has no file called apache2.target, 
however there is a /lib/systemd/system/apache2.service file:: the 
contents as follows

Description=The Apache HTTP Server
After=network.target remote-fs.target nss-lookup.target

[Service]
Type=forking
Environment=APACHE_STARTED_BY_SYSTEMD=true
ExecStart=/usr/sbin/apachectl start
ExecStop=/usr/sbin/apachectl stop
ExecReload=/usr/sbin/apachectl graceful
PrivateTmp=true
Restart=on-abort

[Install]
WantedBy=multi-user.target
root@culser:/lib/systemd/system#



Re: apache not running at boot

2018-07-21 Thread mick crane

On 2018-07-21 13:00, john doe wrote:

On 7/21/2018 11:21 AM, mick crane wrote:

On 2018-07-21 09:56, mick crane wrote:

On 2018-07-21 09:39, john doe wrote:

my interfaces file is identical and apache starts OK so it is 
probably something else.

in /lib/systemd/system/apache2.target

do you have the "after" bit

   1 [Unit]
   2 Description=The Apache HTTP Server
   3 After=network.target remote-fs.target nss-lookup.target



Or looking if "NetworkManager-wait-online.service" is enabled.
For systemd-networkd that is : 
"systemd-networkd-wait-online.service".


https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/

If your '/etc/network/interfaces' file is empty with the exception 
of

the 'lo' interface, your interfaces are probably handled by an other
"program" and you need to determine which "program" is responsible 
for

your interfaces.


I'm quite cheerful as everything seems to be working but it wouldn't
hurt to find out and may assist OP.


Appologies for the confusion, I read your answer and think I could add
to it but was not in anycase directed towards you! :)

Yes, my comment was for the OP (taking into account other answers he
has sent to the list).


looking at links you posted if I was OP I would probably try adding

After=network-online.target
Wants=network-online.target

to  /lib/systemd/system/apache2.target

and see if apache starts at boot

mick
--
Key ID4BFEBB31



Re: apache not running at boot

2018-07-21 Thread john doe

On 7/21/2018 11:21 AM, mick crane wrote:

On 2018-07-21 09:56, mick crane wrote:

On 2018-07-21 09:39, john doe wrote:

my interfaces file is identical and apache starts OK so it is 
probably something else.

in /lib/systemd/system/apache2.target

do you have the "after" bit

   1 [Unit]
   2 Description=The Apache HTTP Server
   3 After=network.target remote-fs.target nss-lookup.target



Or looking if "NetworkManager-wait-online.service" is enabled.
For systemd-networkd that is : "systemd-networkd-wait-online.service".

https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/

If your '/etc/network/interfaces' file is empty with the exception of
the 'lo' interface, your interfaces are probably handled by an other
"program" and you need to determine which "program" is responsible for
your interfaces.


I'm quite cheerful as everything seems to be working but it wouldn't
hurt to find out and may assist OP.


Appologies for the confusion, I read your answer and think I could add 
to it but was not in anycase directed towards you! :)


Yes, my comment was for the OP (taking into account other answers he has 
sent to the list).



Can you give clue where to look ?
Not knowing much about systemd




The service 'systemd-networkd' looks among other directories in 
'/etc/systemd/network'.


https://www.freedesktop.org/software/systemd/man/systemd-networkd.service.html


One hint to determine how your interfaces are configured could be to 
look at the top of the file '/etc/resolv.conf'. If you have some comment 
lines there, those comments might indicate which "PRG" is handeling your 
INTs.
Also, has said above, if your '/etc/network/interfaces' only contains 
the 'lo' interface you can probably eliminate dhclient for configuring 
your DHCP interface.



just quickly looking

/etc/default/networking
seems that the default is to wait for all interfaces ?



As far as I understand it, '/etc/default/networking' is only useful at 
boot or when executing '/etc/init.d/networking' (systemd way: $ 
systemctl ... networking.service).


--
John Doe



Re: apache not running at boot

2018-07-21 Thread mick crane

On 2018-07-21 09:56, mick crane wrote:

On 2018-07-21 09:39, john doe wrote:

my interfaces file is identical and apache starts OK so it is 
probably something else.

in /lib/systemd/system/apache2.target

do you have the "after" bit

   1 [Unit]
   2 Description=The Apache HTTP Server
   3 After=network.target remote-fs.target nss-lookup.target



Or looking if "NetworkManager-wait-online.service" is enabled.
For systemd-networkd that is : "systemd-networkd-wait-online.service".

https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/

If your '/etc/network/interfaces' file is empty with the exception of
the 'lo' interface, your interfaces are probably handled by an other
"program" and you need to determine which "program" is responsible for
your interfaces.


I'm quite cheerful as everything seems to be working but it wouldn't
hurt to find out and may assist OP.
Can you give clue where to look ?
Not knowing much about systemd


just quickly looking

/etc/default/networking
seems that the default is to wait for all interfaces ?

 21 # Which interface to wait for.
 22 # If none given, wait for all auto interfaces, or if there are 
none,

 23 # wait for at least one hotplug interface.
 24 #WAIT_ONLINE_IFACE=


mick




--
Key ID4BFEBB31



Re: apache not running at boot

2018-07-21 Thread mick crane

On 2018-07-21 09:39, john doe wrote:

my interfaces file is identical and apache starts OK so it is probably 
something else.

in /lib/systemd/system/apache2.target

do you have the "after" bit

   1 [Unit]
   2 Description=The Apache HTTP Server
   3 After=network.target remote-fs.target nss-lookup.target



Or looking if "NetworkManager-wait-online.service" is enabled.
For systemd-networkd that is : "systemd-networkd-wait-online.service".

https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/

If your '/etc/network/interfaces' file is empty with the exception of
the 'lo' interface, your interfaces are probably handled by an other
"program" and you need to determine which "program" is responsible for
your interfaces.


I'm quite cheerful as everything seems to be working but it wouldn't 
hurt to find out and may assist OP.

Can you give clue where to look ?
Not knowing much about systemd

mick



--
Key ID4BFEBB31



Re: apache not running at boot

2018-07-21 Thread john doe

On 7/21/2018 8:59 AM, mick crane wrote:

On 2018-07-21 05:40, メット wrote:

On 2018年7月21日 12:53:32 JST, Dave  wrote:



On 07/19/2018 06:57 PM, Dave wrote:


On 7/19/18 4:27 AM, Curt wrote:

On 2018-07-19, Dave  wrote:

after boot apache is not running,
if i run systemctl status apache2, i get the address bind error
shown above

at the command line after boot if i run apache2 -k restart, no

errors.


after boot if i start apache2 via /etc/init.d/apache2 start or
/usr/sbin/apache2ctl start
then - systemctl does not get the error.

/var/log/apache2 the error.log is "0" bytes

how may i start apache2 at boot with out the error.


Does this not confirm or at least support Greg W.'s hypothesis?

Did you try changing "allow-hotplug" to "auto" in your
/etc/network/interfaces file as he suggested?


Oh no - i did not change the /etc/network/interfaces file. i missed
that suggestion... I will try it.



hello .. the contents of the /etc/network/interfaces file seems to
already be set to "auto"

# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback


my interfaces file is identical and apache starts OK so it is probably 
something else.

in /lib/systemd/system/apache2.target

do you have the "after" bit

   1 [Unit]
   2 Description=The Apache HTTP Server
   3 After=network.target remote-fs.target nss-lookup.target



Or looking if "NetworkManager-wait-online.service" is enabled.
For systemd-networkd that is : "systemd-networkd-wait-online.service".

https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/

If your '/etc/network/interfaces' file is empty with the exception of 
the 'lo' interface, your interfaces are probably handled by an other 
"program" and you need to determine which "program" is responsible for 
your interfaces.


--
John Doe



Re: apache not running at boot

2018-07-21 Thread mick crane

On 2018-07-21 05:40, メット wrote:

On 2018年7月21日 12:53:32 JST, Dave  wrote:



On 07/19/2018 06:57 PM, Dave wrote:


On 7/19/18 4:27 AM, Curt wrote:

On 2018-07-19, Dave  wrote:

after boot apache is not running,
if i run systemctl status apache2, i get the address bind error
shown above

at the command line after boot if i run apache2 -k restart, no

errors.


after boot if i start apache2 via /etc/init.d/apache2 start or
/usr/sbin/apache2ctl start
then - systemctl does not get the error.

/var/log/apache2 the error.log is "0" bytes

how may i start apache2 at boot with out the error.


Does this not confirm or at least support Greg W.'s hypothesis?

Did you try changing "allow-hotplug" to "auto" in your
/etc/network/interfaces file as he suggested?


Oh no - i did not change the /etc/network/interfaces file. i missed
that suggestion... I will try it.



hello .. the contents of the /etc/network/interfaces file seems to
already be set to "auto"

# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback


my interfaces file is identical and apache starts OK so it is probably 
something else.

in /lib/systemd/system/apache2.target

do you have the "after" bit

  1 [Unit]
  2 Description=The Apache HTTP Server
  3 After=network.target remote-fs.target nss-lookup.target

mick



Hi
only ur loopback interface is here
u need one more line and one more word:

auto lo eth0
iface lo inet loopback
iface eth0 inet dhcp

hth

ps:studying a little the fine manual
wouldn't hurt
ps2:i suppose u re under dhcp


--
Key ID4BFEBB31



Re: apache not running at boot

2018-07-20 Thread メット



On 2018年7月21日 12:53:32 JST, Dave  wrote:
>
>
>On 07/19/2018 06:57 PM, Dave wrote:
>>
>> On 7/19/18 4:27 AM, Curt wrote:
>>> On 2018-07-19, Dave  wrote:
 after boot apache is not running,
 if i run systemctl status apache2, i get the address bind error 
 shown above

 at the command line after boot if i run apache2 -k restart, no
>errors.

 after boot if i start apache2 via /etc/init.d/apache2 start or
 /usr/sbin/apache2ctl start
 then - systemctl does not get the error.

 /var/log/apache2 the error.log is "0" bytes

 how may i start apache2 at boot with out the error.

>>> Does this not confirm or at least support Greg W.'s hypothesis?
>>>
>>> Did you try changing "allow-hotplug" to "auto" in your
>>> /etc/network/interfaces file as he suggested?
>>>
>> Oh no - i did not change the /etc/network/interfaces file. i missed 
>> that suggestion... I will try it.
>>
>>
>hello .. the contents of the /etc/network/interfaces file seems to 
>already be set to "auto"
>
># and how to activate them. For more information, see interfaces(5).
>
>source /etc/network/interfaces.d/*
>
># The loopback network interface
>auto lo
>iface lo inet loopback

Hi
only ur loopback interface is here
u need one more line and one more word:

auto lo eth0
iface lo inet loopback
iface eth0 inet dhcp

hth

ps:studying a little the fine manual
wouldn't hurt 
ps2:i suppose u re under dhcp



Re: apache not running at boot

2018-07-20 Thread Dave



On 07/19/2018 06:57 PM, Dave wrote:


On 7/19/18 4:27 AM, Curt wrote:

On 2018-07-19, Dave  wrote:

after boot apache is not running,
if i run systemctl status apache2, i get the address bind error 
shown above


at the command line after boot if i run apache2 -k restart, no errors.

after boot if i start apache2 via /etc/init.d/apache2 start or
/usr/sbin/apache2ctl start
then - systemctl does not get the error.

/var/log/apache2 the error.log is "0" bytes

how may i start apache2 at boot with out the error.


Does this not confirm or at least support Greg W.'s hypothesis?

Did you try changing "allow-hotplug" to "auto" in your
/etc/network/interfaces file as he suggested?

Oh no - i did not change the /etc/network/interfaces file. i missed 
that suggestion... I will try it.



hello .. the contents of the /etc/network/interfaces file seems to 
already be set to "auto"


# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback




Re: apache not running at boot

2018-07-20 Thread john doe

On 7/20/2018 12:58 AM, Dave wrote:



On 7/19/18 5:24 AM, john doe wrote:

On 7/19/2018 10:27 AM, Curt wrote:

On 2018-07-19, Dave  wrote:


after boot apache is not running,
if i run systemctl status apache2, i get the address bind error 
shown above


at the command line after boot if i run apache2 -k restart, no errors.

after boot if i start apache2 via /etc/init.d/apache2 start or
/usr/sbin/apache2ctl start
then - systemctl does not get the error.

/var/log/apache2 the error.log is "0" bytes

how may i start apache2 at boot with out the error.



Does this not confirm or at least support Greg W.'s hypothesis?

Did you try changing "allow-hotplug" to "auto" in your
/etc/network/interfaces file as he suggested?



Or, how are you configuring your interface (NM, systemd-networkd, ...)?

I have no idea what NM is ... can you provide a path to a configuration 
file? i will reply with it's contents.


Then this answer should be your first step:

https://lists.debian.org/debian-user/2018/07/msg00735.html

--
John Doe



Re: apache not running at boot

2018-07-19 Thread Dave



On 7/19/18 4:27 AM, Curt wrote:

On 2018-07-19, Dave  wrote:

after boot apache is not running,
if i run systemctl status apache2, i get the address bind error shown above

at the command line after boot if i run apache2 -k restart, no errors.

after boot if i start apache2 via /etc/init.d/apache2 start or
/usr/sbin/apache2ctl start
then - systemctl does not get the error.

/var/log/apache2 the error.log is "0" bytes

how may i start apache2 at boot with out the error.


Does this not confirm or at least support Greg W.'s hypothesis?

Did you try changing "allow-hotplug" to "auto" in your
/etc/network/interfaces file as he suggested?

Oh no - i did not change the /etc/network/interfaces file. i missed that 
suggestion... I will try it.




Re: apache not running at boot

2018-07-19 Thread john doe

On 7/19/2018 10:27 AM, Curt wrote:

On 2018-07-19, Dave  wrote:


after boot apache is not running,
if i run systemctl status apache2, i get the address bind error shown above

at the command line after boot if i run apache2 -k restart, no errors.

after boot if i start apache2 via /etc/init.d/apache2 start or
/usr/sbin/apache2ctl start
then - systemctl does not get the error.

/var/log/apache2 the error.log is "0" bytes

how may i start apache2 at boot with out the error.



Does this not confirm or at least support Greg W.'s hypothesis?

Did you try changing "allow-hotplug" to "auto" in your
/etc/network/interfaces file as he suggested?



Or, how are you configuring your interface (NM, systemd-networkd, ...)?

--
John Doe



Re: apache not running at boot

2018-07-19 Thread Curt
On 2018-07-19, Dave  wrote:
>
> after boot apache is not running,
> if i run systemctl status apache2, i get the address bind error shown above
>
> at the command line after boot if i run apache2 -k restart, no errors.
>
> after boot if i start apache2 via /etc/init.d/apache2 start or 
> /usr/sbin/apache2ctl start
> then - systemctl does not get the error.
>
> /var/log/apache2 the error.log is "0" bytes
>
> how may i start apache2 at boot with out the error.
>

Does this not confirm or at least support Greg W.'s hypothesis?

Did you try changing "allow-hotplug" to "auto" in your
/etc/network/interfaces file as he suggested?

-- 
Boris sober and Boris drunk are such different people, they’ve never even met. 
-- Sergei Dovlatov, Pushkin Hills



Re: apache not running at boot

2018-07-19 Thread Joe
On Wed, 18 Jul 2018 20:57:18 -0400
Dave  wrote:


> 
> after boot apache is not running,
> if i run systemctl status apache2, i get the address bind error shown
> above
> 
> at the command line after boot if i run apache2 -k restart, no errors.
> 
> after boot if i start apache2 via /etc/init.d/apache2 start or 
> /usr/sbin/apache2ctl start
> then - systemctl does not get the error.
> 
> /var/log/apache2 the error.log is "0" bytes
> 
> how may i start apache2 at boot with out the error.
> 
> 

Is there any chance that something else has stolen port 80? Apache
doesn't like that.

I have a very dim memory of this happening to me long ago, though I
can't remember what the offending item was. Just on the offchance, check
whether 80 is in use.

-- 
Joe



Re: apache not running at boot

2018-07-19 Thread mick crane

On 2018-07-19 01:57, Dave wrote:

On 07/18/2018 04:41 PM, Dave wrote:


On 07/18/2018 10:12 AM, Jonathan Dowland wrote:
On Wed, Jul 18, 2018 at 09:36:14AM -0400, Greg Wooledge wrote:
Sounds like the service may be disabled for some reason.  What is
the
output of:

systemctl status apache2

If you see "; disabled;" on the "Loaded" line, then this should fix
it,
one hopes:

systemctl enable apache2

After doing that, you should see "; enabled;" on the Loaded line.

The above should address having apache2 start on system boot (or
restart
if killed for some reason); to start it on a running system you will

also want to issue

systemctl start apache2

However, from what I recall, none of this should be necessary by
default, so there is likely a configuration problem. If all of the
above


hello when i run systemctl this is what i get

● apache2.service - The Apache HTTP Server
   Loaded: loaded (/lib/systemd/system/apache2.service; enabled;
vendor preset: enabled)
   Active: failed (Result: exit-code) since Wed 2018-07-18 16:35:30
EDT; 1min 2s ago
  Process: 614 ExecStart=/usr/sbin/apachectl start (code=exited,
status=1/FAILURE)

Jul 18 16:35:30 culser systemd[1]: Starting The Apache HTTP Server...
Jul 18 16:35:30 culser apachectl[614]: (99)Cannot assign requested
address: AH00072: make_sock: could not bind to addres
Jul 18 16:35:30 culser apachectl[614]: no listening sockets available,
shutting down
Jul 18 16:35:30 culser apachectl[614]: AH00015: Unable to open logs
Jul 18 16:35:30 culser apachectl[614]: Action 'start' failed.
Jul 18 16:35:30 culser apachectl[614]: The Apache error log may have
more information.
Jul 18 16:35:30 culser systemd[1]: apache2.service: Control process
exited, code=exited status=1
Jul 18 16:35:30 culser systemd[1]: Failed to start The Apache HTTP
Server.
Jul 18 16:35:30 culser systemd[1]: apache2.service: Unit entered
failed state.
Jul 18 16:35:30 culser systemd[1]: apache2.service: Failed with result
'exit-code'.


does not result in a running apache2, check "journalctl -u
apache2.service" for clues, and failing that, /var/log/apache2/*


hello when i run systemctl this is what i get

● apache2.service - The Apache HTTP Server
   Loaded: loaded (/lib/systemd/system/apache2.service; enabled;
vendor preset: enabled)
   Active: failed (Result: exit-code) since Wed 2018-07-18 16:35:30
EDT; 1min 2s ago
  Process: 614 ExecStart=/usr/sbin/apachectl start (code=exited,
status=1/FAILURE)

Jul 18 16:35:30 culser systemd[1]: Starting The Apache HTTP Server...
Jul 18 16:35:30 culser apachectl[614]: (99)Cannot assign requested
address: AH00072: make_sock: could not bind to addres
Jul 18 16:35:30 culser apachectl[614]: no listening sockets available,
shutting down
Jul 18 16:35:30 culser apachectl[614]: AH00015: Unable to open logs
Jul 18 16:35:30 culser apachectl[614]: Action 'start' failed.
Jul 18 16:35:30 culser apachectl[614]: The Apache error log may have
more information.
Jul 18 16:35:30 culser systemd[1]: apache2.service: Control process
exited, code=exited status=1
Jul 18 16:35:30 culser systemd[1]: Failed to start The Apache HTTP
Server.
Jul 18 16:35:30 culser systemd[1]: apache2.service: Unit entered
failed state.
Jul 18 16:35:30 culser systemd[1]: apache2.service: Failed with result
'exit-code'. update:

after boot apache is not running,
if i run systemctl status apache2, i get the address bind error shown
above

at the command line after boot if i run apache2 -k restart, no errors.

after boot if i start apache2 via /etc/init.d/apache2 start or
/usr/sbin/apache2ctl start
then - systemctl does not get the error.

/var/log/apache2 the error.log is "0" bytes

how may i start apache2 at boot with out the error.


Seems apache is starting before network is ready.
I used to put the ip adddress to Listen to and it worked then with one 
release it stopped working so edited to Listen 127.0.0.1 in apache conf 
file or Listen * and it worked but now this release cannot find Listen 
to interface in any of the apache2 conf files only the ports in 
ports.conf


Perhaps there is some way to find what order
"systemctl enable "
puts things in ?

mick




--
Key ID4BFEBB31



Re: apache not running at boot

2018-07-18 Thread Dave


On 07/18/2018 04:41 PM, Dave wrote:

On 07/18/2018 10:12 AM, Jonathan Dowland wrote:

On Wed, Jul 18, 2018 at 09:36:14AM -0400, Greg Wooledge wrote:

Sounds like the service may be disabled for some reason.  What is the
output of:

systemctl status apache2

If you see "; disabled;" on the "Loaded" line, then this should fix it,
one hopes:

systemctl enable apache2

After doing that, you should see "; enabled;" on the Loaded line.


The above should address having apache2 start on system boot (or restart
if killed for some reason); to start it on a running system you will
also want to issue

   systemctl start apache2

However, from what I recall, none of this should be necessary by
default, so there is likely a configuration problem. If all of the above


hello when i run systemctl this is what i get

● apache2.service - The Apache HTTP Server
   Loaded: loaded (/lib/systemd/system/apache2.service; enabled; 
vendor preset: enabled)
   Active: failed (Result: exit-code) since Wed 2018-07-18 16:35:30 
EDT; 1min 2s ago
  Process: 614 ExecStart=/usr/sbin/apachectl start (code=exited, 
status=1/FAILURE)


Jul 18 16:35:30 culser systemd[1]: Starting The Apache HTTP Server...
Jul 18 16:35:30 culser apachectl[614]: (99)Cannot assign requested 
address: AH00072: make_sock: could not bind to addres
Jul 18 16:35:30 culser apachectl[614]: no listening sockets available, 
shutting down

Jul 18 16:35:30 culser apachectl[614]: AH00015: Unable to open logs
Jul 18 16:35:30 culser apachectl[614]: Action 'start' failed.
Jul 18 16:35:30 culser apachectl[614]: The Apache error log may have 
more information.
Jul 18 16:35:30 culser systemd[1]: apache2.service: Control process 
exited, code=exited status=1

Jul 18 16:35:30 culser systemd[1]: Failed to start The Apache HTTP Server.
Jul 18 16:35:30 culser systemd[1]: apache2.service: Unit entered 
failed state.
Jul 18 16:35:30 culser systemd[1]: apache2.service: Failed with result 
'exit-code'.



does not result in a running apache2, check "journalctl -u
apache2.service" for clues, and failing that, /var/log/apache2/*




hello when i run systemctl this is what i get

● apache2.service - The Apache HTTP Server
   Loaded: loaded (/lib/systemd/system/apache2.service; enabled; 
vendor preset: enabled)
   Active: failed (Result: exit-code) since Wed 2018-07-18 16:35:30 
EDT; 1min 2s ago
  Process: 614 ExecStart=/usr/sbin/apachectl start (code=exited, 
status=1/FAILURE)


Jul 18 16:35:30 culser systemd[1]: Starting The Apache HTTP Server...
Jul 18 16:35:30 culser apachectl[614]: (99)Cannot assign requested 
address: AH00072: make_sock: could not bind to addres
Jul 18 16:35:30 culser apachectl[614]: no listening sockets available, 
shutting down

Jul 18 16:35:30 culser apachectl[614]: AH00015: Unable to open logs
Jul 18 16:35:30 culser apachectl[614]: Action 'start' failed.
Jul 18 16:35:30 culser apachectl[614]: The Apache error log may have 
more information.
Jul 18 16:35:30 culser systemd[1]: apache2.service: Control process 
exited, code=exited status=1

Jul 18 16:35:30 culser systemd[1]: Failed to start The Apache HTTP Server.
Jul 18 16:35:30 culser systemd[1]: apache2.service: Unit entered 
failed state.
Jul 18 16:35:30 culser systemd[1]: apache2.service: Failed with result 
'exit-code'. 

update:

after boot apache is not running,
if i run systemctl status apache2, i get the address bind error shown above

at the command line after boot if i run apache2 -k restart, no errors.

after boot if i start apache2 via /etc/init.d/apache2 start or 
/usr/sbin/apache2ctl start

then - systemctl does not get the error.

/var/log/apache2 the error.log is "0" bytes

how may i start apache2 at boot with out the error.




Re: apache not running at boot

2018-07-18 Thread Greg Wooledge
On Wed, Jul 18, 2018 at 04:41:54PM -0400, Dave wrote:
> ● apache2.service - The Apache HTTP Server
>    Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor
> preset: enabled)
>    Active: failed (Result: exit-code) since Wed 2018-07-18 16:35:30 EDT;
> 1min 2s ago
>   Process: 614 ExecStart=/usr/sbin/apachectl start (code=exited,
> status=1/FAILURE)
> 
> Jul 18 16:35:30 culser systemd[1]: Starting The Apache HTTP Server...
> Jul 18 16:35:30 culser apachectl[614]: (99)Cannot assign requested address:
> AH00072: make_sock: could not bind to addres
> Jul 18 16:35:30 culser apachectl[614]: no listening sockets available,
> shutting down

OK.  Here is what I think is happening:

In your /etc/network/interfaces file, where your primary network interface
is defined, you have "allow-hotplug", because that's what the Debian
installer puts there by default, because the Debian installer has been
dumbed down for laptops.

Since your interface is marked as "allow-hotplug", services that require
a functional network will not wait for this interface to be ready.

For a server or a workstation, you need to change "allow-hotplug" to "auto".



Re: apache not running at boot

2018-07-18 Thread Dave

On 07/18/2018 10:12 AM, Jonathan Dowland wrote:

On Wed, Jul 18, 2018 at 09:36:14AM -0400, Greg Wooledge wrote:

Sounds like the service may be disabled for some reason.  What is the
output of:

systemctl status apache2

If you see "; disabled;" on the "Loaded" line, then this should fix it,
one hopes:

systemctl enable apache2

After doing that, you should see "; enabled;" on the Loaded line.


The above should address having apache2 start on system boot (or restart
if killed for some reason); to start it on a running system you will
also want to issue

   systemctl start apache2

However, from what I recall, none of this should be necessary by
default, so there is likely a configuration problem. If all of the above


hello when i run systemctl this is what i get

● apache2.service - The Apache HTTP Server
   Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor 
preset: enabled)
   Active: failed (Result: exit-code) since Wed 2018-07-18 16:35:30 
EDT; 1min 2s ago
  Process: 614 ExecStart=/usr/sbin/apachectl start (code=exited, 
status=1/FAILURE)


Jul 18 16:35:30 culser systemd[1]: Starting The Apache HTTP Server...
Jul 18 16:35:30 culser apachectl[614]: (99)Cannot assign requested 
address: AH00072: make_sock: could not bind to addres
Jul 18 16:35:30 culser apachectl[614]: no listening sockets available, 
shutting down

Jul 18 16:35:30 culser apachectl[614]: AH00015: Unable to open logs
Jul 18 16:35:30 culser apachectl[614]: Action 'start' failed.
Jul 18 16:35:30 culser apachectl[614]: The Apache error log may have 
more information.
Jul 18 16:35:30 culser systemd[1]: apache2.service: Control process 
exited, code=exited status=1

Jul 18 16:35:30 culser systemd[1]: Failed to start The Apache HTTP Server.
Jul 18 16:35:30 culser systemd[1]: apache2.service: Unit entered failed 
state.
Jul 18 16:35:30 culser systemd[1]: apache2.service: Failed with result 
'exit-code'.



does not result in a running apache2, check "journalctl -u
apache2.service" for clues, and failing that, /var/log/apache2/*




hello when i run systemctl this is what i get

● apache2.service - The Apache HTTP Server
   Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor 
preset: enabled)
   Active: failed (Result: exit-code) since Wed 2018-07-18 16:35:30 
EDT; 1min 2s ago
  Process: 614 ExecStart=/usr/sbin/apachectl start (code=exited, 
status=1/FAILURE)


Jul 18 16:35:30 culser systemd[1]: Starting The Apache HTTP Server...
Jul 18 16:35:30 culser apachectl[614]: (99)Cannot assign requested 
address: AH00072: make_sock: could not bind to addres
Jul 18 16:35:30 culser apachectl[614]: no listening sockets available, 
shutting down

Jul 18 16:35:30 culser apachectl[614]: AH00015: Unable to open logs
Jul 18 16:35:30 culser apachectl[614]: Action 'start' failed.
Jul 18 16:35:30 culser apachectl[614]: The Apache error log may have 
more information.
Jul 18 16:35:30 culser systemd[1]: apache2.service: Control process 
exited, code=exited status=1

Jul 18 16:35:30 culser systemd[1]: Failed to start The Apache HTTP Server.
Jul 18 16:35:30 culser systemd[1]: apache2.service: Unit entered failed 
state.
Jul 18 16:35:30 culser systemd[1]: apache2.service: Failed with result 
'exit-code'.


Re: apache not running at boot

2018-07-18 Thread Jonathan Dowland

On Wed, Jul 18, 2018 at 09:36:14AM -0400, Greg Wooledge wrote:

Sounds like the service may be disabled for some reason.  What is the
output of:

systemctl status apache2

If you see "; disabled;" on the "Loaded" line, then this should fix it,
one hopes:

systemctl enable apache2

After doing that, you should see "; enabled;" on the Loaded line.


The above should address having apache2 start on system boot (or restart
if killed for some reason); to start it on a running system you will
also want to issue

   systemctl start apache2

However, from what I recall, none of this should be necessary by
default, so there is likely a configuration problem. If all of the above
does not result in a running apache2, check "journalctl -u
apache2.service" for clues, and failing that, /var/log/apache2/*

--

⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Jonathan Dowland
⢿⡄⠘⠷⠚⠋⠀ https://jmtd.net
⠈⠳⣄ Please do not CC me, I am subscribed to the list.



Re: apache not running at boot

2018-07-18 Thread Greg Wooledge
On Wed, Jul 18, 2018 at 09:29:47AM -0400, Dave wrote:
> I just installed DEB 9.4 and apache2.4 is not starting at boot.

> i can start apache with no error using apache2 -k start or
> /ect/init.d/apache2 start  or using /usr/sbin/apachectl with no errors

Sounds like the service may be disabled for some reason.  What is the
output of:

systemctl status apache2

If you see "; disabled;" on the "Loaded" line, then this should fix it,
one hopes:

systemctl enable apache2

After doing that, you should see "; enabled;" on the Loaded line.