RabbitMQ management plugin issue - unix

I'm trying to install RabbitMQ management plugin but get the following in the console:
Error: {cannot_write_enabled_plugins_file,"/etc/rabbitmq/enabled_plugins",
eacces}
I use Ubuntu 12. On this page is told that The management plugin is included in the RabbitMQ distribution. To enable it, use rabbitmq-plugins:
rabbitmq-plugins enable rabbitmq_management
but the result you see above

sudo rabbitmq-plugins enable rabbitmq_management?
P.S.: looks like a question for https://serverfault.com/

If you have provided 777 permissions to the file and still you are not able to enable it, try changing umask to 0022 for user
sudo chfn -o umask=0022 <username>
worked for me!

chown rabbitmq.rabbitmq /etc/rabbitmq/*

Switch to rabbitmq user and then enable plugin like below:
$su - rabbitmq
$rabbitmq-plugins enable rabbitmq_management

Related

How do I enable python35 from Software Collections at login?

I followed the Software Collections Quick Start and I now have Python 3.5 installed. How can I make it always enabled in my ~/.bashrc, so that I do not have to enable it manually with scl enable rh-python35 bash?
Use the scl_source feature.
Create a new file in /etc/profile.d/ to enable your collection automatically on start up:
$ cat /etc/profile.d/enablepython35.sh
#!/bin/bash
source scl_source enable python35
See How can I make a Red Hat Software Collection persist after a reboot/logout? for background and details.
This answer would be helpful to those who have limited auth access on the server.
I had a similar problem for python3.5 in HostGator's shared hosting. Python3.5 had to be enabled every single damn time after login. Here are my 10 steps for the resolution:
Enable the python through scl script python_enable_3.5 or scl enable rh-python35 bash.
Verify that it's enabled by executing python3.5 --version. This should give you your python version.
Execute which python3.5 to get its path. In my case, it was /opt/rh/rh-python35/root/usr/bin/python3.5. You can use this path to get the version again (just to verify that this path is working for you.)
Awesome, now please exit out of the current shell of scl.
Now, lets get the version again through this complete python3.5 path /opt/rh/rh-python35/root/usr/bin/python3.5 --version.
It won't give you the version but an error. In my case, it was
/opt/rh/rh-python35/root/usr/bin/python3.5: error while loading shared libraries: libpython3.5m.so.rh-python35-1.0: cannot open shared object file: No such file or directory
As mentioned in Tamas' answer, we gotta find that so file. locate doesn't work in shared hosting and you can't install that too.
Use the following command to find where that file is located:
find /opt/rh/rh-python35 -name "libpython3.5m.so.rh-python35-1.0"
Above command would print the complete path (second line) of the file once located. In my case, output was
find: `/opt/rh/rh-python35/root/root': Permission denied
/opt/rh/rh-python35/root/usr/lib64/libpython3.5m.so.rh-python35-1.0
Here is the complete command for the python3.5 to work in such shared hosting which would give the version,
LD_LIBRARY_PATH=/opt/rh/rh-python35/root/usr/lib64 /opt/rh/rh-python35/root/usr/bin/python3.5 --version
Finally, for shorthand, append the following alias in your ~/.bashrc
alias python351='LD_LIBRARY_PATH=/opt/rh/rh-python35/root/usr/lib64 /opt/rh/rh-python35/root/usr/bin/python3.5'
For verification, reload the .bashrc by source ~/.bashrc and execute python351 --version.
Well, there you go, now whenever you login again, you have got python351 to welcome you.
This is not just limited to python3.5, but can be helpful in case of other scl installed softwares.

Twig cache permissions

I just worked with Windows 7 before and now I'm working with MAC OS. I cloned my project (it works with Twig and wordpress and I'm using a virtual machine via vagrant) and everything should work but when I enter the website it gives me the following message:
Uncaught exception 'RuntimeException' with message
'Unable to create the cache directory (/vagrant/myProject/cache/c2/94).'
in /vagrant/myProject/wp-content/.../libraries/Twig/Environment.php:1199
I guess it is some kind of problem about permissions but I don't know how to fix it exactly. Any help? Thank you.
As soon as you created a /vagrant directory, I think default permissions are root.
You can try:
sudo mkdir /vagrant/myProject/cache
sudo chown -R $USER:staff /vagrant
And then try again (assuming your current user runs the apache server).
If this does not work, please do:
ls -l /vagrant
and:
ls -l /vagrant/myProject/cache/
And try to set permissions so the cache permissions are the same.

Automounting riofs in ubuntu

I have several buckets mounted using the awesome riofs and they work great, however I'm at a loss trying to get them to mount after a reboot. I have tried entering in the following to my /etc/fstab with no luck:
riofs#bucket-name /mnt/bucket-name fuse _netdev,allow_other,nonempty,config=/path/to/riofs.conf.xml 0 0
I have also tried adding a startup script to run the riofs commands to my rc.local file but that too fails to mount them.
Any idea's or recommendations?
Currently RioFS does not support fstab. In order to mount remote bucket at the startup time, consider adding corresponding command line to your startup script (rc.local, as you mentioned).
If for some reason it fails to start RioFS from startup script, please feel free to contact developers and/or fill issue report.
If you enter your access key and secret access key in the riofs config xml file, then you should be able to mount this via fstab or an init.d or rc.local script ..
See this thread
EDIT:
I tested this myself and this is what I find. Even with the AWS access details specified in the config file, there is no auto-matic mounting at boot. But to access the system, all one needs to do is to issue mount /mount/point/in-fstab .. and the fstab directive would work and persist like a standard fstab mounted filesystem.
So, it seems the riofs system is not ready at that stage of the boot process when filesystems are mounted. That's the only logical reason I can find so far. This can be solved with an rc.local or init.d script that just issues a mount command (at the worst)
But riofs does work well, even as the documentation seems sparse. It is certainly more reliable and less buggy than s3fs ..
Thanks all,
I was able to get them auto-mounting from rc.local with the syntax similar to:
sudo riofs --uid=33 --gid=33 --fmode=0777 --dmode=0777 -o "allow_other" -c ~/.config/riofs/riofs.conf.xml Bucket-Name /mnt/mountpoint
Thanks again!

Installing Symfony 2 on Fedora 15

I've got a problem when i try to install Symfony 2:
I extract the content of the tgz file into var/www/html directory and then i go on http://127.0.0.1/symfony/web/config.php and it says that i need to change the permissions of app/cache/* and app/logs/*. The problem is that I tried all the solutions in the doc
Which solutions exactly did you try? Did you chmod those folders?
If your web server and command line user are different, that can also cause problems with those two folders. Check the docs for their umask solution and see if that helps.
I had the same problem and SELinux was responsible.
To figure out if SELinux is the source of your problem, turn it off by typing: setenforce Permissive on the command line.
If the script works, then you have to configure SELinux properly.

Nginx and passenger 3.0.0 on mac - why does it fail on startup?

I've been trying to set up nginx 0.8.53 and passenger 3.0.0 on my dev
environment - osx snow leopard and REE. I manually compiled nginx
with the passenger module linked in.
When I tried running passenger, it had a problem - ENV['PATH']
appeared to be null, so the split on it when call
PlatformInfo.find_command raised an exception. It was called when
trying to find out the osname - looking for the sw_vers command.
I tweaked the source and told it that it was macosx and then it
complained that it couldn't find the Rails 2.3.8 gem. This is
probably related to the first problem.
I'm not sure how to troubleshoot this? When I su -i and sudo nobody,
both users let me start irb and see the expected value for
ENV['PATH'], so I'm not sure why it's not working when passenger is
running?
One possibility: Passenger launches as the user that owns the config/environment.rb file (or of the config.ru file, if you have one) - make sure that file's owner is something sensible.
I don't know how you start Nginx, but you can write a launcher script for Nginx that starts Nginx with a specific environment, like this:
#!/bin/bash
export PATH=whatever
exec /path/to/nginx

Resources