Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Apache errors in rc.log out of nowhere
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
gorg86
Apprentice
Apprentice


Joined: 20 May 2011
Posts: 299

PostPosted: Fri Dec 04, 2020 6:18 am    Post subject: Apache errors in rc.log out of nowhere Reply with quote

Hello,

Recently I got Apache errors in my rc.log even though I did never add it to openrc for startup and rc-update shows nothing too.
I get this:
Code:
     OpenRC 0.42.1 is starting up Gentoo Linux (x86_64)

  * /proc is already mounted
  * /run/openrc: creating directory
  * /run/lock: creating directory
  * /run/lock: correcting owner
  * Caching service dependencies ...
 AH00557: apache2: apr_sockaddr_info_get() failed for (none)
 AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message
  * You are binding an interface in you virtual hosts.
  * You must add rc_need="net.FOO" to your /etc/conf.d/apache2
  * where FOO is the interface(s) providing the following address(es):
  *  *:5000
  [ ok ]
  * Mounting security filesystem ...
  [ ok ]
  * Mounting debug filesystem ... 
  [ ok ]
  * Mounting SELinux filesystem ...
  [ ok ]
  * Mounting persistent storage (pstore) filesystem ...


How can I get rid of this? I do not want it to start at boot time anyway.
Back to top
View user's profile Send private message
Banana
Veteran
Veteran


Joined: 21 May 2004
Posts: 1420
Location: Germany

PostPosted: Fri Dec 04, 2020 8:46 am    Post subject: Reply with quote

what is the output of ?
Code:
rc-update show

_________________
My personal space
My delta-labs.org snippets do expire

PFL - Portage file list - find which package a file or command belongs to.
Back to top
View user's profile Send private message
gorg86
Apprentice
Apprentice


Joined: 20 May 2011
Posts: 299

PostPosted: Fri Dec 04, 2020 9:57 am    Post subject: Reply with quote

Code:
                acpid | boot                                   
            alsasound | boot                                   
               binfmt | boot                                   
             bootmisc | boot                                   
              cgroups |                                 sysinit
                cupsd |      default                           
                 dbus |      default                           
                devfs |                                 sysinit
                dmesg |                                 sysinit
              elogind | boot                                   
                 fsck | boot                                   
             hostname | boot                                   
              hwclock | boot                                   
              keymaps | boot                                   
            killprocs |                        shutdown       
    kmod-static-nodes |                                 sysinit
                local |      default nonetwork                 
           localmount | boot                                   
             loopback | boot                                   
              modules | boot                                   
             mount-ro |                        shutdown       
                 mtab | boot                                   
           net.enp3s0 |      default                           
               net.lo | boot                                   
             netmount |      default                           
              numlock |      default                           
     opentmpfiles-dev |                                 sysinit
   opentmpfiles-setup | boot                                   
               procfs | boot                                   
                 root | boot                                   
         save-keymaps | boot                                   
    save-termencoding | boot                                   
            savecache |                        shutdown       
               stubby |      default                           
                 swap | boot                                   
               sysctl | boot                                   
                sysfs |                                 sysinit
            syslog-ng |      default                           
         termencoding | boot                                   
                 udev |                                 sysinit
         udev-trigger |                                 sysinit
              urandom | boot                                 
Back to top
View user's profile Send private message
Ionen
Developer
Developer


Joined: 06 Dec 2018
Posts: 2732

PostPosted: Fri Dec 04, 2020 10:10 am    Post subject: Reply with quote

I believe openrc runs depend() for every services even if they're not to be started, and the error you're getting is emitted from that.

It's similar to what /etc/init.d/sshd does, it tries to auto-determine+verify dependencies:
Code:
depend() {
   use dns entropy logger mysql netmount postgresql
   after sshd
   if ! echo ${rc_need} | grep -Fq "net." ; then
      local x warn_addr
      for x in $(virtualhosts 2>/dev/null | grep '^\(\[\|\*:\|\)[[:digit:]]' | sed 's@\(:[[:digit:]]\{1,5\}\)\([[:space:]].*\|$\)@\1@' | sort -u) ; do
         case "${x}" in
            \*:80|\*:443) ;;
            *) warn_addr="${warn_addr} ${x}" ;;
         esac
      done
      if [ -n "${warn_addr}" ] ; then
         need net
         ewarn "You are binding an interface in you virtual hosts."
         ewarn "You must add rc_need=\"net.FOO\" to your ${RC_PREFIX%/}/etc/conf.d/apache2"
         ewarn "where FOO is the interface(s) providing the following address(es):"
         ewarn "${warn_addr}"
      fi
   fi
}

That virtualhosts command being in depend() looks questionable, maybe(?) it can't even run this early in the boot process given your errors. Didn't try it but may be a bug then.

I guess you "could" set rc_need as requested to skip this block.

On another note, these checks for net.* kind of bother me given I don't use netifrc :| On the other hand sshd does nothing if you set rc_need to anything at all. But well, I use nginx nowadays so I'm not going to do anything about it.
Back to top
View user's profile Send private message
Banana
Veteran
Veteran


Joined: 21 May 2004
Posts: 1420
Location: Germany

PostPosted: Fri Dec 04, 2020 11:55 am    Post subject: Reply with quote

this is my /etc/conf.d/apache2: https://delta-labs.org/sp/GoE
There is no such text in the depend method


a grep -ri apache in /etc/conf.d does result in
Code:

tomcat-9:      args="${args} -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager \
tomcat-9:         org.apache.catalina.startup.Bootstrap \
apache2:description_configdump="Dumps the configuration of the runing apache server. Requires server-info to be enabled and www-client/lynx."
apache2:PIDFILE="${PIDFILE:-/var/run/apache2.pid}"
apache2:SERVERROOT="${SERVERROOT:-/usr/lib64/apache2}"
apache2:CONFIGFILE="${CONFIGFILE:-/etc/apache2/httpd.conf}"
apache2:# user's APACHE2_OPTS.
apache2:APACHE2_OPTS="${APACHE2_OPTS} -d ${SERVERROOT}"
apache2:APACHE2_OPTS="${APACHE2_OPTS} -f ${CONFIGFILE}"
apache2:# The path to the apache2 binary.
apache2:APACHE2="/usr/sbin/apache2"
apache2:   checkpath --directory /run/apache_ssl_mutex
apache2:   OUTPUT=$( ${APACHE2} ${APACHE2_OPTS} -t 2>&1 )
apache2:      # We must make sure that we only append to APACHE2_OPTS
apache2:      APACHE2_OPTS="${APACHE2_OPTS} -E ${STARTUPERRORLOG}"
apache2:   start-stop-daemon --start -- ${APACHE2} ${APACHE2_OPTS} -k start
apache2:   ${APACHE2} ${APACHE2_OPTS} -k stop
apache2:   while ( test -f "${PIDFILE}" || pgrep -P ${PID} apache2 >/dev/null ) \
apache2:      ${APACHE2} ${APACHE2_OPTS} -k restart
apache2:      ${APACHE2} ${APACHE2_OPTS} -k graceful
apache2:   ${APACHE2} ${APACHE2_OPTS} -k graceful
apache2:   ${APACHE2} ${APACHE2_OPTS} -k graceful-stop
apache2:   ${APACHE2} ${APACHE2_OPTS} -M 2>&1
apache2:   ${APACHE2} ${APACHE2_OPTS} -S
apache2:      echo "${APACHE2} started with '${APACHE2_OPTS}'"
apache2:         ${LYNX} "${INFOURL}/?${i}" | sed '/Apache Server Information/d;/^[[:space:]]\+[_]\+$/Q'


@gorg86 what does the grep show to you?
_________________
My personal space
My delta-labs.org snippets do expire

PFL - Portage file list - find which package a file or command belongs to.
Back to top
View user's profile Send private message
gorg86
Apprentice
Apprentice


Joined: 20 May 2011
Posts: 299

PostPosted: Fri Dec 04, 2020 2:48 pm    Post subject: Reply with quote

This is the only line in /etc/conf.d/apache2, everything else is commented out:
Code:
APACHE2_OPTS="-D DEFAULT_VHOST -D INFO -D SSL -D SSL_DEFAULT_VHOST -D LANGUAGE -D PHP"


grep -ri apache:
Code:
apache2:# /etc/conf.d/apache2: config file for /etc/init.d/apache2
apache2:# and other features of apache using the APACHE2_OPTS line. Every module should
apache2:# install a configuration in /etc/apache2/modules.d. In that file will have an
apache2:#  MANUAL       Enables /manual/ to be the apache manual (available if USE=docs)
apache2:# HTTPS protocol. YOU NEED TO ENABLE AT LEAST ONE OF THEM, otherwise apache
apache2:APACHE2_OPTS="-D DEFAULT_VHOST -D INFO -D SSL -D SSL_DEFAULT_VHOST -D LANGUAGE -D PHP"
apache2:# Extended options for advanced uses of Apache ONLY
apache2:# You don't need to edit these unless you are doing crazy Apache stuff
apache2:# via them will result in Apache failing to start
apache2:#PIDFILE=/var/run/apache2.pid
apache2:#SERVERROOT=/usr/lib64/apache2
apache2:# $SERVERROOT by Apache
apache2:#CONFIGFILE=/etc/apache2/httpd.conf
apache2:#STARTUPERRORLOG="/var/log/apache2/startuperror.log"
apache2:# See http://httpd.apache.org/docs/2.2/stopping.html for information on
Back to top
View user's profile Send private message
Banana
Veteran
Veteran


Joined: 21 May 2004
Posts: 1420
Location: Germany

PostPosted: Tue Dec 08, 2020 2:16 pm    Post subject: Reply with quote

sorry wrong dir. /etc/init.d please
_________________
My personal space
My delta-labs.org snippets do expire

PFL - Portage file list - find which package a file or command belongs to.
Back to top
View user's profile Send private message
gorg86
Apprentice
Apprentice


Joined: 20 May 2011
Posts: 299

PostPosted: Wed Dec 09, 2020 4:57 am    Post subject: Reply with quote

Code:
apache2:description_configdump="Dumps the configuration of the runing apache server. Requires server-info to be enabled and www-client/lynx."
apache2:PIDFILE="${PIDFILE:-/var/run/apache2.pid}"
apache2:SERVERROOT="${SERVERROOT:-/usr/lib64/apache2}"
apache2:CONFIGFILE="${CONFIGFILE:-/etc/apache2/httpd.conf}"
apache2:# user's APACHE2_OPTS.
apache2:APACHE2_OPTS="${APACHE2_OPTS} -d ${SERVERROOT}"
apache2:APACHE2_OPTS="${APACHE2_OPTS} -f ${CONFIGFILE}"
apache2:# The path to the apache2 binary.
apache2:APACHE2="/usr/sbin/apache2"
apache2:                        ewarn "You must add rc_need=\"net.FOO\" to your ${RC_PREFIX%/}/etc/conf.d/apache2"
apache2:        checkpath --directory /run/apache_ssl_mutex
apache2:        OUTPUT=$( ${APACHE2} ${APACHE2_OPTS} -t 2>&1 )
apache2:                # We must make sure that we only append to APACHE2_OPTS
apache2:                APACHE2_OPTS="${APACHE2_OPTS} -E ${STARTUPERRORLOG}"
apache2:        start-stop-daemon --start -- ${APACHE2} ${APACHE2_OPTS} -k start
apache2:        ${APACHE2} ${APACHE2_OPTS} -k stop
apache2:        while ( test -f "${PIDFILE}" || pgrep -P ${PID} apache2 >/dev/null ) \
apache2:                ${APACHE2} ${APACHE2_OPTS} -k restart
apache2:                ${APACHE2} ${APACHE2_OPTS} -k graceful
apache2:        ${APACHE2} ${APACHE2_OPTS} -k graceful
apache2:        ${APACHE2} ${APACHE2_OPTS} -k graceful-stop
apache2:        ${APACHE2} ${APACHE2_OPTS} -M 2>&1
apache2:        ${APACHE2} ${APACHE2_OPTS} -S
apache2:                echo "${APACHE2} started with '${APACHE2_OPTS}'"
apache2:                        ${LYNX} "${INFOURL}/?${i}" | sed '/Apache Server Information/d;/^[[:space:]]\+[_]\+$/Q'
Back to top
View user's profile Send private message
Banana
Veteran
Veteran


Joined: 21 May 2004
Posts: 1420
Location: Germany

PostPosted: Wed Dec 09, 2020 8:59 am    Post subject: Reply with quote

well the error message comes from the apache2 init script.
Strange. Mine https://delta-labs.org/sp/GoE does not have this message. I have this installed:
Code:
www-servers/apache-2.4.46:2::gentoo  USE="gdbm (split-usr) ssl suexec-caps -debug -doc -ldap -libressl (-selinux) -static -suexec -suexec-syslog -threads" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_core authn_dbm authn_file authz_core authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir env expires ext_filter file_cache filter headers http2 include info log_config logio mime mime_magic negotiation proxy proxy_http proxy_http2 rewrite setenvif socache_shmcb speling status unique_id unixd userdir usertrack vhost_alias -access_compat -asis -auth_digest -auth_form -authn_dbd -authn_socache -authz_dbd -brotli -cache_disk -cache_socache -cern_meta -charset_lite -dbd -dumpio -ident -imagemap -lbmethod_bybusyness -lbmethod_byrequests -lbmethod_bytraffic -lbmethod_heartbeat -log_forensic -macro -md -proxy_ajp -proxy_balancer -proxy_connect -proxy_fcgi -proxy_ftp -proxy_html -proxy_scgi -proxy_wstunnel -ratelimit -remoteip -reqtimeout -session -session_cookie -session_crypto -session_dbd -slotmem_shm -substitute -version -watchdog -xml2enc" APACHE2_MPMS="-event -prefork -worker"

_________________
My personal space
My delta-labs.org snippets do expire

PFL - Portage file list - find which package a file or command belongs to.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum