为什么在推向openshift后重置mongodb [英] Why mongodb is reset after push to openshift

查看:74
本文介绍了为什么在推向openshift后重置mongodb的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将使用sails.js编写的应用程序部署到openshift上.

I am deploying my application written using sails.js onto the openshift.

它正常工作,但是当我提交新内容时.

It works properly but however when i commit something new.

然后它将再次构建并清理mongodb中的所有数据.

It will then build again and clean up all my data in the mongodb.

所以我想知道什么原因吗?

So I wonder any reasons?

对不起,我是openshift的新手

Sorry i am new to openshift

  1. 停止/启动MongoDB盒式磁带后是否可以清理正常的mongodb?

  1. Is it normal mongodb will be cleaned up after stop/start MongoDB cartridge?

如何将数据保留在mongodb中?我需要在停止时执行保存并在启动时恢复吗?

How to keep the data remained in the mongodb? do i need to perform save when stop and restore when start?

我很好奇它如何自动构建和重新启动墨盒? 我正在使用node.js插件,并已查看action_hooks,但没有明显的提示.只是想知道它将如何以及为什么会触发nodejs和mongodb墨盒重启?

I am curious how it automatically build and restart the cartridge? I am using the node.js cartidge and have looked into action_hooks but no obvious hint. Just wonder how and why it will trigger both nodejs and mongodb cartridge restart?

谢谢

这是我的日志消息

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 npm@1.3.6
remote: npm info using node@v0.10.26
remote: npm info preinstall app@0.0.1
remote: npm info build /var/lib/openshift/id/app-root/runtime/repo
remote: npm info linkStuff app@0.0.1
remote: npm info build /var/lib/openshift/id/app-root/runtime/repo/node_modules/config-multipaas
remote: npm info preinstall config-multipaas@0.1.0
remote: npm info linkStuff config-multipaas@0.1.0
remote: npm info install config-multipaas@0.1.0
remote: npm info postinstall config-multipaas@0.1.0
remote: npm info build /var/lib/openshift/id/app-root/runtime/repo/node_modules/restify
remote: npm info preinstall restify@2.8.5
remote: npm info linkStuff restify@2.8.5
remote: npm info install restify@2.8.5
remote: npm info postinstall restify@2.8.5
remote: npm info install app@0.0.1
remote: npm info postinstall app@0.0.1
remote: npm info prepublish app@0.0.1
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

推荐答案

通常不应清除您的数据.您的应用程序设置可能不正确.您可能需要检查所有设置是否正确.

It usually shouldn't clean out your data. You may have your application set up incorrectly. You may want to go through and check everything is set up correctly.

这篇关于为什么在推向openshift后重置mongodb的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆