rabbitmq / erlang-rpm

Latest Erlang/OTP releases packaged as a zero dependency RPM, just enough for running RabbitMQ
https://rabbitmq.com/install-rpm.html
Other
550 stars 117 forks source link

RabbitMQ 3.6.10 fails to load asn1 #54

Closed mattzink closed 7 years ago

mattzink commented 7 years ago

For those landing here from Google/Baidu/etc

asn1 is an Erlang module for ASN.1 encoding. It must be available in the Erlang installation for TLS to work.

This package includes asn1 but OpenSSL is an implicit dependency. In other words, it is operator's responsibility to make sure a compatible OpenSSL version is installed in the system.

Original issue

This is my first time attempt to use this package, so this issue could be user error...

On CentOS 7 (1611), if I run the following commands:

> yum install https://github.com/rabbitmq/erlang-rpm/releases/download/v19.3.6.2/erlang-19.3.6.2-1.el7.centos.x86_64.rpm
> yum install http://www.rabbitmq.com/releases/rabbitmq-server/v3.6.10/rabbitmq-server-3.6.10-1.el7.noarch.rpm
> systemctl enable rabbitmq-server.service
> systemctl start rabbitmq-server.service

I get the following error: Job for rabbitmq-server.service failed because the control process exited with error code. See "systemctl status rabbitmq-server.service" and "journalctl -xe" for details.

Running 'journalctl -xe' returns:

Aug 01 19:54:07 centos7-dev rabbitmq-server[1419]: BOOT FAILED
Aug 01 19:54:07 centos7-dev rabbitmq-server[1419]: ===========
Aug 01 19:54:07 centos7-dev rabbitmq-server[1419]: Error description:
Aug 01 19:54:07 centos7-dev rabbitmq-server[1419]: {error,{"no such file or directory","asn1.app"}}
Aug 01 19:54:07 centos7-dev rabbitmq-server[1419]: Log files (may contain more information):
Aug 01 19:54:07 centos7-dev rabbitmq-server[1419]: /var/log/rabbitmq/rabbit@localhost.log
Aug 01 19:54:07 centos7-dev rabbitmq-server[1419]: /var/log/rabbitmq/rabbit@localhost-sasl.log
Aug 01 19:54:07 centos7-dev rabbitmq-server[1419]: Stack trace:
Aug 01 19:54:07 centos7-dev rabbitmq-server[1419]: [{app_utils,load_applications,2,[{file,"src/app_utils.erl"},{line,100
Aug 01 19:54:07 centos7-dev rabbitmq-server[1419]: {app_utils,load_applications,1,[{file,"src/app_utils.erl"},{line,36}]
Aug 01 19:54:07 centos7-dev rabbitmq-server[1419]: {rabbit,start_apps,1,[{file,"src/rabbit.erl"},{line,472}]},
Aug 01 19:54:07 centos7-dev rabbitmq-server[1419]: {rabbit,broker_start,0,[{file,"src/rabbit.erl"},{line,295}]},
Aug 01 19:54:07 centos7-dev rabbitmq-server[1419]: {rabbit,start_it,1,[{file,"src/rabbit.erl"},{line,417}]},
Aug 01 19:54:07 centos7-dev rabbitmq-server[1419]: {init,start_em,1,[]},
Aug 01 19:54:07 centos7-dev rabbitmq-server[1419]: {init,do_boot,3,[]}]
Aug 01 19:54:08 centos7-dev rabbitmq-server[1419]: {"init terminating in do_boot",{error,{"no such file or directory","a
Aug 01 19:54:08 centos7-dev rabbitmq-server[1419]: init terminating in do_boot ()
Aug 01 19:54:08 centos7-dev rabbitmq-server[1419]: Crash dump is being written to: erl_crash.dump...done
Aug 01 19:54:08 centos7-dev systemd[1]: rabbitmq-server.service: main process exited, code=exited, status=1/FAILURE
Aug 01 19:54:09 centos7-dev rabbitmqctl[1712]: Stopping and halting node rabbit@localhost
Aug 01 19:54:09 centos7-dev rabbitmqctl[1712]: Error: unable to connect to node rabbit@localhost: nodedown
Aug 01 19:54:09 centos7-dev rabbitmqctl[1712]: DIAGNOSTICS
Aug 01 19:54:09 centos7-dev rabbitmqctl[1712]: ===========
Aug 01 19:54:09 centos7-dev rabbitmqctl[1712]: attempted to contact: [rabbit@localhost]
Aug 01 19:54:09 centos7-dev rabbitmqctl[1712]: rabbit@localhost:
Aug 01 19:54:09 centos7-dev rabbitmqctl[1712]: * connected to epmd (port 4369) on localhost
Aug 01 19:54:09 centos7-dev rabbitmqctl[1712]: * epmd reports: node 'rabbit' not running at all
Aug 01 19:54:09 centos7-dev rabbitmqctl[1712]: other nodes on localhost: ['rabbitmq-cli-22']
Aug 01 19:54:09 centos7-dev rabbitmqctl[1712]: * suggestion: start the node
Aug 01 19:54:09 centos7-dev rabbitmqctl[1712]: current node details:
Aug 01 19:54:09 centos7-dev rabbitmqctl[1712]: - node name: 'rabbitmq-cli-22@centos7-dev'
Aug 01 19:54:09 centos7-dev rabbitmqctl[1712]: - home dir: .
Aug 01 19:54:09 centos7-dev rabbitmqctl[1712]: - cookie hash: nnnK8anSi9mGlIL2zCluRg==
Aug 01 19:54:09 centos7-dev systemd[1]: Failed to start RabbitMQ broker.
mattzink commented 7 years ago

Looks like others are seeing this on MacOS as well: https://lists.rabbitmq.com/pipermail/rabbitmq-discuss/2013-July/028565.html

michaelklishin commented 7 years ago

Thank you for your time.

Team RabbitMQ uses GitHub issues for specific actionable items engineers can work on. This assumes two things:

  1. GitHub issues are not used for questions, investigations, root cause analysis, discussions of potential issues, etc (as defined by this team)
  2. We have a certain amount of information to work with

We get at least a dozen of questions through various venues every single day, often quite light on details. At that rate GitHub issues can very quickly turn into a something impossible to navigate and make sense of even for our team. Because of that questions, investigations, root cause analysis, discussions of potential features are all considered to be mailing list material by our team. Please post this to rabbitmq-users.

Getting all the details necessary to reproduce an issue, make a conclusion or even form a hypothesis about what's happening can take a fair amount of time. Our team is multiple orders of magnitude smaller than the RabbitMQ community. Please help others help you by providing a way to reproduce the behavior you're observing, or at least sharing as much relevant information as possible on the list:

Feel free to edit out hostnames and other potentially sensitive information.

When/if we have enough details and evidence we'd be happy to file a new issue.

Thank you.

michaelklishin commented 7 years ago

ans1, a part of the TLS implementation in Erlang, cannot be loaded. It is available in this RPM. There can be an underlying problem or a different Erlang version coming first in PATH. In any case, this is mailing list material at this point.

michaelklishin commented 7 years ago

@mattzink this package does not cover MacOS in any way. 4 year old posts are more likely than not to be irrelevant.

michaelklishin commented 7 years ago

@mattzink have you noticed the section on implicit OpenSSL dependency in the README? If it's missing then I'd expect some TLS-related modules to not be available.

I have OpenSSL 1.0.1e on my CentOS 7 installation and cannot reproduce this with the steps provided. We have several [RabbitMQ RPM package] test suites that use this package to provision Erlang.

smekalayahoo commented 7 years ago

To anyone still having this issue, try installing the erlang-asn1 package to resolve the issue.

Gsantomaggio commented 7 years ago

sorry @smekalayahoo but it is not properly correct. As @michaelklishin said, the asn1 library is already in this Erlang rpm package, see here

For this package you don't have to install erlang-asn1 manually.

This error:{error,{"no such file or directory","asn1.app"}} can be caused for this reason or this

Most likely you solved in this way because you are using an Erlang installation from a different PATH.

raulk89 commented 6 years ago

I am getting this same error, when trying to downgrade erlang version on same host (centos 7.5).

What I did:

yum remove erlang* (this also removes rabbitmq-server)

I also deleted /var/lib/rabbitmq/mnesia directory Then I installed rabbitmq zero dependency erlang rpm from github, 20.3 version (previously I had 21.0.2 from rabbitmq zero dependency rpm), and then installed rabbitmq-server 3.6.6 (tried 3.7.6 ja 3.7.7 also))

I had used erlang.repo in past to upgrade erlang, but recently I have started using rabbitmq zero dependency rpm. So I am thinking that this problem is because, I had used erlang rpm from their own repository. _name=Centos $releasever - $basearch - Erlang Solutions _baseurl=https://packages.erlang-solutions.com/rpm/centos/$releasever/$basearch__

I have checked suggested solutions:

How can I check this first solution, about that something is wrong in PATH..? Openssl is present. rpm -qa | grep openssl xmlsec1-openssl-1.2.20-7.el7_4.x86_64 openssl-libs-1.0.2k-12.el7.x86_64 openssl-1.0.2k-12.el7.x86_64

Best way to test this, would be to:

  1. First install erlang from erlang repository (version 21 for example). 1.1 Can also install rabbitmq-server, to see it works.
  2. Then remove both (yum remove erlang*)
  3. Install erlang from rabbitmq zero dependency rpm (version 21)
  4. Install rabbitmq-server (3.6.6, 3.7.6 or 3.7.7 <- these are the ones, that I have tested it)
  5. Remove everything (erlang + rabbitmq-server, also delete mnesia directory)
  6. Try to install older version of zero dependecy erlang from rabbitmq (version 20.3 for example)
  7. Install rabbitmq-server (3.6.6, 3.7.6 or 3.7.7 <- these are the ones, that I have tested it)
  8. systemctl start rabbitmq-server --> ERROR: throw:{error,{"no such file or directory","asn1.app"}}

I am looking to get this to work, I would prefer not to create a new host for rabbitmq to get this sorted out.

Thanks.

Regards Raul

michaelklishin commented 6 years ago

This is not a support forum. Please post your questions to rabbitmq-users, our public mailing list.

RabbitMQ versions prior to 3.7.7 won’t run on OTP 21, and so won’t CLI tools, which will result in package [un]installation failures since systemd will fail to stop the service.