passenger phusion stopped working after apt-get update/upgrade - ruby-on-rails

Well, I am not sure where to start.
We have rails based apps.
We did nothing in our websites. (did not touch ANY config file etc).
Just a regular apt-get update, upgrade.
Suddenly 2 websites are down!
What can be the problem?
This is an ubuntu machine that we are running.
DNS is OK.
We can go to the root page that says: ubuntu... everything is working fine.
We have apache server. Tried to: sudo apachectl restart.
Also, working on AMAZON cloud if it matters (aws.amazon)
Tried to reboot from Amazon. Same result.

If anything goes wrong, the first thing you should try is to follow the official troubleshooting guide: https://www.phusionpassenger.com/library/admin/apache/troubleshooting/ruby/

Related

Influx CLI driving me really crazy, cannot open the CLI

i am installing the influxdb_2.0.9 on my ubuntu, i followed the instructions here:
https://docs.influxdata.com/influxdb/v2.0/install/?t=Linux
I download it, setup it, i start the influxd daemon, i can connect via browser on localhost:8086, i think i can work with it, its functioning, i am gonna use the python API anyway, but this really drives me crazy...
I can't get to CLI. When i copy it to /usr/local/bin, or anywhere, or when i run it right in the directory via ./influx, it just returns a HELP message, like if i would type ./influx -h
Funny thing is when i download influxdb-client and run its influx binary, it starts the CLI, but its meant on version 1.6.4 and it does not seem to connect ideally on localhost running influxd 2.0.9, mbe i could somehow config it, but it seems to be bad idea anyway.
I purged everything, tried to reinstall everything, even manually deleted all empty directories, anything named influx on my 20.04 Ubuntu is gone and when i try to just follow the instructions online, everything seems to work except the CLI which i really **** need.
Just FYI, if i try to isntall via sudo apt-get install influxdb, influxdb-client -> it works perfectly, but it is older version 1.6.4
I tried installing the deb package via dpkg as well, but no difference... Im running 20.04 Ubuntu. There is the option of running older influxdb(1.6.x), but that I really dont want to do.
Anyone had the same problem? Could not find the solution in last hour online so im trying here to find help. This really drives me crazy though... Thanks for your time. Q.
Thank you guys for your time.
Well, i seem to realize, that the old CLI is gone and not implemented as it used to be, in the new version. In 2.0.0 it was started by
influx repl
But now i found a msg
I have no idea why they decided to deprecate this, not posting that much info about it..
I will try to finish this post by myself, leave it here, maybe someone in the future will find this useful.
Now I will try to 'build the REPL from source', wish me luck lol.
--EDIT
found a clone, closing the thread.
https://github.com/influxdata/influxdb/issues/19986

Rails server on AWS hosting

I have hosted a rails application on AWS. Every time I want to access my website, I have to go through some steps which are quite repetitive.
1. ssh -i <<a>my-keypair-pem> ec2-user#<<a>AWS-IPv4-public-IP>
2. rails s -p <<a>port> -b 0.0.0.0
After some time, I also get this error
'packet_write_wait: Connection to <AWS-IPv4-public-IP> port 22: Broken pipe'
I did some research and can't seem to find a way to keep my application running 24/7 without having to do these steps before accessing every time.
My AWS instance is on 24/7, so the website should run 24/7 as well.
Would assign an elastic IP to my instance help?
Appreciate any guidance.
EDIT: I followed this tutorial initially https://www.youtube.com/watch?v=jFBbcleSPoY and that is where I found the steps mentioned above.
There are many ways to run the rails server as daemon. If you google for "rails server as daemon", you will see many links. Have not added any links as many of good links are by hosting service providers.
If you still want to run the rails server through the shell for some reason, tmux is the way to go. The following excerpt is shamelessly copied from Tmux Wiki.
tmux is a terminal multiplexer. It lets you switch easily between several programs in one terminal, detach them (they keep running in the background) and reattach them to a different terminal.
You can open a tmux terminal and start rails server. You can detach from the tmux and quit your ssh session. Whenever you wish, you can ssh back to your server and re-attach to the tmux session. You rails server will still be running as you left it. This is great way to run development server in foreground for debugging.
Resolved the issue with https://mosh.org/, for anyone who stumbles on this post in the future.
Download and install mosh (mobile shell)
Run the modified version of the command mentioned in my original question
mosh -ssh="ssh -i <your-keypair.pem>" ec2-user#<AWS-Instance-IP>
This resolved my packet_write_wait issues and I don't have to keep restarting the rails server.

Thin unable to start after reboot [CentOS 7 + AWS EC2]

I recently acquired an AWS subscription and I'm trying to set up a production environment to host my rails app. I'm using an EC2 instance with CentOS 7 and I'm using mariadb as sql server and thin as my rails server. Everything went fine until I stopped the EC2 instance yesterday. I did not change any configuration and yet I can't get thin to start. I've tried many solutions without success. I'm using a config file to execute thin. If I use the command thin start -e production, it starts successfully, but I've no luck using the config file. The pid and the socket files are not created. I think it is not a problem with my config file, because it worked fine yesterday. Can you give some hints about what the problem may be? Can it be something related to OS configurations, like permissions? Thanks in advance!
After all it was a permissions issue. I wasn't executing the command as root thus it would not run for lack of permissions. Sudo su and it worked like a charm. Thanks anyway!

RefineryCMS images upload not working in production

I've got a website running on RefineryCMS for some time already. However there's one thing I cannot figure out. Images uploaded via CMS do not work in the production environment. It works fine in development on my local machine, but in production on the server it does not work.
This issue has been discussed before but none of the solutions I found helped to resolve my issue.
The image is uploaded to the public folder correctly, I can find it when I enter the path of folders and name of the image itself to the browser. The image is there, but it seems the app cannot decode the hashed URL that is generated for the image.
The app is running on a custom VPS on digitalocean with Ubuntu, nginx and passenger. I'm deploying via capistrano if that matters.
Thank you for any help.
Probably figured this out by now but I just ran into the same issue and realized I hadn't installed imagemagick yet.
For some reason I was thinking that came standard now on Ubuntu but it isn't.
$ sudo apt-get install imagemagick

Rubymine for remote SDK. Gems downloading and suddenly stop

I'm having this issue since yesterday and I am not sure what could be the problem. I have a Rails application that I want to run against a remote SDK installed on my VirtualBox (Ubuntu); yesterday I was able to set it up on another VM I have and when I went to Settings in Rubymine and added the SSH credentials, it took some time but finally a lot of gems were downloaded and I was able to run the project directly from Rubymine environment, trying to prepare everything for debug.
I had to change my VirtualBox and now when I connect to it via SSH it starts "Collecting files..." for a while and then "Downloading..." the gems... it looks like it restarts for a couple of times and then at some point, after a while and without any further notice, it stops.
If it helps, my host is Windows 7, my guest is Ubuntu 14.04; my RVM is 1.9.3-p392.
Any ideas? I'm surprised because this worked like a charm yesterday and today is not. Thank you in advance for any help.
What version is your Rubymine? I had issue back with version 6.x with remote rubies freezing the system. Also are you using a Vagrant box? I have seen some of the Vagrant boxes have issues as well. I would log in to the Ubuntu Guest via command line/SSH and see if you still have issues downloading gems.

Resources