I was running a simple chef recipe to manage my rabbitmq server on a RHEL 6, and it worked just fine, but now we moved to a RHEL 7 and the same code seems to fail. I'm using Chef-client version 12.14.60.
I was investigating this issue and what I found so far is that when you use the cookbook to execute the code block that manages the service, in background it execute the following
service rabbitmq-server stop
But the OS reply with a message saying
Redirecting to /bin/systemctl stop rabbitmq-server.service
And this is interpreted as an error from the chef-client.
Do I need to change the code to something else? Bellow is my code:
service 'rabbitmq-server' do
action :stop
end
Found a solution. According to the chef website you can pass the expected parameter to start/stop/restart the service manually.
Ex:
service 'rabbitmq-server stop' do
action :stop
stop_command '/bin/systemctl stop rabbitmq-server.service'
end
Related
On a new installation of cassandra 3.0.20 on redhat 7 I can not list roles. I have tried the option of fixing /etc/alternatives/cassandra/cassandra.yaml with...
authenticator: PasswordAuthenticator
and then restart the service.
still when I run a simple command like LIST ROLES I get the following error.
cassandra#cqlsh> list roles;
Unauthorized: Error from server: code=2100 [Unauthorized] message="You have to be logged in and not anonymous to perform this request"
It turns out that systemctl was not completely stopping cassandra due to weirdness with Redhat 7 and the init file. Therefore the changes to my cassandra.yaml were not taking effect.
Once I killed cassandra, made a proper cassandra.service and restarted the desired settings took effect, and I am able to run operations like "LIST ROLES;" normally.
Can someone suggest a way out of this issue please?
Can't start IIS either through command prompt or through iis itself.
IISRESET in command prompt throws the below error:-
The service did not respond to the start or control request in a timely fashion. (2147943453, 8007041d)
I have IIS 6.2(Build 9200) and OS is Win 8.1 Enterprise
I have encountered this problem before for IIS6,7 and IIS10. I tried for a very long time but it was not solved by any method.
The definitive and permanent solution is IIS uninstall and reinstall. When IIS is removed, you also need to delete it in C:\Windows\System32\inetsrv folder.
I'm trying to follow the steps in the RabbitMQ docs here to get clustering with SSL working on Windows. I'm noticing though that the "rabbitmqctl status" command starts failing after the environment variables defined in those steps are set. I'm getting the following error when executing "rabbitmqctl status":
Error: unable to connect to node 'rabbit#server1': nodedown
I've already configured RabbitMQ to use TLS 1.2 and have verified that it's working. I've ensured that my Erlang 18 cookie is the same in the user directory C:\users\me and C:\Windows on the machine, but the error persists, and is stopping other servers from clustering with it. The docs say that the Windows SSL Cluster setup is "Coming soon"... Here are the steps I've taken so far on server1. I think that Erlang wants forward slashes in the paths - this matches the rabbit.config SSL settings.
Combined the contents of my server\cert.pem and server\key.pem into rabbit.pem via the command "type server\cert.pem server\key.pem > server\rabbit.pem"
Created environment variable ERL_SSL_PATH and set to: "C:/Program
Files/erl7.0/lib/ssl-7.0/ebin"
Created environment variable RABBITMQ_CTL_ERL_ARGS and set to: -pa "%ERL_SSL_PATH%" -proto_dist inet_tls -ssl_dist_opt server_certfile C:/OpenSSL-Win64/server/rabbit.pem -ssl_dist_opt server_secure_renegotiate true client_secure_renegotiate true
Created environment variable RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS and set to same value as RABBITMQ_CTL_ERL_ARGS
Copied the erlang cookie at C:\Windows.erlang.cookie to my local user profile directory.
Restarted rabbit using rabbitmq-service start
At this point, on server1, "rabbitmqctl status" no longer works. Attempts to try to join server2 to server1 result in a "node down" error.
Edit 1: I can't get the initial step in the docs working to ask Erlang to report its SSL directory on Windows in order to set ERL_SSL_PATH correctly. Erlang is installed at C:\Program Files\erl7.0 on my server.
Edit 2: Using werl.exe (at C:\Program Files\erl7.0\bin\werl.exe), I was able to issue a command "Foo=io:format(code:lib_dir(ssl, ebin))." and it reported the path as: c:/Program Files/erl7.0/lib/ssl-7.0/ebin. However, this doesn't seem to be the cause of the this issue since that's already what I was using.
Thanks,
Andy
For environment changes to take effect on Windows, the service must be
re-installed. It is not sufficient to restart the service. This can be
done using the installer or on the command line with administrator
permissions
(source)
This will do:
rabbitmq-service.bat stop
rabbitmq-service.bat remove
rabbitmq-service.bat install
rabbitmq-service.bat start
Also, if while the node you're working on is down, the other cluster nodes were running, their state might be assumed to have gone out of sync. In that case, the node might fail to start up and you might need to:
rabbitmqctl force_boot
Check the logs to confirm. (at %RABBIT_BASE%\log\rabbit#server.log)
Late answer but, hopefully this could help a searcher...
I used this build to install redis on my windows7:
https://github.com/rgl/redis (git)
http://ruilopes.com/redis-setup/binaries/redis-2.4.6-setup-64-bit.exe (binary)
Service has been installed sucessfully, but it doesn't start:
The message says: 'Redis Server service on local computer was started and then stopped'. logs folder is empty. redis-server.exe starts properly without service. How can I fix this? Propose any other working dist. plz if you know it.
Ran into a similar issue on Windows 10 when trying to start Redis v3.0.503 as a service.
I had to install the service with a service-name param and it magically started working.
C:\redis>redis-server --service-install redis.windows.conf --loglevel verbose --service-name redisService
[7484] 04 Feb 00:03:53.610 # Granting read/write access to 'NT AUTHORITY\Network Service' on: "C:\redis" "C:\redis" [7484] 04 Feb 00:03:53.612 # Redis successfully installed as a service.
Found the solution here:
Redis-windows GitHub Wiki - Issues might happen
Commonly the Redis server on windows fails to start if you don't specify a maxheap parameter, before installing the service try to edit the redis.windows.conf file and uncomment maxheap parameter to something suitable.
I've been having a problem with my (development) site hanging when I try to login using LDAP credentials. Using xdebug, I was able to pinpoint the hang to a specific line of code, which is a call to ldap_bind(...). After days of trying to understand why it is hanging, one of my debugging techniques was to disable mod_ldap, and then just try to get any error to show up in apache log (after this has started, apache error logs haven't been recording any errors while performing this http request; It 'hangs' too).
What I did
I disabled the module (sudo a2dismod mod_ldap), restarted the server (sudo service apache2 restart), and confirmed that the module isn't enabled (apache2ctl -M does not show mod_ldap)
The Problem
It still hangs when it reaches ldap_bind(), however, it shouldn't even be reaching that point because without mod_ldap, my code shouldn't even be successfully calling ldap_connect() (right?) which is returning (resource) resource id='5' type='ldap link' (meaning the call was successful). I'm expecting a NoMethod or Function error.
Why can php make a call to a module that isn't enabled, and how do I stop that behavior?
Version
Ubuntu 14.04
Apache 2.4.7
PHP 5.5.9-1ubuntu4.5
Well it turns out, I had a novice understanding of what was happening. Never occurred to me that ldap_connect() as a php call had nothing to do with mod_ldap or any apache module. Thus, disabling/enabling apache mods wasn't doing anything because... it had nothing to do with apache mods.
So... I was able to disable ldap php extension with
sudo php5dismod ldap
and able to check that it was disabled with
php -m
And sure enough, after restarting the server, running my script caused a No function error for ldap_connect() (just as I was expecting/hoping). Now I just need to figure out why ldap_bind() hangs...