Submitted by Arvi89 on Tue, 08/05/2014 - 13:30
Hello,
I tried to install Ghost, install went fine (installation of node.js + ghost), but the problem is, after it's installed, apache2 won't start anymore.
Also Server status in the script info is down, when I click on start it say ok, but still down. Is there a conflict between node.js and apache2?
Status:
Active
Comments
Submitted by andreychek on Tue, 08/05/2014 - 14:47 Comment #1
Howdy -- do you happen to have the error that you receive when trying to start Apache, after installing the Ghost blog?
There's a few different possibilities of what's occurring; while it's possible that something is interfering with port 80 or 443, it's also possible that the issue is related to a syntax error or missing Apache module.
Submitted by Arvi89 on Wed, 08/06/2014 - 05:59 Comment #2
Ok, so this is what happens exactly when I install the script:
In the error log for the domain:
[Wed Aug 06 12:23:21.645427 2014] [proxy_balancer:emerg] [pid 7879] (22)Invalid argument: AH01183: Cannot share balancer
In the apache error log:
[Wed Aug 06 12:23:21.493685 2014] [mpm_prefork:notice] [pid 7879] AH00171: Graceful restart requested, doing restart
[Wed Aug 06 12:23:21.615589 2014] [auth_digest:notice] [pid 7879] AH01757: generating secret for digest authentication ...
[ 2014-08-06 12:23:21.6196 8971/7fc2b8fa7780 agents/Watchdog/Main.cpp:538 ]: Options: { 'analytics_log_user' => 'nobody', 'default_group' => 'nogroup', 'default_python' => 'python', 'default_ruby' => '/usr/bin/ruby', 'default_user' => 'nobody', 'log_level' => '0', 'max_pool_size' => '6', 'passenger_root' => '/usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini', 'passenger_version' => '4.0.37', 'pool_idle_time' => '300', 'temp_dir' => '/tmp', 'union_station_gateway_address' => 'gateway.unionstationapp.com', 'union_station_gateway_port' => '443', 'user_switching' => 'true', 'web_server_passenger_version' => '4.0.37', 'web_server_pid' => '7879', 'web_server_type' => 'apache', 'web_server_worker_gid' => '33', 'web_server_worker_uid' => '33' }
[ 2014-08-06 12:23:21.6226 8974/7ff5a6086780 agents/HelperAgent/Main.cpp:643 ]: PassengerHelperAgent online, listening at unix:/tmp/passenger.1.0.7879/generation-1/request
[ 2014-08-06 12:23:21.6284 8980/7f2032e6a780 agents/LoggingAgent/Main.cpp:321 ]: PassengerLoggingAgent online, listening at unix:/tmp/passenger.1.0.7879/generation-1/logging
[ 2014-08-06 12:23:21.6285 8971/7fc2b8fa7780 agents/Watchdog/Main.cpp:728 ]: All Phusion Passenger agents started!
[Wed Aug 06 12:23:21.645409 2014] [proxy:crit] [pid 7879] AH02432: Cannot find LB Method: byrequests
[Wed Aug 06 12:23:21.645442 2014] [:emerg] [pid 7879] AH00020: Configuration Failed, exiting
And if I try to start apache2:
[ 2014-08-06 12:24:56.7777 9309/7f411e11c780 agents/Watchdog/Main.cpp:538 ]: Options: { 'analytics_log_user' => 'nobody', 'default_group' => 'nogroup', 'default_python' => 'python', 'default_ruby' => '/usr/bin/ruby', 'default_user' => 'nobody', 'log_level' => '0', 'max_pool_size' => '6', 'passenger_root' => '/usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini', 'passenger_version' => '4.0.37', 'pool_idle_time' => '300', 'temp_dir' => '/tmp', 'union_station_gateway_address' => 'gateway.unionstationapp.com', 'union_station_gateway_port' => '443', 'user_switching' => 'true', 'web_server_passenger_version' => '4.0.37', 'web_server_pid' => '9308', 'web_server_type' => 'apache', 'web_server_worker_gid' => '33', 'web_server_worker_uid' => '33' }
[ 2014-08-06 12:24:56.7806 9312/7fa4e54b7780 agents/HelperAgent/Main.cpp:643 ]: PassengerHelperAgent online, listening at unix:/tmp/passenger.1.0.9308/generation-0/request
[ 2014-08-06 12:24:56.7868 9318/7f68e1619780 agents/LoggingAgent/Main.cpp:321 ]: PassengerLoggingAgent online, listening at unix:/tmp/passenger.1.0.9308/generation-0/logging
[ 2014-08-06 12:24:56.7869 9309/7f411e11c780 agents/Watchdog/Main.cpp:728 ]: All Phusion Passenger agents started!
[Wed Aug 06 12:24:56.789541 2014] [ssl:warn] [pid 9308] AH02292: Init: Name-based SSL virtual hosts only work for clients with TLS server name indication support (RFC 4366)
[Wed Aug 06 12:24:56.789561 2014] [suexec:notice] [pid 9308] AH01232: suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
[Wed Aug 06 12:24:56.831685 2014] [auth_digest:notice] [pid 9329] AH01757: generating secret for digest authentication ...
[ 2014-08-06 12:24:56.8356 9336/7fc39f3d4780 agents/Watchdog/Main.cpp:538 ]: Options: { 'analytics_log_user' => 'nobody', 'default_group' => 'nogroup', 'default_python' => 'python', 'default_ruby' => '/usr/bin/ruby', 'default_user' => 'nobody', 'log_level' => '0', 'max_pool_size' => '6', 'passenger_root' => '/usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini', 'passenger_version' => '4.0.37', 'pool_idle_time' => '300', 'temp_dir' => '/tmp', 'union_station_gateway_address' => 'gateway.unionstationapp.com', 'union_station_gateway_port' => '443', 'user_switching' => 'true', 'web_server_passenger_version' => '4.0.37', 'web_server_pid' => '9329', 'web_server_type' => 'apache', 'web_server_worker_gid' => '33', 'web_server_worker_uid' => '33' }
[ 2014-08-06 12:24:56.8386 9339/7fc18f955780 agents/HelperAgent/Main.cpp:643 ]: PassengerHelperAgent online, listening at unix:/tmp/passenger.1.0.9329/generation-0/request
[ 2014-08-06 12:24:56.8446 9345/7f54b9745780 agents/LoggingAgent/Main.cpp:321 ]: PassengerLoggingAgent online, listening at unix:/tmp/passenger.1.0.9329/generation-0/logging
[ 2014-08-06 12:24:56.8448 9336/7fc39f3d4780 agents/Watchdog/Main.cpp:728 ]: All Phusion Passenger agents started!
[Wed Aug 06 12:24:56.861531 2014] [proxy:crit] [pid 9329] AH02432: Cannot find LB Method: byrequests
[Wed Aug 06 12:24:56.861563 2014] [:emerg] [pid 9329] AH00020: Configuration Failed, exiting
Submitted by andreychek on Wed, 08/06/2014 - 09:55 Comment #3
Could you try running this command:
a2enmod lbmethod_byrequests
You should then see output indicating that Apache is enabling a module. Once you receive that, then try restarting Apache:
/etc/init.d/apache2 restart
Submitted by Arvi89 on Wed, 08/06/2014 - 13:19 Comment #4
Oh yes it's much better. If I install the module before the script, I don't have any problem with apache anymore, but Ghost will still not work. In the script management, server is down (node.js I guess) even if I try to put it online, and if I try to refresh the page where it's installed, I get:
[Wed Aug 06 19:46:58.934876 2014] [proxy:error] [pid 9775] (111)Connection refused: AH00957: HTTP: attempt to connect to 127.0.0.1:3001 (localhost) failed
[Wed Aug 06 19:46:58.934924 2014] [proxy:error] [pid 9775] AH00959: ap_proxy_connect_backend disabling worker for (localhost) for 60s
[Wed Aug 06 19:46:58.934938 2014] [proxy_http:error] [pid 9775] [client 123.118.112.103:53543] AH01114: HTTP: failed to make connection to backend: localhost
Submitted by andreychek on Wed, 08/06/2014 - 14:41 Comment #5
Jamie, I did some testing on the Ghost Install Script, which uses Node.js.
It looks like there's a problem where Node.js can't be put into a directory named "ghost" (I'm assuming that this somehow conflicts with the application name).
When doing so, Node throws this error:
> ghost@0.4.2 start /home/test/public_html/ghost
> node index
|
ERROR: Your site url in config.js cannot contain a subdirectory called ghost.
http://test.com/ghost
Please rename the subdirectory before restarting
Error: Your site url in config.js cannot contain a subdirectory called ghost.
at validateConfigEnvironment (/home/test/public_html/ghost/core/bootstrap.js:83:25)
at NearFulfilledProxy.when (/home/test/public_html/ghost/node_modules/when/when.js:501:43)
at Promise._message (/home/test/public_html/ghost/node_modules/when/when.js:426:25)
at Array.deliver [as 0] (/home/test/public_html/ghost/node_modules/when/when.js:319:7)
at runHandlers (/home/test/public_html/ghost/node_modules/when/when.js:385:12)
at Array.2 (/home/test/public_html/ghost/node_modules/when/when.js:352:5)
at runHandlers (/home/test/public_html/ghost/node_modules/when/when.js:385:12)
at drainQueue (/home/test/public_html/ghost/node_modules/when/when.js:836:3)
at process._tickCallback (node.js:419:13)
Naming the installation directory to anything else, such as "ghost2", works fine.
Could we prevent it from using "ghost" as the installation directory?
Submitted by JamieCameron on Wed, 08/06/2014 - 15:33 Comment #6
Sure, I will update the installer to prevent this. That seems pretty surprising though, as I'd expect "ghost" to be the normal sub-directory name!
Submitted by andreychek on Wed, 08/06/2014 - 15:51 Comment #7
Okay Arvi89, this should now be corrected for future Virtualmin versions, but for the time being, try performing the Ghost installation into a directory that isn't named "ghost". Any name other than that should work fine.
Submitted by Arvi89 on Wed, 08/06/2014 - 21:38 Comment #8
Ok, now it doesn't crash anymore, but not really working :(
After the installation, it tells me to go to /directory/ghost/, that redirects me to /ghost/, so obviously it doesn't work. I then tried to go to /directory/, it gives me a 404 from ghost (but a broken 404, it tries to load a picture from /ghost/img/404-ghost.png)
Submitted by andreychek on Wed, 08/06/2014 - 23:50 Comment #9
It looks like there are still some outstanding problems with the Ghost Install Script on Ubuntu 14.04.
We're not quite sure what's causing all the issues yet, but we're working on them. We're able to reproduce the problems you're seeing.
In the meantime, while we're working on the issues with Ghost/Node.js, if you had any other Install Scripts that you were having problems with, we could go over those :-)
Submitted by Arvi89 on Tue, 10/21/2014 - 02:44 Comment #10
Hello!
I have been away for a while, I just re-installed my server without using ldap this time for users (it made things complicated and my installation was not "normal"). I just tried to install ghost, but ghost is using the port 80, so it can't work with apache in the same time...
Still same configuration, Ubuntu server 14.04.
Submitted by JamieCameron on Tue, 10/21/2014 - 08:11 Comment #11
Are you installing Ghost via Virtualmin? It should get configured to use a different port, and then apache is proxied through to it.
Submitted by Arvi89 on Tue, 10/21/2014 - 10:25 Comment #12
yeah, I did everything from virtualmin. Actually I didn't exactly check that it was using port 80, but just after I finished the installation, apache stopped, and I couldn't start it again (I think it was because port was used, but not 100% sure). Was fixed just after I uninstalled ghost (that also uninstalled nodejs then).
Submitted by JamieCameron on Tue, 10/21/2014 - 17:04 Comment #13
I'm not seeing this problem in my test installs - ghost is always using the correct port assigned by Virtualmin.
Submitted by Arvi89 on Tue, 10/21/2014 - 23:08 Comment #14
Ok, you're right, was another problem, I had to manually activate the lbmethod_byrequests module, it was not activated, but needed.
Still not working. When I go to /ghostblog/ghost (link provided at the end of the installation, all default settings), it tells me: Cannot GET /ghost
Submitted by JamieCameron on Wed, 10/22/2014 - 04:22 Comment #15
I've updated the Ghost script installer to fix the issue of installing into a sub-directory.
Submitted by Arvi89 on Thu, 10/23/2014 - 02:02 Comment #16
So, I installed a Debian 7.5, I tried to install ghost, this is what I got: http://awesomescreenshot.com/03a3pmpu4d
PS: I tried to upload the png file here (430k), didn't work. This picture will last for 3 days.
Submitted by JamieCameron on Thu, 10/23/2014 - 05:04 Comment #17
Looks like the node.js install is failing due to missing dependencies on your system (ie. sqlite).
Try first running
apt-get install sqlite3