Passenger: The application spawner server exited unexpectedly: Connection closed - ruby

I was trying to deploy Redmine to Apache with mod_passenger on CentOS 6.3 but having the error :
The application spawner server exited unexpectedly: Connection closed
I installed the latest version (3.0.18) of passenger using gem.
After various failed attempts I decided to delete passenger from "gem uninstall passenger" and install it again using "yum install rubygem-passenger" instead. The installed version was "3.0.17"
Then it started working. Still don't know why exactly.

I also had same issue and figured out.
You may have RailsBaseURI directives in your apache config file. If you're using Rails 3, it should be changed to RackBaseURI.
See these
Passenger error - PhusionPassenger::ClassicRails::ApplicationSpawner::Error
http://wiki.railsplayground.com/railsplayground/show/How+To+use+Phusion+Passenger
http://www.modrails.com/documentation/Users%20guide%20Apache.html

What other errors do you see in the log file?
Can you also try Phusion Passenger 4 beta from github's master branch?

Related

Elasticsearch installation failed on windows

I am trying to install Elasticsearch 7.16.2 on windows server but while installation I am getting below error.
Installing service : "elasticsearch-service-x64"
Using ES_JAVA_HOME (64-bit): "C:\Program Files\Java\jdk-17.0.1"
-Des.networkaddress.cache.ttl=60;-Des.networkaddress.cache.negative.ttl=10;-XX:+AlwaysPreTouch;-Xss1m;-Djava.awt.headless=true;-Dfile.encoding=UTF-8;-Djna.nosys=true;-XX:-OmitStackTraceInFastThrow;-XX:+ShowCodeDetailsInExceptionMessages;-Dio.netty.noUnsafe=true;-Dio.netty.noKeySetOptimization=true;-Dio.netty.recycler.maxCapacityPerThread=0;-Dio.netty.allocator.numDirectArenas=0;-Dlog4j.shutdownHookEnabled=false;-Dlog4j2.disable.jmx=true;-Dlog4j2.formatMsgNoLookups=true;-Djava.locale.providers=SPI,COMPAT;--add-opens=java.base/java.io=ALL-UNNAMED;-XX:+UseG1GC;-Djava.io.tmpdir=C:\Users\jioapp\AppData\Local\Temp\2\elasticsearch;-XX:+HeapDumpOnOutOfMemoryError;-XX:+ExitOnOutOfMemoryError;-XX:HeapDumpPath=data;-XX:ErrorFile=logs/hs_err_pid%p.log;-Xlog:gc*,gc+age=trace,safepoint:file=logs/gc.log:utctime,pid,tags:filecount=32,filesize=64m;-Xms31744m;-Xmx31744m;-XX:MaxDirectMemorySize=16642998272;-XX:InitiatingHeapOccupancyPercent=30;-XX:G1ReservePercent=25
Failed installing 'elasticsearch-service-x64' service
Thanks,
Shashikant
Whoever has the same problem, try 'elasticsearch-service.bat remove'. I actually had the same error, checked the log files and it said that the service already existed and that's why it was failing to install. Once I removed it I was able to reinstall it and then I had issues starting it but I think it was because of some typos in the elasticsearch.yml file.
If that doesn't work, maybe try 'elasticsearch-service.bat manager' for some information and check your environment variables.

Missing "passenger.conf" Apache2

I am trying to deploy Redmine on my Ubuntu Linux server running Apache2. However, for my deployment of Redmine, I need to modify passenger.conf which is missing at the path /etc/apache2/mods-available/passenger.conf. I am wondering if this configuration file should have been provided during installation and how I can create this missing file?
If you need to configure passenger, then install using this ref link from phusion passenger official site
https://www.phusionpassenger.com/library/config/apache/intro.html

Setting Up Symfony Dev Environment in Heroku

So as the title suggests, I am setting up a Symfony project in heroku. It is on my Mac OSX laptop. I followed the directions here to set it up. I got everything installed, pushed my project to heroku, tested it and it works on the web.
Now I'm trying to set up the local dev environment. I would like to be able to simply use heroku local to launch the dev server as usual. I installed the heroku php buildpack, and I created a Procfile with these contents:
web: $(composer config bin-dir)/heroku-php-apache2 web/
the composer config bin-dir command returns vendor/bin, and then I can see that heroku-php-apache2 file in there. Everything looks good.
When I run heroku local I get this error:
[WARN] No ENV file found
15:48:49 web.1 | This program requires Apache 2.4.10 or newer with mod_proxy and mod_proxy_fcgi enabled; check your 'httpd' command.
15:48:49 web.1 Exited with exit code 1
So I checked the httpd -v and I have:
Server version: Apache/2.4.27 (Unix)
Server built: Oct 3 2017 10:26:24
I just enabled (uncommented) mod_proxy and mod_proxy_fcgi in the /etc/apache2/httpd.conf file and restarted the machine, but still seeing the same error. I am starting to think it is a problem with my Procfile or something.
Any help is greatly appreciated.
For anyone having a similar problem, I was able to fix the issue. The issue WAS that I edited the wrong httpd.conf file, since I installed the apache from homebrew.
The path /etc/apache2/httpd.conf is correct if you are using the default apache2 installation on the mac. If you installed apache from homebrew like I did, you will find the httpd.conf file at /usr/local/etc/httpd/httpd.conf.
You need to uncomment the 2 lines for mod_proxy and mod_proxy_fcgi and also uncomment the port listener directive, since heroku likes to listen on non-default port 5000 and heroku will automatically do that at run time.
Also the server cannot be running already when you use heroku local.
:-)

Installing Open Project 7 (Apache error: Service Unavailable)

Here is the original question: https://community.openproject.com/topics/7851
I'm trying to install Open Project 7 in a brand new Ubuntu instance at Digital Ocean.
I've follow the instructions at https://www.openproject.org/download-and-installation/, but it's not working.
After the complete of installation and the run of the openproject configure command, i have selected options to install both MySQL and Apache server. When it's all done, i'm unable to connect to my server.
My enviroment:
Ubuntu 16.04
http://159.203.191.172
At logs, i can see two strange messages.
First:
bundler: failed to load command: unicorn (/opt/openproject/vendor/bundle/ruby/2.4.0/bin/unicorn)
Second is a warning:
WARN -- : You are setting a key that conflicts with a built-in method OmniAuth::AuthHash::InfoHash#name defined at /opt/openproject/vendor/bundle/ruby/2.4.0/bundler/gems/omniauth-8385bc0da47e/lib/omniauth/auth_hash.rb:34. This can cause unexpected behavior when accessing the key via as a property. You can still access the key via the #[] method.
W, [2017-06-13T01:01:17.860764 #25822]
I don't know if the warning is related to problem, but i think that the unicorn problem is.
Answering my own question here:
I suspected that the package had some problems so i decided to install it using manual installation. The newest documentation i found was an old Ubuntu 14 step-to-step tutorial, adapted from older versions of Open Project. I decided to follow it and after a lot of adaptations i got able to finish the installation process.
This is the tutorial: https://github.com/opf/openproject-ce/blob/stable/7/docs/installation/manual/README.md
Now I'm writing another step-to-step tutorial based on it, modifying all required steps to perform a clean installation on Ubuntu 16.

rails s doesn't start server, no error messages

I haven't been able to find previous answered questions on this, unless I'm missing one. Anyways, when I try starting a rails server:
vagrant [accounts]> rails s
=> Booting WEBrick
=> Rails 4.2.1 application starting in development on http://localhost:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
[2015-06-06 02:38:50] INFO WEBrick 1.3.1
[2015-06-06 02:38:50] INFO ruby 2.2.2 (2015-04-13) [i686-linux]
[2015-06-06 02:38:50] INFO WEBrick::HTTPServer#start: pid=23016 port=3000
But that's all I ever get, no error messages or anything. Of course localhost:3000 produces 'no data received'
As you can see I'm using Ruby 2.2.2 and Rails 4.2.1
I'm in the root for the app, have tried updating bin.
I'm using the sqlite3 gem, I've created and migrated the db.
I am convinced it has nothing to do with this particular rails app because I've gone back and tried to open old projects that are now having the same problem. Recently I've upgraded from Ubuntu 12.04 to 14.04 on my vm. I've also recently upgraded ruby (I manage with rvm) and rails. I've also recently put some stuff on heroku. All of this has messed with $PATH (I'm not sure if this is related, I'm pretty new to all this stuff). Just wanted to detail everything I could think of that might have an effect.
Thanks!
I ran into the following problem recently, could this be your issue also?
If so try
rails s -b 0.0.0.0
3.3 Default Host for rails server Due to a change in Rack, rails server now listens on localhost instead of 0.0.0.0 by default. This
should have minimal impact on the standard development workflow as
both http://127.0.0.1:3000 and http://localhost:3000 will continue to
work as before on your own machine.
However, with this change you will no longer be able to access the
Rails server from a different machine, for example if your development
environment is in a virtual machine and you would like to access it
from the host machine. In such cases, please start the server with
rails server -b 0.0.0.0 to restore the old behavior.
If you do this, be sure to configure your firewall properly such that
only trusted machines on your network can access your development
server.
See the release notes here for the details.

Resources