Error when trying to start Apache after installing Passenger for Puppet on Ubuntu 12.04

asked 2016-12-29 09:53:27 -0500

I am having an issue that I am not able to start Apache after installing passenger and configuring the puppetmaster file in /etc/apache2/sites-available/.

I am getting the following error when I try to start Apache:

root@puppet-master:/etc/apache2/sites-available# service apache2 start
 * Starting web server apache2
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:8140
no listening sockets available, shutting down
Unable to open logs
Action 'start' failed.
The Apache error log may have more information.
   ...fail!

I don't know if the problem is related to the puppetmaster file or the apache2.conf or ports.conf files.

ports.conf:

root@puppet-master:/etc/apache2/sites-available# cat ../ports.conf
# If you just change the port or add more ports here, you will likely also
# have to change the VirtualHost statement in
# /etc/apache2/sites-enabled/000-default
# This is also true if you have upgraded from before 2.2.9-3 (i.e. from
# Debian etch). See /usr/share/doc/apache2.2-common/NEWS.Debian.gz and
# README.Debian.gz

NameVirtualHost *:8140
Listen 8140

<IfModule mod_ssl.c>
    # If you add NameVirtualHost *:443 here, you will also have to change
    # the VirtualHost statement in /etc/apache2/sites-available/default-ssl
    # to <VirtualHost *:443>
    # Server Name Indication for SSL named virtual hosts is currently not
    # supported by MSIE on Windows XP.
    Listen 443
</IfModule>

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

apache2.conf:

root@puppet-master:/etc/apache2/sites-available# cat ../apache2.conf
#
# Based upon the NCSA server configuration files originally by Rob McCool.
#
# This is the main Apache server configuration file.  It contains the
# configuration directives that give the server its instructions.
# See http://httpd.apache.org/docs/2.2/ for detailed information about
# the directives.
#
# Do NOT simply read the instructions in here without understanding
# what they do.  They're here only as hints or reminders.  If you are unsure
# consult the online docs. You have been warned.
#
# The configuration directives are grouped into three basic sections:
#  1. Directives that control the operation of the Apache server process as a
#     whole (the 'global environment').
#  2. Directives that define the parameters of the 'main' or 'default' server,
#     which responds to requests that aren't handled by a virtual host.
#     These directives also provide default values for the settings
#     of all virtual hosts.
#  3. Settings for virtual hosts, which allow Web requests to be sent to
#     different IP addresses or hostnames and have them handled by the
#     same Apache server process.
#
# Configuration and logfile names: If the filenames you specify for many
# of the server's control files begin with "/" (or "drive:/" for Win32), the
# server will use that explicit path.  If the filenames do *not* begin
# with "/", the value of ServerRoot is prepended -- so "foo.log"
# with ServerRoot set to "/etc/apache2" will be interpreted by the
# server as "/etc/apache2/foo.log".
#

### Section 1: Global Environment
#
# The directives in this section ...
(more)
edit retag flag offensive close merge delete

Comments

Can you upgrade your system first?

Kai Burghardt gravatar imageKai Burghardt ( 2016-12-29 13:24:06 -0500 )edit

Is this a new setup? If so, why don't you use puppetserver instead of puppetmaster with passenger? If not: Try a restart instead of start or check what process is blocking your port and stop it (or use a different port for your apache): netstat -lntp | grep :8140.

HBlock gravatar imageHBlock ( 2017-01-06 04:57:35 -0500 )edit