Erros Ulimit e make_sock

7

Estou tentando configurar o Redmine para Ubuntu 11.10, usando este método Redmine para 11.10 , mas correu em alguns empecilho maluco em algum lugar com o apache. Ao emitir o serviço apache2 restart Eu recebo os seguintes erros.

 * Restarting web server apache2
ulimit: 88: error setting limit (Operation not permitted)
ulimit: 88: error setting limit (Operation not permitted)
(13)Permission denied: make_sock: could not bind to address 0.0.0.0:80 no listening sockets available, shutting down
Unable to open logs

Eu não consegui fazer cara ou coroa do que exatamente é continuando com o apache. Eu entendo o que o ulimit faz (monitor alocação de recursos em todo o sistema), mas não sei por que o limite não seria permitido?

Aqui está o conteúdo de / etc / apache2 / sites-available / default, onde a raiz do problema pode estar ...

<VirtualHost *:80>
    ServerAdmin [email protected]

    DocumentRoot /var/www
    <Directory />
        Options FollowSymLinks
        AllowOverride None
    </Directory>
    <Directory /var/www/>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride None
        Order allow,deny
        allow from all
    </Directory>

    ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
    <Directory "/usr/lib/cgi-bin">
        AllowOverride None
        Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
        Order allow,deny
        Allow from all
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/error.log

    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn

    CustomLog ${APACHE_LOG_DIR}/access.log combined

    Alias /doc/ "/usr/share/doc/"
    <Directory "/usr/share/doc/">
    Options Indexes MultiViews FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
    Allow from 127.0.0.0/255.0.0.0 ::1/128
    </Directory>

    # See 
    # http://www.modrails.com/documentation/Users%20guide%20Apache.html 
    # for details on what these options do.  They will lead to an increase
    # in memory usage, but significantly reduced access times.


    # Speeds up spawn time tremendously -- if your app is compatible. 
    # RMagick seems to be incompatible with smart spawning
    PassengerSpawnMethod smart


    # Keep the application instances alive longer. Default is 300 (seconds)
    PassengerPoolIdleTime 300


    # Additionally keep a copy of the Rails framework in memory. If you're 
    # using multiple apps on the same version of Rails, this will speed up
    # the creation of new RailsAppSpawners. This isn't necessary if you're
    # only running one or 2 applications, or if your applications use
    # different versions of Rails.
    RailsFrameworkSpawnerIdleTime 0

    # Just in case you're leaking memory, restart a listener 
    # after processing 5000 requests
    PassengerMaxRequests 5000


    # Only check for restart.txt et al up to once every 5 seconds, 
    # instead of once per processed request
    PassengerStatThrottleRate 5

    # Specify the minimum number of instances passenger can keep
    # while cleaning idle instances
    PassengerMinInstances 3

    <Location /redmine>
        Options Indexes -ExecCGI FollowSymLinks -MultiViews
        # AllowOverride None
        Order allow,deny
        Allow from all

        # mod_rails
        # PassengerUser redmine
        #RailsEnv edoceo_live
        RailsBaseURI /redmine

        # environment.rb
        # Redmine::Utils::relative_url_root = "/redmine"    
    </Location>

</VirtualHost>

# Then after the virtualhost is loaded, send it a request
# to initialize the redmine installation
PassengerPreStart http://2222.us/redmine

EDIT Eu tenho o log de erros trabalhando através de um pouco de sorte, aqui estão os erros que estou recebendo dentro error.log, isso pode fornecer algumas dicas.

[Wed Dec 14 12:06:09 2011] [notice] caught SIGTERM, shutting down
[Wed Dec 14 12:06:10 2011] [error] *** Passenger could not be initialized because of this error: Unable to start the Phusion Passenger watchdog because its executable (/usr/lib/phusion-passenger/agents/PassengerWatchdog) does not exist. This probably means that your Phusion Passenger installation is broken or incomplete, or that your 'PassengerRoot' directive is set to the wrong value. Please reinstall Phusion Passenger or fix your 'PassengerRoot' directive, whichever is applicable.
[Wed Dec 14 12:06:10 2011] [error] *** Passenger could not be initialized because of this error: Unable to start the Phusion Passenger watchdog because its executable (/usr/lib/phusion-passenger/agents/PassengerWatchdog) does not exist. This probably means that your Phusion Passenger installation is broken or incomplete, or that your 'PassengerRoot' directive is set to the wrong value. Please reinstall Phusion Passenger or fix your 'PassengerRoot' directive, whichever is applicable.
[Wed Dec 14 12:06:10 2011] [notice] Apache/2.2.20 (Ubuntu) Phusion_Passenger/3.0.11 PHP/5.3.6-13ubuntu3.2 with Suhosin-Patch configured -- resuming normal operations
    
por ehime 14.12.2011 / 20:58

1 resposta

8

O problema foi o culminar de erros de Permissão e o Passageiro de Phusion sendo instalado incorretamente.

O problema era que eu estava tentando executar como um "usuário" regular em vez de root. Eu consertei isso sudo'ing meu comando, ou sudo su'ing em root e executando o serviço apache2 restart. Evidentemente, reiniciar o apache2 como um usuário comum, se estiver bem, mas Redmine e Ruby exigem permissões escalonadas para executar alterações ulimit.

    
por ehime 14.12.2011 / 21:20