Cannot connect to Magnolia after installation - magnolia

I am new to Magnolia. I installed the bundle and tried to run it from the command prompt. The server is getting started, but while calling the URL http://localhost:8080 (TomCat port 8090), it is not loading:
The bundle I downloaded is this one.

That bundle seems to work for me, so I wonder if you have some logs you could show us? Perhaps catalina.out?
Also might be helpful to see the output of the following commands:
lsof -i:8080
and
ps aux | grep -E 'magnolia|tomcat'
Thanks for your help!

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.

/usr/bin/env: ruby_executable_hooks : No such file or directory

I'm trying to deploy to a Raspberry Pi using Capistrano 3.0 / Thin / NGINX I've got it working, but in my restart block I have
namespace :deploy do
desc 'Restart application'
task :restart do
on roles(:app), in: :sequence, wait: 5 do
execute '/etc/init.d/thin restart'
execute 'sudo /etc/init.d/nginx restart'
end
end
end
To which I am greated with
INFO [128fb9a3] Running /etc/init.d/thin restart on raspberrypi.local
DEBUG [128fb9a3] Command: /etc/init.d/thin restart
DEBUG [128fb9a3] /usr/bin/env:
DEBUG [128fb9a3] ruby_executable_hooks
DEBUG [128fb9a3] : No such file or directory
DEBUG [128fb9a3]
I've tried the answer here but with no success.
The commands seem to work fine if I SSH into the PI and run them as root.
I should mention that I pretty much used this tutorial: http://creativepsyco.github.io/blog/2013/04/10/deploying-rails-on-nginx-and-thin/ to get things setup
Totally Hackish Solution
The gem rvm1-capistrano3 didn't end up working for me, so i ended up just hard linking ruby_executable_hooks and ruby like so
$ ln -s `which ruby_executable_hooks` /usr/bin/ruby_executable_hooks
$ ln -s `which ruby` /usr/bin/ruby
WARNING, This assumes that ruby was installed with RVM, you might want to make sure you are not going to overwrite something by doing something like ls -l /usr/bin | grep ruby
ALSO I realize this is totally hackish and probably not the right thing to do on a production server, but it worked for me on my Raspberry-Pi...
Have you tried switching to system ruby?
rvm use system
Then install capistrano there. This would take your rvm issues out of play.
The article you linked refers to the old version of Capistrano.
It looks like you are using rvm (the ruby_executable_hooks seems to be an RVM thing), in which case you'll need one of the Cap 3 compatible RVM adapters, find them at Github named capistrano/rvm (under the Capistrano account) or rvm1-capistrano3, which appears to be maintained by someone aligned with the rvm core team.

RabbitMQ management plugin issue

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

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