× Warning! This forum is in archival status. New contributions may not work.
rabbitmq-server fails to install
  • Vote Up0Vote Down VerheekVerheek
    Posts: 158Member
    When I try

    sudo apt-get install rabbitmq-server 


    it asks for a password. It doesn't seem to matter what goes there because I always get

    Quote:
    Setting up rabbitmq-server (1.7.2-1ubuntu1) ...
    Starting rabbitmq-server: TIMEOUT - check /var/log/rabbitmq/startup_{log,err}
    rabbitmq-server.
    invoke-rc.d: initscript rabbitmq-server, action "start" failed.
    dpkg: error processing rabbitmq-server (--configure):
    subprocess installed post-installation script returned error exit status 1
    Errors were encountered while processing:
    rabbitmq-server
    E: Sub-process /usr/bin/dpkg returned an error code (1)


    The log says authentication failure.

    Purged and tried again. Same thing.

    on UBUNTU Lucid updates applied

    Jeremy
  • 31 Comments sorted by
  • Vote Up0Vote Down VerheekVerheek
    Posts: 158Member
    OK the issue is actually the rabbitmq server is hanging on start-up. Played around with the hosts file as per various posts but still hanging. Any ideas?

    Jeremy
  • Vote Up0Vote Down Paul BaranowskiPaul Baranowski
    Posts: 389Member, Administrator, Sourcefabric Team
    We have install RabbitMQ on both Ubuntu 10.04 and 10.10, on multiple
    machines, without any problems. Please let us know if you find the cause of
    this....




    On Thu, Mar 24, 2011 at 2:43 PM, Verheek <airtime-dev@lists.sourcefabric.org
    > wrote:

    > OK the issue is actually the rabbitmq server is hanging on start-up.
    > Played around with the hosts file as per various posts but still hanging.
    > Any ideas?
    >
    > Jeremy
    >
    >

  • Vote Up0Vote Down VerheekVerheek
    Posts: 158Member
    It's a weird one. If I run essentially what the init script start command does:

    sudo /usr/sbin/rabbitmq-multi 1


    I get the normal sudo password prompt and then another one. After that fails I get

    Quote:
    su: Authentication failure


    This must be the password for the rabbitmq user?

    Still digging...
  • Verheek wrote on Thu, 24 March 2011 19:39
    It's a weird one. If I run essentially what the init script start command does:

    sudo /usr/sbin/rabbitmq-multi 1


    I get the normal sudo password prompt and then another one. After that fails I get

    Quote:
    su: Authentication failure


    This must be the password for the rabbitmq user?

    Still digging...


    Verheek, any luck? Have you tried this solution?:

    http://serverfault.com/questions/225795/error-when-installin g-rabbitmq-server-on-ubuntu-10-10
    Airtime Pro Hosting: http://airtime.pro
  • Vote Up0Vote Down VerheekVerheek
    Posts: 158Member
    Hi Martin,

    I took a weekend break from it. I spent a lot of Friday trying similar solutions to the one you linked to. But from what I could figure, the error is not related to the hosts file but to changing to the rabbitmq user with su.

    Quote:
    $ cat /var/log/rabbitmq/startup_err
    Password:
    su: Authentication failure


    If you dig into /var/lib/dpkg/info/rabbitmq-server.postinst, you find the above command to start the server. This is when it asks for a password. It's the same password prompt encountered when trying to install rabbitmq from the .deb

    Repairing the install also sticks at starting the server.

    Quote:
    $ sudo apt-get install -f
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
    1 not fully installed or removed.
    After this operation, 0B of additional disk space will be used.
    Setting up rabbitmq-server (1.7.2-1ubuntu1) ...
    Starting rabbitmq-server:


    If you hit <enter>,

    Quote:
    Starting rabbitmq-server: TIMEOUT - check /var/log/rabbitmq/startup_{log,err}
    rabbitmq-server.
    invoke-rc.d: initscript rabbitmq-server, action "start" failed.
    dpkg: error processing rabbitmq-server (--configure):
    subprocess installed post-installation script returned error exit status 1
    Errors were encountered while processing:
    rabbitmq-server
    E: Sub-process /usr/bin/dpkg returned an error code (1)


    The error is mentioned above.

    My next idea was to delete the rabbitmq user but it seems to be removed with

    $ sudo apt-get purge rabbitmq 


    Installing again with

    $ sudo apt-get install rabbitmq
    results in the same output as the above when -f was used.

    Jeremy
  • Vote Up0Vote Down VerheekVerheek
    Posts: 158Member
    Ok I changed the password on the rabbitmq user, ran apt-get install -f to repair the rabbitmq install, typed in that password and it started. Then I ran apt-get purge rabbitmq, typed in the password and tried again and then it uninstalled. When I install again, I'm back to the password prompt when it starts the server.

    Weird...but at least I can get it going. What is the rabbitmq user password and why is it prompting for it when starting the server?

    Jeremy
  • Vote Up0Vote Down VerheekVerheek
    Posts: 158Member
    Ok after _alot_ of digging I got this to install without changing the rabbitmq user password.

    One was this post https:// bugs.launchpad.net/ubuntu/+source/shadow/+bug/735341?comment s=all to reset the root account expiry. This allowed the --gecos option to work when adding a user in the rabbitmq.postinst script.

    The other was this thread http://ubuntuforums.org/showthread.php?t=819198 about creating accounts with blank passwords. This allowed
    /etc/init.d/rabbitmq-server start
    to work by typing
    sudo sed -i 's/nullok_secure/nullok/' /etc/pam.d/common-auth


    Studying rabbitmq.postinst, the password is blank. Changing it to a non-blank password or permitting blank passwords in PAM allows the server to switch to the rabbitmq user and start.

    The question is why there a difference between my setup and a clean install that requires these steps?

  • Jeremy,

    Luckily you seem to be the only user to far to experience this issue, so let's hope this is an isolated case.

    Quote:
    The question is why there a difference between my setup and a clean install that requires these steps?


    So your system isn't a clean install or it is?
    Airtime Pro Hosting: http://airtime.pro
  • Vote Up0Vote Down VerheekVerheek
    Posts: 158Member
    Well it was a clean install last fall ... Smile

    But a lot of experimenting and playing around has occurred while developing a web radio host.

    Does Lucid allow for null passwords by default in PAM? This option may have been removed by a hardening blog I followed at some point. That's what this particular issue boiled down to. I posted a "bug" in Ubuntu but it may not be considered one although I think there needs to be a modification so that the install does use a static password for the rabbitmq user.

    I had a copy of this VM with the same issue. After adding the null_ok option in PAM it also allowed the rabbitmq install to work normally. Case closed.

    Jeremy
  • Vote Up0Vote Down VerheekVerheek
    Posts: 158Member
    I have a similar problem now trying to install the latest airtime-dev (git pull origin master). I get a password each time it tries to create the airtime user. I have changed the postgres user password to postgres so I can at least get past the password prompt but the install still fails in that area.

    I don't want to use null_ok in pam.d because of security but would prefer nullok_secure which apparently only allows blank passwords for terminals listed in securetty.

    Quote:
    mediashout@MediaStation:/usr/local/src/Airtime/install$ sudo php airtime-install.php

    ******************************** Install Begin *********************************
    New Airtime Install.
    * Creating INI files
    * Installing PHP code to /var/www/airtime
    * Installing binaries to /usr/lib/airtime
    * Initializing INI files
    * Airtime Version: 1.8.2

    *** Database Installation ***
    * Creating Airtime database user
    * Database user 'airtime' already exists.
    * Creating Airtime database
    Password:
    createdb: database creation failed: ERROR: role "airtime" does not exist
    * Database 'airtime' already exists.
    DB Error: connect failed
    [nativecode=pg_connect(): Unable to connect to PostgreSQL server: FATAL: password authentication failed for user "airtime"
    FATAL: password authentication failed for user "airtime"] ** pgsql(pgsql)://airtime:PASSWORD@localhost/airtime
    Database connection problem.
    Check if database 'airtime' exists with corresponding permissions.
    * Storage directory setup
    * Skipping directory already exists: /srv/airtime
    * Skipping directory already exists: /srv/airtime/stor
    * Giving Apache permission to access /srv/airtime/stor
    * Creating /usr/bin symlinks
    * Installing airtime-import
    * Installing airtime-clean-storage
    * Installing airtime-update-db-settings
    * Installing airtime-check-system
    * Creating logs directory /var/log/airtime

    *** Pypo Installation ***
    Starting daemontool script pypo
    Starting daemontool script pypo-liquidsoap
    Checking and removing any existing pypo processes
    Checking for user pypo
    Creating user pypo
    Creating directory /var/log/airtime/pypo
    Creating directory /var/log/airtime/pypo-liquidsoap
    Creating directory /usr/lib/airtime/pypo/bin
    Creating directory /var/tmp/airtime/pypo/cache/
    Creating directory /var/tmp/airtime/pypo/files/
    Creating directory /var/tmp/airtime/pypo/tmp/
    Installing 32-bit liquidsoap binary
    Copying directory /usr/local/src/Airtime/python_apps/pypo to /usr/lib/airtime/pypo/bin
    Copying directory /usr/local/src/Airtime/python_apps/api_clients to /usr/lib/airtime/pypo/api_clients
    Setting permissions
    Creating symbolic links
    Installing pypo daemon
    Creating directory /etc/service/pypo
    Creating directory /etc/service/pypo/log
    Installing liquidsoap daemon
    Creating directory /etc/service/pypo-liquidsoap
    Creating directory /etc/service/pypo-liquidsoap/log
    Waiting for processes to start...
    /etc/service/pypo: up (pid 10793) 4 seconds

    /etc/service/pypo-liquidsoap: up (pid 10795) 4 seconds


    *** Recorder Installation ***
    Starting daemontool script recorder
    Checking and removing any existing recorder processes
    Checking for user pypo
    User already exists.
    Creating temporary media storage directory
    Creating directory /var/tmp/airtime/show-recorder/
    Creating log directories
    Creating directory /var/log/airtime/show-recorder
    Copying directory /usr/local/src/Airtime/python_apps/show-recorder to /usr/lib/airtime/show-recorder
    Setting permissions
    Creating symbolic links
    Installing recorder daemon
    Creating directory /etc/service/recorder
    Creating directory /etc/service/recorder/log
    Waiting for processes to start...
    /etc/service/recorder: up (pid 11032) 0 seconds


    *** Verifying Correct System Environment ***
    OS = Ubuntu 10.04.2 LTS
    AIRTIME_CONFIG_FILES = OK
    POSTGRESQL_DATABASE = FAILED
    PYTHON_KOMBU_VERSION = 1.0.7
    PYTHON_POSTER_VERSION = 0.8.0
    RABBITMQ_SERVER = OK
    AIRTIME_VERSION_URL = http://localhost:80/api/version/api_key/%%api_key%%
    APACHE_CONFIGURED = YES
    AIRTIME_VERSION = Could not contact server
    PLAYOUT_ENGINE_PROCESS_ID = 11058
    PLAYOUT_ENGINE_RUNNING_SECONDS = 1
    -- WARNING! It looks like the playout engine is continually restarting.
    -- /etc/service/pypo: up (pid 11058) 1 seconds
    -- @400000004de6494d074a9d84 Traceback (most recent call last):
    -- @400000004de6494d074ad81c File "/usr/lib/airtime/pypo/bin/pypo-cli.py", line 118, in <module>
    -- @400000004de6494d074b60d4 if not g.selfcheck():
    -- @400000004de6494d074bb6c4 File "/usr/lib/airtime/pypo/bin/pypo-cli.py", line 62, in selfcheck
    -- @400000004de6494d074c0cb4 return self.api_client.is_server_compatible()
    -- @400000004de6494d074ca50c File "/usr/lib/airtime/pypo/api_clients/api_client.py", line 193, in is_server_compatible
    -- @400000004de6494d074d4534 version = self.__get_airtime_version(verbose)
    -- @400000004de6494d074d9354 File "/usr/lib/airtime/pypo/api_clients/api_client.py", line 156, in __get_airtime_version
    -- @400000004de6494d074e143c if e[1] == 401:
    -- @400000004de6494d074e6e14 IndexError: tuple index out of range
    LIQUIDSOAP_PROCESS_ID = 10835
    LIQUIDSOAP_RUNNING_SECONDS = 19
    ICECAST_PROCESS_ID = 1961

    -- There appears to be problems with your setup. Please visit
    -- http://wiki.sourcefabric.org/x/HABQ for troubleshooting info.

    ******************************* Install Complete *******************************


    Jeremy
  • Vote Up0Vote Down VerheekVerheek
    Posts: 158Member
    sudo sed -i 's/nullok_secure/nullok/' /etc/pam.d/common-auth

    sudo passwd -d postgres blanked the password for postgres

    Now the install works.

  • Vote Up0Vote Down VerheekVerheek
    Posts: 158Member
    More work on this because I didn't want nullok in my common-auth as it's less secure. What I found was that my su file in /etc/pam.d was missing. Restoring this from a fresh Ubuntu Lucid install fixed the password prompt during install when creating users with blank passwords.

    Re: http://wiki.sourcefabric.org/display/CC/FAQ+and+Support

    Quote:
    RabbitMQ won't start on Airtime 1.7.0+

    Try the creating /etc/rabbitmq/rabbitmq.conf with these lines:

    NODENAME=rabbit@localhost
    NODE_IP_ADDRESS=127.0.0.1

    Another thing to try (warning: this was sent in by a user and not tested, see: http://forum.sourcefabric.org/index.php?t=rview&goto=112 62#msg_11262):

    sudo sed -i 's/nullok_secure/nullok/' /etc/pam.d/common-auth
    sudo passwd -d postgres

    then blank the password for postgres.
  • Vote Up0Vote Down Paul BaranowskiPaul Baranowski
    Posts: 389Member, Administrator, Sourcefabric Team
    Thanks, I updated the wiki.


    Paul Baranowski
    CTO, Sourcefabric, http://sourcefabric.org

    +1 (416) 832-6436 (Cell)
    Skype: paulbaranowski
    720 Bathurst St. / Suite 203 / Toronto / ON / M5S 2R4 / Canada



    On Thu, Jun 30, 2011 at 10:25 PM, Verheek <
    airtime-dev@lists.sourcefabric.org> wrote:

    > **
    > More work on this because I didn't want nullok in my common-auth as it's
    > less secure. What I found was that my su file in /etc/pam.d was missing.
    > Restoring this from a fresh Ubuntu Lucid install fixed the password prompt
    > during install when creating users with blank passwords.
    >
    > Re: http://wiki.sourcefabric.org/display/CC/FAQ+and+Support
    >
    > Quote:
    >
    > RabbitMQ won't start on Airtime 1.7.0+
    >
    > Try the creating /etc/rabbitmq/rabbitmq.conf with these lines:
    >
    > NODENAME=rabbit@localhost
    > NODE_IP_ADDRESS=127.0.0.1
    >
    > Another thing to try (warning: this was sent in by a user and not tested,
    > see: http://forum.sourcefabric.org/index.php?t=rview&goto=112 62#msg_11262< http://forum.sourcefabric.org/index.php?t=rview&goto=112 62#msg_11262>
    > ):
    >
    >
    > sudo sed -i 's/nullok_secure/nullok/' /etc/pam.d/common-auth
    > sudo passwd -d postgres
    >
    > then blank the password for postgres.
    >
    >
    >

  • Hi Paul and all the list!

    I was migrated from Campcaster 1.6 to Liquidsoap, because CC was has an
    issue with using without a physical audio board. So, now I am running LS
    and I suppose in the next few months I will back to the new Airtime again!.

    So, my question is: What is the real use of RabbitMQ into Airtime? I
    can't figured, but I am interested to known the use.

    Regards
    Normando Hall
  • Vote Up0Vote Down Paul BaranowskiPaul Baranowski
    Posts: 389Member, Administrator, Sourcefabric Team
    RabbitMQ is used to pass messages from the PHP interface to the audio
    playout backend (pypo).


    Paul Baranowski
    CTO, Sourcefabric, http://sourcefabric.org

    +1 (416) 832-6436 (Cell)
    Skype: paulbaranowski
    720 Bathurst St. / Suite 203 / Toronto / ON / M5S 2R4 / Canada



    On Sat, Jul 2, 2011 at 12:07 AM, Normando Hall <
    airtime-dev@lists.sourcefabric.org> wrote:

    > **
    > Hi Paul and all the list!
    >
    > I was migrated from Campcaster 1.6 to Liquidsoap, because CC was has an
    > issue with using without a physical audio board. So, now I am running LS
    > and I suppose in the next few months I will back to the new Airtime again!.
    >
    > So, my question is: What is the real use of RabbitMQ into Airtime? I
    > can't figured, but I am interested to known the use.
    >
    > Regards
    > Normando Hall
    >
    >

  • Thanks Paul!

    El 04/07/2011 04:21 p.m., Paul Baranowski escribió:
    > RabbitMQ is used to pass messages from the PHP interface to the audio
    > playout backend (pypo).
    >
    >
    > Paul Baranowski
    > CTO, Sourcefabric, http://sourcefabric.org
    >
    > +1 (416) 832-6436 (Cell)
    > Skype: paulbaranowski
    > 720 Bathurst St. / Suite 203 / Toronto / ON / M5S 2R4 / Canada
    >
    >
    >
    > On Sat, Jul 2, 2011 at 12:07 AM, Normando Hall <
    > airtime-dev@lists.sourcefabric.org
    > <mailto:airtime-dev@lists.sourcefabric.org>> wrote:
    >
    > > **
    > > Hi Paul and all the list!
    > >
    > > I was migrated from Campcaster 1.6 to Liquidsoap, because CC was has an
    > > issue with using without a physical audio board. So, now I am running LS
    > > and I suppose in the next few months I will back to the new Airtime
    > again!.
    > >
    > > So, my question is: What is the real use of RabbitMQ into Airtime? I
    > > can't figured, but I am interested to known the use.
    > >
    > > Regards
    > > Normando Hall
    > >
    > >
    >
    >
    >

  • Hello,

    I've experienced the same Permission Denied error.

    $ /etc/init.d/rabbitmq-server start
    Starting rabbitmq-server: sh: /var/log/rabbitmq/startup_log: Permission denied
    FAILED - check /var/log/rabbitmq/startup_{log, _err}
    rabbitmq-server.
    

    I tried
    - Changing nullok_secure values, but i missed the point and messed with the ssh authentification
    - Creating the rabbitmq.conf file, with no results
    - Update the postgres password, with no results as well.

    Many thanks.
  • Vote Up0Vote Down VerheekVerheek
    Posts: 158Member
    What does /var/log/rabbitmq/startup_{log, _err} show?
  • Thanks Verheek ! I'll check that and right now.
  • "startup_err" says :

    /usr/lib/rabbitmq/bin/rabbitmq-server: line 88: 28685 Killed erl -pa "$RABBITMQ_EBIN_ROOT" -noinput -hidden -s rabbit_prelaunch -sname rabbitmqprelaunch$$ -$
  • Vote Up0Vote Down VerheekVerheek
    Posts: 158Member
    I get this error too if I run
    $ /etc/init.d/rabbitmq-server start
    as a non-root user.

    Try:
    $ sudo service rabbitmq-server start


    The underlying program rabbitmq-multi has to be started as root or rabbitmq. Starting the service with sudo allows it to do the rest with the script.





  • i figured it out make sure your host name is setup correctly if setup at all it should look like this

    127.0.0.1 example.domain.com example

    If not

    $ nano /etc/hosts
    Post edited by Stephen Langley at 2012-03-20 18:22:30
  • sorry doubled some how
    Post edited by Desmond at 2012-07-16 20:46:15
  • well long story short... same issue... tried the host file solution, well nothing to do there since it is correct on my end. Also thought it might be a permission issue with rabbitmq but it wasnt. However research shows this to be an issue over at rabbitmq developers since it has to do with invoking the server then applying the conf file, well something to that effect ... this appear to be a major kick in the but ... and a real monkey wrench in my plans.... since it messes up airtime in many ways... 

    I have a dev system in vbox which is fine... i copied over the conf(s) changed the hostnames and etc... guess what... same issue..

    Might be some other issue(s) too... perhaps python/perl/php/etc update from canonical/ubuntu... maybe not.. anyway..

    in the post above i attached my log if it helps somehow...
    Well I guess i'll need to figure out an alternative for my project/site for now..... but I've been following airtime for sometime very promising.... cant wait for a fix..
    Post edited by Desmond at 2012-07-16 21:06:10
  • Well I figured out the issue.. After a short break and a good nights reset, I noticed that there was a so called ghost operation of rabbitmq as well for some reason the hidden backup file of its conf file... Also a bit of the issue was my local firewall... disabling the fw add deleting the ~rabbit... conf. terminating the running process, purged apt-get removed  autoclean and the such and last but not least .. which was a pain for my clients a shutdown and cold boot. also a side not ensure that your interface file (server lockdown procedures) are not a part of the issue... since that was a part  of my issue as well... forgot too lighten up a bit... but after all this re install and bamm.... just works fine... I hope this might be of help for those who do not want to do or go through a whole fresh re-install..... 
  • Reply to @desmond+m:

    Glad to hear you got it sorted out, and even more glad to hear it wasn't an Airtime issue :)
    Airtime Pro Hosting: http://airtime.pro
  • Hey no problem I am quite glad myself .... when it was all done and said a sigh of relief. 
    Now a few other things to do. YES. finally.
    :-)
  • This is a problem related to /etc/host file not with rabbitmq-server. This file (/etc/host) is not configure properly.

    Just open the file :

    $ sudo -s

    vim /etc/hosts

    and check line start with "127.0.0.1" in this file ( usually it's located on the top of the file)

    make it like as below:

    127.0.0.1 your host name

    save and quit.

    now restart rabbitmq-server and certainly it should work.
  • Hi!
    I got the same error when reinstalling rabbitmq-server in Ubuntu
    command
    sudo apt-get purge rabbitmq-server
    made my day
  • Vote Up0Vote Down Albert FRAlbert FR
    Posts: 1,978Member, Airtime Moderator
    with the last version of airtime have a 12.04 ubuntu is minimum recommended
    if you are still in 10.4, upgrade

  • Just for be sure, take a look to your local network

    # ip add

    If there's no "lo" network, the you should enable it:

    # ifconfig lo up

    Then restart the server again and let's see if it works again now

    # systemctl start rabbitmq-server