joshisa / piwikstart

1 stars 3 forks source link

Deployment in Bluemix fails #3

Open petschni opened 7 years ago

petschni commented 7 years ago

Thanks for the update!

I tried the deployment again and it deploys but fails with the following errors in the bluemix log: (these are only the errors within the log file)


STG/0Generating autoload files2016-11-24T10:37:01.453+0100
STG/0 Downloading2016-11-24T10:36:59.643+0100
STG/0 - Installing twig/twig (v1.25.0)2016-11-24T10:36:59.642+0100
STG/0 Downloading2016-11-24T10:36:58.459+0100
STG/0 - Installing tedivm/jshrink (v0.5.2)2016-11-24T10:36:58.458+0100
STG/0 Downloading2016-11-24T10:36:47.168+0100
STG/0 - Installing tecnickcom/tcpdf (6.2.12)2016-11-24T10:36:47.167+0100
STG/0 Downloading2016-11-24T10:36:45.998+0100
STG/0 - Installing symfony/monolog-bridge (v2.6.13)2016-11-24T10:36:45.997+0100
STG/0 Downloading2016-11-24T10:36:43.873+0100
STG/0 - Installing monolog/monolog (1.21.0)2016-11-24T10:36:43.873+0100
STG/0 Downloading2016-11-24T10:36:42.661+0100
STG/0 - Installing symfony/event-dispatcher (v2.6.13)2016-11-24T10:36:42.660+0100
STG/0 Downloading2016-11-24T10:36:40.633+0100
STG/0 - Installing symfony/console (v2.6.13)2016-11-24T10:36:40.632+0100
STG/0 Downloading2016-11-24T10:36:39.554+0100
STG/0 - Installing psr/log (1.0.1)2016-11-24T10:36:39.553+0100
STG/0 Downloading2016-11-24T10:36:38.403+0100
STG/0 - Installing piwik/searchengine-and-social-list (1.3.4)2016-11-24T10:36:38.403+0100
STG/0 Downloading2016-11-24T10:36:37.389+0100
STG/0 - Installing piwik/referrer-spam-blacklist (1.0.10)2016-11-24T10:36:37.389+0100
STG/0 - Installing piwik/piwik-php-tracker (1.0.3)2016-11-24T10:36:36.245+0100
STG/0 Downloading2016-11-24T10:36:36.245+0100
STG/0 Downloading2016-11-24T10:36:35.108+0100
STG/0 - Installing piwik/network (0.2.0)2016-11-24T10:36:35.107+0100
STG/0 - Installing piwik/ini (1.0.6)2016-11-24T10:36:34.059+0100
STG/0 Downloading2016-11-24T10:36:34.059+0100
STG/0 Downloading2016-11-24T10:36:32.563+0100
STG/0 - Installing piwik/device-detector (3.7.3)2016-11-24T10:36:32.563+0100
STG/0 - Installing mustangostang/spyc (0.5.1)2016-11-24T10:36:31.378+0100
STG/0 Downloading2016-11-24T10:36:31.378+0100
STG/0 Downloading2016-11-24T10:36:29.894+0100
STG/0 - Installing piwik/decompress (1.2.0)2016-11-24T10:36:29.894+0100
STG/0 Downloading2016-11-24T10:36:28.581+0100
STG/0 - Installing pear/archive_tar (1.4.2)2016-11-24T10:36:28.581+0100
STG/0 Downloading2016-11-24T10:36:27.329+0100
STG/0 - Installing piwik/cache (1.0.1)2016-11-24T10:36:27.328+0100
STG/0 Downloading2016-11-24T10:36:25.918+0100
STG/0 - Installing doctrine/cache (v1.6.0)2016-11-24T10:36:25.917+0100
STG/0 Downloading2016-11-24T10:36:24.653+0100
STG/0 - Installing php-di/php-di (5.4.0)2016-11-24T10:36:24.652+0100
STG/0 Downloading2016-11-24T10:36:23.540+0100
STG/0 - Installing php-di/invoker (1.3.3)2016-11-24T10:36:23.539+0100
STG/0 Downloading2016-11-24T10:36:22.203+0100
STG/0 - Installing container-interop/container-interop (1.1.0)2016-11-24T10:36:22.203+0100
STG/0 Downloading2016-11-24T10:36:21.036+0100
STG/0 - Installing php-di/phpdoc-reader (2.0.1)2016-11-24T10:36:21.035+0100
STG/0 Downloading2016-11-24T10:36:19.921+0100
STG/0 - Installing pear/pear-core-minimal (v1.10.1)2016-11-24T10:36:19.920+0100
STG/0 Downloading2016-11-24T10:36:18.790+0100
STG/0 - Installing pear/console_getopt (v1.4.1)2016-11-24T10:36:18.790+0100
STG/0 Downloading2016-11-24T10:36:17.674+0100
STG/0 - Installing pear/pear_exception (v1.0.0)2016-11-24T10:36:17.673+0100
STG/0 Downloading2016-11-24T10:36:16.319+0100
STG/0 - Installing leafo/lessphp (v0.5.0)2016-11-24T10:36:16.318+0100
STG/0 Downloading2016-11-24T10:36:15.160+0100
STG/0 - Installing composer/semver (1.3.0)2016-11-24T10:36:15.157+0100
STG/0Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. Run update to update them.2016-11-24T10:36:15.141+0100
STG/0Installing dependencies from lock file2016-11-24T10:36:15.138+0100
STG/0Loading composer repositories with package information2016-11-24T10:36:15.133+0100
STG/0PHP Warning: PHP Startup: Unable to load dynamic library '/tmp/staged/app/php/lib/php/extensions/no-debug-non-zts-20131226/geoip.so' - /tmp/staged/app/php/lib/php/extensions/no-debug-non-zts-20131226/geoip.so: cannot open shared object file: No such file or directory in Unknown on line 02016-11-24T10:36:14.935+0100
STG/0 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 283 100 283 0 0 588 0 --:--:-- --:--:-- --:--:-- 5882016-11-24T10:36:14.913+0100
STG/0 Dload Upload Total Spent Left Speed2016-11-24T10:36:14.433+0100
STG/0 % Total % Received % Xferd Average Speed Time Time Time Current2016-11-24T10:36:14.433+0100
STG/0The extension 'tokenizer' is not provided by this buildpack.2016-11-24T10:36:10.005+0100
STG/0The extension 'reflection' is not provided by this buildpack.2016-11-24T10:36:10.005+0100
STG/0The extension 'dom' is not provided by this buildpack.2016-11-24T10:36:10.005+0100
STG/0The extension 'pcre' is not provided by this buildpack.2016-11-24T10:36:10.005+0100
STG/0The extension 'json' is not provided by this buildpack.2016-11-24T10:36:10.005+0100
STG/0The extension 'spl' is not provided by this buildpack.2016-11-24T10:36:10.005+0100
STG/0Cloning into 'compile-extensions'...2016-11-24T10:36:04.324+0100
STG/0Cloning into '/tmp/buildpacks/php-buildpack'...2016-11-24T10:36:01.056+0100
API/1encountered error: Staging error: failed to stage application: another staging request was initiated2016-11-24T10:35:51.304+0100
STG/0The extension 'json' is not provided by this buildpack.2016-11-24T10:35:46.407+0100
STG/0The extension 'reflection' is not provided by this buildpack.2016-11-24T10:35:46.407+0100
STG/0The extension 'tokenizer' is not provided by this buildpack.2016-11-24T10:35:46.407+0100
STG/0The extension 'pcre' is not provided by this buildpack.2016-11-24T10:35:46.407+0100
STG/0The extension 'spl' is not provided by this buildpack.2016-11-24T10:35:46.407+0100
STG/0The extension 'dom' is not provided by this buildpack.2016-11-24T10:35:46.407+0100
STG/0Cloning into 'compile-extensions'...2016-11-24T10:35:40.779+0100
STG/0Cloning into '/tmp/buildpacks/php-buildpack'...2016-11-24T10:35:38.030+0100```
joshisa commented 7 years ago

So ... technically most of these aren't errors ... but simply output from the buildpack staging process that unfortunately are being written to stderr rather than stdout. Some buildpacks are more chatty than others. For my successful deploy (I retried in a different org+space), I see a similar volume of output and the staging process seems to continue emitting these messages. The ones to be concerned about are ones under the APP prefix. You can filter for app messages (upper right dropdown) within the Bluemix web UI log view.

API/1encountered error: Staging error: failed to stage application: another staging request was initiated One odd error in your output is the indication of multiple staging requests. Not sure why that occurred.

Could you describe "fails" a bit more? Does your app url bring up the installation page at all?

If you have the cloudfoundry CLI installed and non-Windows OS, could you run in a bash/cmd terminal: cf logs piwikeval --recent | grep 'error\|Error'

For Windows, you'd need something like Cygwin to run grep. Or you could look through the output of the logs command manually for the "error" string.

petschni commented 7 years ago

I tried it again and encountered the following:

The first time I start the app it just "crashes" (although you don't see anything in the log). The second time the app started ok without an error and I can access the landing page.

So I think we can close this issue although I am not a 100% sure what fixed it ;-)

joshisa commented 7 years ago

My best guess is that I haven't placed any wait to allow for the Compose Redis service instance provisioning. If your deploy wasn't able to use the RedisCloud tier (presuming that you're deploying into the Bluemix UK London region or already have a rediscloud free instance), then I fall back to Compose Redis. Unfortunately, there is a bit of time lag after the service is created before it's provisioned and ready for app use. If that's the case, then your observation of it crashing and then the CloudFoundry health check behavior of attempting to restart the app again with subsequent success makes sense.

The only way to confirm this guess would be to deploy a new piwikstart app and then in a separate tab click on the service tile of the piwikredis_named service. You should see either ready or something like provisioning/not ready. If you watch the app logs, you'll notice that it crashes and will try to start again. If the service still isn't ready, it will probably crash again and try to start again until it ultimately succeeds.

joshisa commented 7 years ago

Reopening to add some wait within the script to avoid app crashes when Compose is used.