2015-06-15 2 views
1

Я развертываю свое приложение, написанное с помощью sails.js, в открывающемся списке.Почему mongodb сбрасывается после нажатия на openshift

Это нормально работает, но когда я совершаю что-то новое.

Затем он будет снова построен и очистят все мои данные в mongodb.

Так что я удивляюсь любым причинам?

К сожалению я новичок в OpenShift

  1. ли это нормальный MongoDB будет очищен после остановки/запуска MongoDB картридж?

  2. Как сохранить данные в mongodb? мне нужно выполнить сохранение при остановке и восстановлении при запуске?

  3. Мне любопытно, как он автоматически создает и перезапускает картридж? Я использую cartidge node.js и посмотрел на action_hooks, но явного намека. Просто интересно, как и почему это приведет к запуску обоих узлов и перезапуска картриджа mongodb?

Благодаря

Вот мой журнал сообщений

remote: Stopping NodeJS cartridge 
remote: Stopping MongoDB cartridge 
remote: Saving away previously installed Node modules 
remote: Building git ref 'master', commit 937dacf 
remote: 
remote: - Checking to see if Node.js version is installed ... 
remote: - Downloading and extracting http://nodejs.org/dist/v/node-v-linux-x64.tar.gz ... 
remote: % Total % Received % Xferd Average Speed Time Time  Time Current 
remote:         Dload Upload Total Spent Left Speed 
remote: 0  0 0  0 0  0  0  0 --:--:-- --:--:-- --:--:-- remote: 100 162 100 162 0  0 179  0 --:--:-- --:--:-- --:--:-- remote: 100 162 100 162 0  0 179  0 --:--:-- --:--:-- --:--:-- 179 
remote: 
remote: gzip: stdin: not in gzip format 
remote: tar: Child returned status 1 
remote: tar: Error is not recoverable: exiting now 
remote: - Done installing Node.js version 
remote: Building NodeJS cartridge 
remote: grep: /var/lib/openshift/id/app-root/runtime/repo//package.json: No such file or directory 
remote: grep: /var/lib/openshift/id/app-root/runtime/repo//package.json: No such file or directory 
remote: - PATH set to include custom node version() from 
remote:  /var/lib/openshift/id/app-root/data//node-v-linux-x64/bin 
remote:  PATH = /var/lib/openshift/id/app-root/data//node-v-linux-x64/bin:/var/lib/openshift/id//.node_modules/.bin:/bin:/usr/bin:/usr/sbin 
remote: - Installing dependencies w/ new version of npm ... 
remote: 
remote: npm info it worked if it ends with ok 
remote: npm info using [email protected] 
remote: npm info using [email protected] 
remote: npm info preinstall [email protected] 
remote: npm info build /var/lib/openshift/id/app-root/runtime/repo 
remote: npm info linkStuff [email protected] 
remote: npm info build /var/lib/openshift/id/app-root/runtime/repo/node_modules/config-multipaas 
remote: npm info preinstall [email protected] 
remote: npm info linkStuff [email protected] 
remote: npm info install [email protected] 
remote: npm info postinstall [email protected] 
remote: npm info build /var/lib/openshift/id/app-root/runtime/repo/node_modules/restify 
remote: npm info preinstall [email protected] 
remote: npm info linkStuff [email protected] 
remote: npm info install [email protected] 
remote: npm info postinstall [email protected] 
remote: npm info install [email protected] 
remote: npm info postinstall [email protected] 
remote: npm info prepublish [email protected] 
remote: npm info ok 
remote: Preparing build for deployment 
remote: Deployment id is c2e64369 
remote: Activating deployment 
remote: Starting MongoDB cartridge 
remote: - Checking to see if Node.js version is installed ... 
remote: - Downloading and extracting http://nodejs.org/dist/v/node-v-linux-x64.tar.gz ... 
remote: % Total % Received % Xferd Average Speed Time Time  Time Current 
remote:         Dload Upload Total Spent Left Speed 
remote: 0  0 0  0 0  0  0  0 --:--:-- --:--:-- --:--:-- remote: 100 162 100 162 0  0 282  0 --:--:-- --:--:-- --:--:-- 283 
remote: 
remote: gzip: stdin: not in gzip format 
remote: tar: Child returned status 1 
remote: tar: Error is not recoverable: exiting now 
remote: - Done installing Node.js version 
remote: 
remote: - pre_start_nodejs: Adding Node.js version binaries to path 
remote: - PATH set to include custom node version() from 
remote:  /var/lib/openshift/id/app-root/data//node-v-linux-x64/bin 
remote:  PATH = /var/lib/openshift/id/app-root/data//node-v-linux-x64/bin:/var/lib/openshift/id//.node_modules/.bin:/bin:/usr/bin:/usr/sbin 
remote: Running "clean:dev" (clean) task 
remote: 
remote: Running "jst:dev" (jst) task 
remote: >> Destination not written because compiled files were empty. 
remote: 
remote: Running "less:dev" (less) task 
remote: File .tmp/public/styles/importer.css created: 0 B → 619 B 
remote: 
remote: Running "copy:dev" (copy) task 
remote: Copied 11 files 
remote: 
remote: Running "coffee:dev" (coffee) task 
remote: 
remote: Running "concat:js" (concat) task 
remote: File ".tmp/public/concat/production.js" created. 
remote: 
remote: Running "concat:css" (concat) task 
remote: File ".tmp/public/concat/production.css" created. 
remote: 
remote: Running "uglify:dist" (uglify) task 
remote: File .tmp/public/min/production.min.js created: 177.15 kB → 122.79 kB 
remote: 
remote: Running "cssmin:dist" (cssmin) task 
remote: File .tmp/public/min/production.min.css created: 6.09 kB → 4.34 kB 
remote: 
remote: Running "sails-linker:prodJs" (sails-linker) task 
remote: padding length 4 
remote: File "views/layout.ejs" updated. 
remote: 
remote: Running "sails-linker:prodStyles" (sails-linker) task 
remote: padding length 4 
remote: File "views/layout.ejs" updated. 
remote: 
remote: Running "sails-linker:devTpl" (sails-linker) task 
remote: padding length 4 
remote: File "views/layout.ejs" updated. 
remote: 
remote: Running "sails-linker:prodJsJade" (sails-linker) task 
remote: 
remote: Running "sails-linker:prodStylesJade" (sails-linker) task 
remote: 
remote: Running "sails-linker:devTplJade" (sails-linker) task 
remote: 
remote: Done, without errors. 
remote: Starting NodeJS cartridge 
remote: Result: success 
remote: Activation status: success 
remote: Deployment completed with status: success 

ответ

3

Обычно не следует очистить данные. Возможно, ваше приложение настроено неправильно. Вы можете пройти проверку и проверить, что все настроено правильно.

+0

Спасибо за ответ. Я думаю, это может быть моя конфигурация парусов. И интересно, третий вопрос, как он запускает перезапуск картриджа? триггер с помощью git push, правильно? –

Смежные вопросы