Broken vanilla RabbitMQ installation on Windows 10 - rabbitmq

I installed Erlang and RabbitMQ as instructed at https://www.rabbitmq.com/install-windows.html. And yes I installed Erlang as Admin user.
But somehow the installation is broken.
rabbitmqctl.bat status
gives
Status of node rabbit#K21788 ...
Error: unable to perform an operation on node 'rabbit#K21788'. Please see diagnostics information and suggestions below.
...
DIAGNOSTICS
===========
attempted to contact: [rabbit#K21788]
rabbit#K21788:
* connected to epmd (port 4369) on K21788
* epmd reports: node 'rabbit' not running at all
other nodes on K21788: ['RabbitMQ']
* suggestion: start the node
Current node details:
* node name: 'rabbitmqcli-1196-rabbit#K21788'
* effective user's home directory: H:\
* Erlang cookie hash: /xiNRP3ci4Ddvw0WKmq9Dw==
Strange, de node default name seams to be wrong.
So I tried:
rabbitmqctl.bat -n RabbitMQ status
Status of node RabbitMQ#K21788 ...
Error:
{:undef, [{:rabbit, :status, [], []}, {:rpc, :"-handle_call_call/6-fun-0-", 5, [file: 'rpc.erl', line: 197]}]}
As a RabbitMQ rookie I feal pretty much lost here. On my Macbook this just works without any problems.
Any ideas how to fix this?

After lots of trial and error I found this workaround:
Stop the preinstalled windows service "RabbitMQ".
If you want you can disable autostart as well.
Open a cmd-Shell.
Go to C:\Program Files\RabbitMQ Server\rabbitmq_server-3.7.14\sbin
Start the server with rabbitmq-server.bat.
Now RabbitMQ starts with the correct defaults. All my Java Examples from the tutorial work as expected.
I don't know why this works and the preinstalled Service does not. But for my dev environment this solution is fine.

Related

Hyperledger Fabric error: "TLS: bad certificate server" when installing chaincode

I'm just starting learning HLF, and I have an error while following tutorial from the docs: link
I downloaded fabric-samples using this command (replaced bit.ly link with the destination):
curl -sSL https://raw.githubusercontent.com/hyperledger/fabric/master/scripts/bootstrap.sh | bash -s -- 2.2.2 1.4.9
I run logspout in one terminal and try to execute peer lifecycle chaincode install basic.tar.gz in another one, and this is the result i get
Error: failed to retrieve endorser client for install: endorser client
failed to connect to localhost:7051: failed to create new connection:
context deadline exceeded
Log presented by Logspout:
peer0.org1.example.com|2022-03-15 13:03:24.452 UTC [core.comm]
ServerHandshake -> ERRO 04a Server TLS handshake failed in 2.650245ms
with error remote error: tls: bad certificate server=PeerServer
remoteaddress=172.22.0.1:61126
I set the envs in terminal as instructed in the docs, and I checked that CORE_PEER_TLS_ROOTCERT_FILE variable points to an existing file. The content of the file is the same as on the container.
What I tried to do:
download fabric-samples again and redo all the setup with copy-pasting the commands directly from docs
Do you have any suggestions where I can look for an issue?
I resolved the problem, I was using peer version 2.2.1 from previous experiments, it probably collided with FABRIC_CFG_PATH

Unable to provision rabbitmq using chef and testkitchen

I am trying to install an old version of RabbitMQ using Chef (cookbook 'rabbitmq', '~> 5.8.5') and Kitchen, below my configuration:
Attributes
#Erlang
default['erlang']['install_method'] = 'source'
default['erlang']['source']['version']='R13B03'
default['erlang']['source']['checksum']='e7c46c8b2778f22064a3b369c1a1b572a1cc0e8a2198166858d4b9a1b488d662'
#RabbitMQ
default['rabbitmq']['erlang']['enabled'] = true
default['rabbitmq']['version'] = "3.4.4"
default['rabbitmq']['rpm_package'] ='rabbitmq-server-3.4.4-1.noarch.rpm'
Recipe:
include_recipe 'rabbitmq::default'
When I run kitchen converge, I am getting the following exception:
Running handlers:
[2020-08-22T22:20:07+00:00] ERROR: Running exception handlers
Running handlers complete
[2020-08-22T22:20:07+00:00] ERROR: Exception handlers complete
Chef Infra Client failed. 9 resources updated in 06 minutes 26 seconds
[2020-08-22T22:20:07+00:00] FATAL: Stacktrace dumped to /tmp/kitchen/cache/chef-stacktrace.out
[2020-08-22T22:20:07+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2020-08-22T22:20:07+00:00] FATAL: Mixlib::ShellOut::ShellCommandFailed: rpm_package[/tmp/kitchen/cache/rabbitmq-server-3.4.4-1.noarch.rpm] (rabbitmq::default line 224) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of ["rpm", "-i", "/tmp/kitchen/cache/rabbitmq-server-3.4.4-1.noarch.rpm"] ----
STDOUT:
STDERR: warning: /tmp/kitchen/cache/rabbitmq-server-3.4.4-1.noarch.rpm: Header V4 DSA/SHA1 Signature, key ID 056e8e56: NOKEY
error: Failed dependencies:
erlang >= R13B-03 is needed by rabbitmq-server-3.4.4-1.noarch
---- End output of ["rpm", "-i", "/tmp/kitchen/cache/rabbitmq-server-3.4.4-1.noarch.rpm"] ----
Ran ["rpm", "-i", "/tmp/kitchen/cache/rabbitmq-server-3.4.4-1.noarch.rpm"] returned 1
But when I logged in to the VM, I can see erlang is installed:
[vagrant#kitchen-rmq-server-centos-7 ~]$ erl
Erlang R13B03 (erts-5.7.4) [source] [64-bit] [rq:1] [async-threads:0] [hipe] [kernel-poll:false]
Eshell V5.7.4 (abort with ^G)
1>
And it is the same version required by RMQ (R13B03)
Any idea how to solve this issue?
Edit: to replicate the issue https://github.com/Proximator/chef-rmq
Firstly, we have to make sure erlang is installed by the rabbitmq cookbook, and not by any other means. This is the note found on Chef supermarket for rabbitmq cookbook:
The packages are cannot be installed alongside with other Erlang packages, for example, those from standard Debian repositories or Erlang Solutions.
To make sure that the Erlang cookbook is not used by rabbitmq::default
Also, there is a compatibility matrix of RabbitMQ and Erlang versions. RabbitMQ 3.7.0 being the lowest supported version, for which the lowest compatible Erlang version is 19.3.
There are zero dependency Erlang RPMs "just enough to run RabbitMQ" as documented here:
https://github.com/rabbitmq/erlang-rpm
For example - to install RabbitMQ 3.7.x with the compatible Erlang 19.3.x:
You should have these attributes:
default['rabbitmq']['erlang']['enabled'] = true
default['rabbitmq']['version'] = '3.7.6'
default['rabbitmq']['erlang']['yum']['baseurl'] = 'https://dl.bintray.com/rabbitmq-erlang/rpm/erlang/19/el/7'
default['rabbitmq']['erlang']['version'] = '19.3.6.13'
Then include below recipes:
include_recipe 'rabbitmq::erlang_package'
include_recipe 'rabbitmq::default'

conda install in Julia fails because of SSL on windows 10

conda install xxx fails with the following error:
SSLError(MaxRetryError('HTTPSConnectionPool(host=\'repo.anaconda.com\',
port=443): Max retries exceeded with url:
/pkgs/main/win-64/current_repodata.json (Caused by
SSLError(SSLError("bad handshake: Error([(\'SSL routines\',
\'tls_process_server_certificate\', \'certificate verify
failed\')])")))'))
Maybe there must be something very subtle causing the trouble in my environment but I really have no idea.
It used to work but after I reinstall Windows 10 image, the issue began to appear.
It is on Windows 10. Conda version is 4.7.12. My .condarc is placed in %USERPROFILE% and looks like:
channels:
- defaults
show_channel_urls: true
allow_other_channels: true
proxy_servers:
https: https://x.x.x.x:8080
ssl_verify: false
All available advice over the Internet for the above error tell that ssl_verify set to false is enough.
Where else should I take a look into?
EDIT:
I found some useful info at:
https://stackoverflow.com/a/56717433/7341479
It solves the issue for running conda install Anaconda Powershell opened in Admin. but it still remains for when I run pkg build PyCall in Julia

Rabbitmq installation error : Applying plugin configuration to rabbit#... failed. * Could not contact node rabbit#

I am new to RabbitMq .I am installing the rabbitmq on my system .while running this command rabbitmq-plugins enable rabbitmq_management i am getting an error like
'call "C:\Program Files\erl7.2.1\bin\erl.exe" -A0 -noinput -boot start_clean -ev
al "net_kernel:start([list_to_atom(""rabbit-gethostname-"" ++ os:getpid()), shor
tnames]), [_, H] = string:tokens(atom_to_list(node()), ""#""), io:format(""~s~n"
", [H]), init:stop()."' is not recognized as an internal or external command,
operable program or batch file.
Plugin configuration unchanged.
Applying plugin configuration to rabbit#... failed.
* Could not contact node rabbit#.
Changes will take effect at broker restart.
* Options: --online - fail if broker cannot be contacted.
--offline - do not try to contact broker.
Can any one help me to solve this error ?
try to reinstall erlang and check Microsoft's DLL Component.

RabbitMQ server error

UPDATED error message
I am getting a BOOT FAILED error every time I try to start the rabbitmq server. Does anybody know how I can fix this? I have attached the error message. I have tried a few different things including uninstalling and reinstalling it and am now getting a new error message, but am at a loss for what to try next. Any suggestions are much appreciated! Thank you!!
BOOT FAILED
===========
Error description:
{error,
{schema_integrity_check_failed,
[{table_missing,rabbit_exchange_serial},
{table_missing,rabbit_runtime_parameters},
{table_missing,rabbit_durable_queue},
{table_missing,rabbit_queue},
{table_missing,gm_group},
{table_missing,mirrored_sup_childspec}]}}
Log files (may contain more information):
/usr/local/var/log/rabbitmq/rabbit#localhost.log
/usr/local/var/log/rabbitmq/rabbit#localhost-sasl.log
Stack trace:
[{rabbit_mnesia,ensure_schema_integrity,0,
[{file,"src/rabbit_mnesia.erl"},{line,519}]},
{rabbit_mnesia,init_db,3,[{file,"src/rabbit_mnesia.erl"},{line,450}]},
{rabbit_mnesia,init_db_and_upgrade,3,
[{file,"src/rabbit_mnesia.erl"},{line,458}]},
{rabbit_mnesia,init,0,[{file,"src/rabbit_mnesia.erl"},{line,99}]},
{rabbit,'-run_boot_step/1-lc$^1/1-1-',1,
[{file,"src/rabbit.erl"},{line,488}]},
{rabbit,run_boot_step,1,[{file,"src/rabbit.erl"},{line,487}]},
{rabbit,'-start/2-lc$^0/1-0-',1,[{file,"src/rabbit.erl"},{line,453}]},
{rabbit,start,2,[{file,"src/rabbit.erl"},{line,453}]}]
BOOT FAILED
===========
Error description:
{could_not_start,rabbit,
{bad_return,
{{rabbit,start,[normal,[]]},
{'EXIT',
{rabbit,failure_during_boot,
{error,
{schema_integrity_check_failed,
[{table_missing,rabbit_exchange_serial},
{table_missing,rabbit_runtime_parameters},
{table_missing,rabbit_durable_queue},
{table_missing,rabbit_queue},
{table_missing,gm_group},
{table_missing,mirrored_sup_childspec}]}}}}}}}
Log files (may contain more information):
/usr/local/var/log/rabbitmq/rabbit#localhost.log
/usr/local/var/log/rabbitmq/rabbit#localhost-sasl.log
{"init terminating in do_boot",{rabbit,failure_during_boot,{could_not_start,rabbit,{bad_return,{{rabbit,start,[normal,[]]},{'EXIT',{rabbit,failure_during_boot,{error,{schema_integrity_check_failed,[{table_missing,rabbit_exchange_serial},{table_missing,rabbit_runtime_parameters},{table_missing,rabbit_durable_queue},{table_missing,rabbit_queue},{table_missing,gm_group},{table_missing,mirrored_sup_childspec}]}}}}}}}}}
Crash dump was written to: erl_crash.dump
init terminating in do_boot ()
I don't know how rabbitmq works, but the error message looks clear: it tries to delete the directory /usr/local/var/lib/rabbitmq/mnesia/rabbit#localhost-plugins-expand, and fails because the process has nt the access right to delete the file /usr/local/var/lib/rabbitmq/mnesia/rabbit#localhost-plugins-expand/amqp_client-3.1.3/ebin/amqp_auth_mechanisms.beam.
Take a look at who is the owner of this file and directory, what are the access right to them.
This occurred for me during a rabbitmq upgrade with brew.
It was easier for me to just remove the directory all together and install from scratch.
sudo rm -rf /usr/local/var/rabbitmq/
brew uninstall rabbitmq;
brew install rabbitmq
rabbitmq-server
Got this to work. Just delete the database directory and restart server. Note if you had brew installed, database might still be outside Cellar directory. So need to manually delete directory and restart.