Jump to content

Recommended Posts

Posted

Hi.

I try to start Apache2 in Armbian. If i use 'apache2ctl -k start' then everything is ok.

root@cubietruck:/etc/apache2# apache2ctl -k start
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using ::1. Set the 'ServerName' directive globally to suppress this message
root@cubietruck:/etc/apache2#


But when i try to start it as systemd i get error.

root@cubietruck:/etc/apache2# apache2ctl start
Invoking 'systemctl start apache2'.
Use 'systemctl status apache2' for more info.
Job for apache2.service failed because the control process exited with error code.
See "systemctl status apache2.service" and "journalctl -xe" for details.
Action 'start' failed.
The Apache error log may have more information.

root@cubietruck:/etc/apache2# systemctl status apache2.service
? apache2.service - The Apache HTTP Server
   Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sat 2018-02-03 19:26:56 UTC; 23s ago
  Process: 11742 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)

фев 03 19:26:56 cubietruck apachectl[11742]: AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using ::1. Set the 'ServerName' directive globally to s
фев 03 19:26:56 cubietruck apachectl[11742]: (2)No such file or directory: AH02291: Cannot access directory '/mnt/var/armbian/var/log/apache2/' for main error log
фев 03 19:26:56 cubietruck apachectl[11742]: (2)No such file or directory: AH02291: Cannot access directory '/mnt/var/armbian/var/log/apache2/' for error log of vhost defined at /etc/apache
фев 03 19:26:56 cubietruck apachectl[11742]: AH00014: Configuration check failed
фев 03 19:26:56 cubietruck apachectl[11742]: Action 'start' failed.
фев 03 19:26:56 cubietruck apachectl[11742]: The Apache error log may have more information.
фев 03 19:26:56 cubietruck systemd[1]: apache2.service: Control process exited, code=exited status=1
фев 03 19:26:56 cubietruck systemd[1]: Failed to start The Apache HTTP Server.
фев 03 19:26:56 cubietruck systemd[1]: apache2.service: Unit entered failed state.
фев 03 19:26:56 cubietruck systemd[1]: apache2.service: Failed with result 'exit-code'.


All directory paths exist and could be accessed.

root@cubietruck:/etc/apache2# namei -l /mnt/var/armbian/var/log/apache2/
f: /mnt/var/armbian/var/log/apache2/
drwxr-xr-x root root /
drwxr-xr-x root root mnt
drwxr-xr-x root root var
drwxr-xr-x root root armbian
drwxr-xr-x root root var
drwxr-xr-x root root log
drwxrwxrwx root adm  apache2
root@cubietruck:/etc/apache2#

root@cubietruck:/etc/apache2# ls -l /mnt/var/armbian/var/log/apache2/
total 12
-rwxrwxrwx 1 root adm 1032 фев  3 17:44 access.log
-rwxrwxrwx 1 root adm 2133 фев  3 19:27 error.log
-rwxrwxrwx 1 root adm    2 фев  3 16:27 other_vhosts_access.log
root@cubietruck:/etc/apache2# cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 9 (stretch)"
NAME="Debian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"


Please give me idea what could be the problem.

Posted

Update: and i stoped log2ram service. So it should not create problems.

root@cubietruck:/etc/apache2# systemctl is-enabled log2ram.service
disabled


 

root@cubietruck:/etc/apache2# cat /etc/mtab
sysfs /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0
udev /dev devtmpfs rw,nosuid,relatime,size=958676k,nr_inodes=186452,mode=755 0 0
devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0
tmpfs /run tmpfs rw,nosuid,noexec,relatime,size=205444k,mode=755 0 0
/dev/mmcblk0p1 / ext4 rw,noatime,nodiratime,errors=remount-ro,commit=600 0 0
securityfs /sys/kernel/security securityfs rw,nosuid,nodev,noexec,relatime 0 0
tmpfs /dev/shm tmpfs rw,nosuid,nodev 0 0
tmpfs /run/lock tmpfs rw,nosuid,nodev,noexec,relatime,size=5120k 0 0
tmpfs /sys/fs/cgroup tmpfs ro,nosuid,nodev,noexec,mode=755 0 0
cgroup /sys/fs/cgroup/systemd cgroup rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd 0 0
cgroup /sys/fs/cgroup/rdma cgroup rw,nosuid,nodev,noexec,relatime,rdma 0 0
cgroup /sys/fs/cgroup/cpu,cpuacct cgroup rw,nosuid,nodev,noexec,relatime,cpu,cpuacct 0 0
cgroup /sys/fs/cgroup/perf_event cgroup rw,nosuid,nodev,noexec,relatime,perf_event 0 0
cgroup /sys/fs/cgroup/net_cls,net_prio cgroup rw,nosuid,nodev,noexec,relatime,net_cls,net_prio 0 0
cgroup /sys/fs/cgroup/memory cgroup rw,nosuid,nodev,noexec,relatime,memory 0 0
cgroup /sys/fs/cgroup/cpuset cgroup rw,nosuid,nodev,noexec,relatime,cpuset 0 0
cgroup /sys/fs/cgroup/blkio cgroup rw,nosuid,nodev,noexec,relatime,blkio 0 0
cgroup /sys/fs/cgroup/pids cgroup rw,nosuid,nodev,noexec,relatime,pids 0 0
cgroup /sys/fs/cgroup/devices cgroup rw,nosuid,nodev,noexec,relatime,devices 0 0
cgroup /sys/fs/cgroup/freezer cgroup rw,nosuid,nodev,noexec,relatime,freezer 0 0
mqueue /dev/mqueue mqueue rw,relatime 0 0
debugfs /sys/kernel/debug debugfs rw,relatime 0 0
systemd-1 /proc/sys/fs/binfmt_misc autofs rw,relatime,fd=34,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=13214 0 0
configfs /sys/kernel/config configfs rw,relatime 0 0
tmpfs /tmp tmpfs rw,nosuid,relatime 0 0
/dev/sda1 /mnt/var ext4 rw,relatime,data=ordered 0 0
tracefs /sys/kernel/debug/tracing tracefs rw,relatime 0 0
tmpfs /run/user/1000 tmpfs rw,nosuid,nodev,relatime,size=205440k,mode=700,uid=1000,gid=1000 0 0
/dev/mmcblk0p1 /mnt/mmcblk0p1 ext4 rw,relatime,errors=remount-ro,commit=600 0 0

 

Posted

It might make sense to describe your system as best as you can... E.g. which version of armbian, which kernel... 

Posted
5 minutes ago, chwe said:

It might make sense to describe your system as best as you can... E.g. which version of armbian, which kernel... 

Yes - the best is the result of armbian-monitor -u

:-)

Posted
5 minutes ago, chwe said:

It might make sense to describe your system as best as you can... E.g. which version of armbian, which kernel... 


 

root@cubietruck:/etc/apache2# uname -a
Linux cubietruck 4.14.15-sunxi #28 SMP Mon Jan 29 07:24:48 CET 2018 armv7l GNU/Linux
root@cubietruck:/etc/apache2# cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 9 (stretch)"
NAME="Debian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

I dont know what other information is needed. Tell me please and i send it.

Posted

Additional information and results of research

After installing Armbian i have moved folders 'var' and 'home' to hdd.
First of all i moved data of these folders to /mnt/var/armbian folder and make symlynks:

root@cubietruck:/etc/apache2/sites-enabled# readlink /var
/mnt/var/armbian/var
root@cubietruck:/etc/apache2/sites-enabled# readlink /home
/mnt/var/armbian/home
root@cubietruck:/etc/apache2/sites-enabled#

Then i mount /dev/sda1 on /mnt/var.

root@cubietruck:/etc/apache2/sites-enabled# cat /etc/fstab
UUID=d0a4b656-3daa-4b30-acd2-986bf311e832 /        ext4 defaults,noatime,nodiratime,commit=600,errors=remount-ro 0 1
UUID=8dd4d44b-29c5-4943-93f1-b38eecbce573 /mnt/var ext4 defaults                                                 0 1
tmpfs /tmp tmpfs defaults,nosuid 0 0

And now... When i move all Apache2 data out of the /mnt/var/armbian/var then it works even in systemd. But if the data is placed inside /mnt/var/armbian/var/ then all described above happens. But Mysql for example work well even in /var.

 

I don't understand how systemd works in armbian. :-(

Posted
10 hours ago, guidol said:

First: try to solve the problem: AH00558: apache2: Could not reliably determine the server's fully qualified domain name

 

take a look at the follwoing pages:

https://askubuntu.com/questions/256013/apache-error-could-not-reliably-determine-the-servers-fully-qualified-domain-n

https://wiki.apache.org/httpd/CouldNotDetermineServerName

https://www.first2host.co.uk/f/apache2-reliably-determine/

Thank you, Guidol. This warning annoyed me too

Posted
15 hours ago, vab said:

I dont know what other information is needed. Tell me please and i send it.

 

5 hours ago, vab said:

After installing Armbian i have moved folders 'var' and 'home' to hdd.
First of all i moved data of these folders to /mnt/var/armbian folder and make symlynks:

this 'sort of informations' for example... :P  

This sounds more like a software related issue through messup with fs than armbian related.. Therefore I'll move it to Common issues... 

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines