Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
/etc/init.d/apache2 start attempts to start openvpn [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
kai.scorpio
n00b
n00b


Joined: 01 Sep 2011
Posts: 46

PostPosted: Fri Dec 14, 2012 12:22 pm    Post subject: /etc/init.d/apache2 start attempts to start openvpn [SOLVED] Reply with quote

I recently installed openvpn on a computer that has apache installed (a home web server, but I occasionally need to connect to my workplace VPN to fetch some files). Now I get the following:

Code:

~ % sudo /etc/init.d/apache2 start
 * Starting openvpn ...
grep: /etc/openvpn/openvpn.conf: No such file or directory
grep: /etc/openvpn/openvpn.conf: No such file or directory
grep: /etc/openvpn/openvpn.conf: No such file or directory
grep: /etc/openvpn/openvpn.conf: No such file or directory
Options error: In [CMD-LINE]:1: Error opening configuration file: /etc/openvpn/openvpn.conf
Use --help for more information.
 * start-stop-daemon: failed to start `/usr/sbin/openvpn'
 * Check your logs to see why startup failed        [ !! ]
 * ERROR: openvpn failed to start
 * Starting apache2 ...        [ ok ]


Could somebody let me know why it attempts to start openvpn? The setup I would like to have is to use the vpn only for samba and web browsing, and connect directly to the internet for any other services.


Thanks,
Kai


Last edited by kai.scorpio on Mon Dec 17, 2012 11:40 am; edited 1 time in total
Back to top
View user's profile Send private message
consus
n00b
n00b


Joined: 27 Aug 2012
Posts: 38

PostPosted: Fri Dec 14, 2012 2:06 pm    Post subject: Reply with quote

Please post your /etc/conf.d/apache2 and output of grep '_need=' /etc/rc.conf.
Back to top
View user's profile Send private message
cach0rr0
Bodhisattva
Bodhisattva


Joined: 13 Nov 2008
Posts: 4123
Location: Houston, Republic of Texas

PostPosted: Sat Dec 15, 2012 10:30 am    Post subject: Reply with quote

most likely

-openvpn init script does "provide net"
-rc_depend_strict is set to "YES" - it should be set to 'NO', allowing any service that does a "provide net" to be sufficient for apache startup
_________________
Lost configuring your system?
dump lspci -n here | see Pappy's guide | Link Stash
Back to top
View user's profile Send private message
kai.scorpio
n00b
n00b


Joined: 01 Sep 2011
Posts: 46

PostPosted: Sat Dec 15, 2012 5:27 pm    Post subject: Reply with quote

/etc/conf.d/apache2:
Code:

# /etc/conf.d/apache2: config file for /etc/init.d/apache2

# When you install a module it is easy to activate or deactivate the modules
# and other features of apache using the APACHE2_OPTS line. Every module should
# install a configuration in /etc/apache2/modules.d. In that file will have an
# <IfDefine NNN> directive where NNN is the option to enable that module.
#
# Here are the options available in the default configuration:
#
#  AUTH_DIGEST  Enables mod_auth_digest
#  AUTHNZ_LDAP  Enables authentication through mod_ldap (available if USE=ldap)
#  CACHE        Enables mod_cache
#  DAV          Enables mod_dav
#  ERRORDOCS    Enables default error documents for many languages.
#  INFO         Enables mod_info, a useful module for debugging
#  LANGUAGE     Enables content-negotiation based on language and charset.
#  LDAP         Enables mod_ldap (available if USE=ldap)
#  MANUAL       Enables /manual/ to be the apache manual (available if USE=docs)
#  MEM_CACHE    Enables default configuration mod_mem_cache
#  PROXY        Enables mod_proxy
#  SSL          Enables SSL (available if USE=ssl)
#  STATUS       Enabled mod_status, a useful module for statistics
#  SUEXEC       Enables running CGI scripts (in USERDIR) through suexec.
#  USERDIR      Enables /~username mapping to /home/username/public_html
#
#
# The following two options provide the default virtual host for the HTTP and
# HTTPS protocol. YOU NEED TO ENABLE AT LEAST ONE OF THEM, otherwise apache
# will not listen for incomming connections on the approriate port.
#
#  DEFAULT_VHOST      Enables name-based virtual hosts, with the default
#                     virtual host being in /var/www/localhost/htdocs
#  SSL_DEFAULT_VHOST  Enables default vhost for SSL (you should enable this
#                     when you enable SSL)
#
APACHE2_OPTS="-D DEFAULT_VHOST -D INFO -D SSL -D SSL_DEFAULT_VHOST -D LANGUAGE -D AUTH_DIGEST -D WSGI"
# Extended options for advanced uses of Apache ONLY
# You don't need to edit these unless you are doing crazy Apache stuff
# As not having them set correctly, or feeding in an incorrect configuration
# via them will result in Apache failing to start
# YOU HAVE BEEN WARNED.

# PID file
#PIDFILE=/var/run/apache2.pid

# timeout for startup/shutdown checks
#TIMEOUT=10

# ServerRoot setting
#SERVERROOT=/usr/lib64/apache2

# Configuration file location
# - If this does NOT start with a '/', then it is treated relative to
# $SERVERROOT by Apache
#CONFIGFILE=/etc/apache2/httpd.conf

# Location to log startup errors to
# They are normally dumped to your terminal.
#STARTUPERRORLOG="/var/log/apache2/startuperror.log"

# A command that outputs a formatted text version of the HTML at the URL
# of the command line. Designed for lynx, however other programs may work.
#LYNX="lynx -dump"

# The URL to your server's mod_status status page.
# Required for status and fullstatus
#STATUSURL="http://localhost/server-status"

# Method to use when reloading the server
# Valid options are 'restart' and 'graceful'
# See http://httpd.apache.org/docs/2.2/stopping.html for information on
# what they do and how they differ.
#RELOAD_TYPE="graceful"


grep '_need=' /etc/rc.conf
Code:

#rc_need="openvpn"
#rc_foo_need="openvpn"
#rc_foo_bar_need="openvpn"


grep "provide" /etc/init.d/openvpn shows nothing, and rc_depend_strict is commented out. Setting it to "NO" does not help (I have not done a restart after changing it, is that necessary?)

Any further ideas?

Kai
Back to top
View user's profile Send private message
cach0rr0
Bodhisattva
Bodhisattva


Joined: 13 Nov 2008
Posts: 4123
Location: Houston, Republic of Texas

PostPosted: Sun Dec 16, 2012 10:59 am    Post subject: Reply with quote

hrmm
how about something like

Code:

rc_apache2_need="!openvpn"
rc_openvpn_provide="!net"


shot in the dark, but worth trying
_________________
Lost configuring your system?
dump lspci -n here | see Pappy's guide | Link Stash
Back to top
View user's profile Send private message
kai.scorpio
n00b
n00b


Joined: 01 Sep 2011
Posts: 46

PostPosted: Mon Dec 17, 2012 11:39 am    Post subject: Reply with quote

Fixed. openvpn was added to the default runlevel (by portage it seems? Wasn't me :P), removing it has stopped this issue.

Kai
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security 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