Closed ranib closed 9 years ago
Well it looks like this is your problem:
remote: Could not find mysql database. Please run:
remote: rhc cartridge add -a -c mysql-5.1
mysql-5.5 cartridge is added, so wonder why it is not able to find it? before adding mysql, app runs fine. Problem starts only after adding mysql cartridge. I think it may have to do with Haproxy
[WARNING] 088/154337 (138205) : Server express/local-gear is DOWN for maintenance. [ALERT] 088/154337 (138205) : proxy 'express' has no server available!
To create the app I did:
rhc create-app nginx http://cartreflect-claytondev.rhcloud.com/github/boekkooi/openshift-cartridge-nginx http://cartreflect-claytondev.rhcloud.com/github/boekkooi/openshift-cartridge-php mysql-5.5 -s
Then I checkout the repo and merged in the wordpress:
git clone <git-uri> myapp
cd myapp
git remote add quickstart https://github.com/openshift/wordpress-example.git
git fetch quickstart
git merge quickstart/master
git push
This indeed gives a error for mysql.
The problem seems to be that the OPENSHIFT_MYSQL*
environment variables are not set within the application. This has been fixed in 7e741e7e0db2d8a29e127709eb774c3e2661c2ba.
P.S. don't forget to configure the .openshift/nginx.conf.erb
correctly.
Thank you, now it works after configuring .openshift/nginx.conf.erb correctly
Created scalable app using "boekkooi NGINX cartridge", added "boekkooi PHP cartridge" and "mysql-5.5 cartridge". When trying to deploy https://github.com/openshift/wordpress-example I get Deployment completed with status: failure with above mentioned error. Increasing timeout "rhc app restart --timeout 120" did not help and "rhc tail " does not have anything in logs that I can relate to this error.
$ git push Counting objects: 4432, done. Delta compression using up to 2 threads. Compressing objects: 100% (2568/2568), done. Writing objects: 100% (4430/4430), 13.13 MiB | 77.00 KiB/s, done. Total 4430 (delta 1779), reused 4418 (delta 1773) remote: Nginx instance is stopped remote: Syncing git content to other proxy gears remote: Building git ref 'master', commit 6350f2a remote: Preparing build for deployment remote: Deployment id is 302453b6 remote: Activating deployment remote: [30-Mar-2015 15:44:15] NOTICE: [pool www] 'user' directive is ignored wh en FPM is not running as root remote: [30-Mar-2015 15:44:15] NOTICE: [pool www] 'group' directive is ignored w hen FPM is not running as root remote: HAProxy already running remote: HAProxy instance is started remote: Copying WordPress plugins from .openshift/plugins remote: Copying WordPress themes from .openshift/themes remote: Copying WordPress languages from .openshift/languages remote: remote: Could not find mysql database. Please run: remote: rhc cartridge add -a -c mysql-5.1
remote: then make a sample commit (add whitespace somewhere) and re-push
remote:
remote: -------------------------
remote: Git Post-Receive Result: failure
remote: Activation status: failure
remote: Activation failed for the following gears:
remote: XXXX9a195973caa4ad00xxxx (Error activating gear: CLIENT_ERROR: Failed to
execute action hook 'deploy' for XXXX9a195973caa4ad00xxxx application
remote: #IO:0x0000000198f390
remote: #IO:0x0000000198f318
remote: )
remote: Deployment completed with status: failure
remote: postreceive failed
To ssh://XXXX9a195973caa4ad00xxxx@-domain.rhcloud.com/~/git/.git/
9b2b78f..6350f2a master -> master
Ali@DELL-C521 ~/ (master)
$ rhc tail
DL is deprecated, please use Fiddle
==> app-root/logs/haproxy.log <==
[WARNING] 088/145222 (134964) : Stopping proxy express in 0 ms.
[WARNING] 088/145222 (134964) : Proxy stats stopped (FE: 1 conns, BE: 0 conns).
[WARNING] 088/145222 (134964) : Proxy express stopped (FE: 1 conns, BE: 1 conns)
.
[WARNING] 088/145222 (138205) : config : log format ignored for proxy 'stats' si
nce it has no log address.
[WARNING] 088/145222 (138205) : config : log format ignored for proxy 'express'
since it has no log address.
[WARNING] 088/152631 (138205) : Server express/local-gear is DOWN for maintenanc
e.
[ALERT] 088/152631 (138205) : proxy 'express' has no server available!
[WARNING] 088/152644 (138205) : Server express/local-gear is UP (leaving mainten
ance).
[WARNING] 088/154337 (138205) : Server express/local-gear is DOWN for maintenanc
e.
[ALERT] 088/154337 (138205) : proxy 'express' has no server available!
==> app-root/logs/nginx_error.log <== 2015/03/30 15:16:47 [error] 137377#0: *735 open() "/var/lib/openshift/55199a1959 73caa4ad00010b/app-root/runtime/repo//public/favicon.ico" failed (2: No such fil e or directory), client: 127.5.205.129, server: , request: "GET /favicon.ico HTT P/1.1", host: "-domain.rhcloud.com"
==> app-root/logs/nginx_access.log <== 127.5.205.129 - - [30/Mar/2015:15:43:18 -0400] 200 "GET / HTTP/1.0" 41217 "-" " -" "-" 127.5.205.129 - - [30/Mar/2015:15:43:20 -0400] 200 "GET / HTTP/1.0" 41217 "-" " -" "-" 127.5.205.129 - - [30/Mar/2015:15:43:22 -0400] 200 "GET / HTTP/1.0" 41217 "-" " -" "-" 127.5.205.129 - - [30/Mar/2015:15:43:24 -0400] 200 "GET / HTTP/1.0" 41217 "-" " -" "-" 127.5.205.129 - - [30/Mar/2015:15:43:26 -0400] 200 "GET / HTTP/1.0" 41217 "-" " -" "-" 127.5.205.129 - - [30/Mar/2015:15:43:28 -0400] 200 "GET / HTTP/1.0" 41217 "-" " -" "-" 127.5.205.129 - - [30/Mar/2015:15:43:30 -0400] 200 "GET / HTTP/1.0" 41217 "-" " -" "-" 127.5.205.129 - - [30/Mar/2015:15:43:32 -0400] 200 "GET / HTTP/1.0" 41217 "-" " -" "-" 127.5.205.129 - - [30/Mar/2015:15:43:34 -0400] 200 "GET / HTTP/1.0" 41217 "-" " -" "-" 127.5.205.129 - - [30/Mar/2015:15:43:36 -0400] 200 "GET / HTTP/1.0" 41217 "-" " -" "-"
==> app-root/logs/haproxy_ctld.log <== I, [2015-03-30T14:52:25.637637 #134978] INFO -- : Starting haproxy_ctld
==> app-root/logs/php-fpm-error.log <== [30-Mar-2015 15:26:38] NOTICE: [pool www] 'user' directive is ignored when FPM i s not running as root [30-Mar-2015 15:26:38] NOTICE: [pool www] 'group' directive is ignored when FPM is not running as root [30-Mar-2015 15:26:38] NOTICE: fpm is running, pid 180994 [30-Mar-2015 15:26:38] NOTICE: ready to handle connections [30-Mar-2015 15:43:38] NOTICE: Terminating ... [30-Mar-2015 15:43:38] NOTICE: exiting, bye-bye! [30-Mar-2015 15:44:15] NOTICE: [pool www] 'user' directive is ignored when FPM i s not running as root [30-Mar-2015 15:44:15] NOTICE: [pool www] 'group' directive is ignored when FPM is not running as root [30-Mar-2015 15:44:15] NOTICE: fpm is running, pid 204457 [30-Mar-2015 15:44:15] NOTICE: ready to handle connections
==> nginx/logs/error.log <== 2015/03/30 15:26:32 [notice] 180851#0: signal process started 2015/03/30 15:43:39 [notice] 203567#0: signal process started