3

我想要做的是推送自动生成的默认流星应用程序

meteor create myApp

到运行 raspbian stretch lite 的 raspberryPi3B+。

我被困在 Meteor Up 页面上的第 2-3 步:http: //meteor-up.com/getting-started.html

在步骤 2 中配置我的“ mup.js ”文件时,我一定有问题,运行后在步骤 3 中抛出错误

sudo mup setup --verbose

我在终端中输出以下内容:

Started TaskList: Setup Docker
[192.168.1.30] - Setup Docker
18.06.1-ce
Major 18
Minor 06
[192.168.1.30] - Setup Docker: SUCCESS

Started TaskList: Setup Meteor
[192.168.1.30] - Setup Environment
[192.168.1.30] - Setup Environment: SUCCESS

Started TaskList: Setup Mongo
[192.168.1.30] - Setup Environment
[192.168.1.30] - Setup Environment: SUCCESS
[192.168.1.30] - Copying mongodb.conf
[192.168.1.30] - Copying mongodb.conf: SUCCESS

Started TaskList: Start Mongo
[192.168.1.30] - Start Mongo
3.4.1: Pulling from library/mongo
Digest: sha256:aff0c497cff4f116583b99b21775a8844a17bcf5c69f7f3f6028013bf0d6c00c
Status: Image is up to date for mongo:3.4.1
mongodb
Error response from daemon: Container 7d3155f5765a449501cb31f5150f4fb671a4e63b153fd49d702edb597679f1f8 is restarting, wait until the container is running
mongodb
Running mongo:3.4.1
9c0755e4657323e0f4661713a32aeb0fa337debfab9d51c35437ef5879eef1eb
Creating replica set
Error response from daemon: Container 9c0755e4657323e0f4661713a32aeb0fa337debfab9d51c35437ef5879eef1eb is restarting, wait until the container is running
Error response from daemon: Container 9c0755e4657323e0f4661713a32aeb0fa337debfab9d51c35437ef5879eef1eb is restarting, wait until the container is running
Error response from daemon: Container 9c0755e4657323e0f4661713a32aeb0fa337debfab9d51c35437ef5879eef1eb is restarting, wait until the container is running
Error response from daemon: Container 9c0755e4657323e0f4661713a32aeb0fa337debfab9d51c35437ef5879eef1eb is restarting, wait until the container is running
Error response from daemon: Container 9c0755e4657323e0f4661713a32aeb0fa337debfab9d51c35437ef5879eef1eb is restarting, wait until the container is running
Error response from daemon: Container 9c0755e4657323e0f4661713a32aeb0fa337debfab9d51c35437ef5879eef1eb is restarting, wait until the container is running
Error response from daemon: Container 9c0755e4657323e0f4661713a32aeb0fa337debfab9d51c35437ef5879eef1eb is restarting, wait until the container is running
Error response from daemon: Container 9c0755e4657323e0f4661713a32aeb0fa337debfab9d51c35437ef5879eef1eb is restarting, wait until the container is running
Error response from daemon: Container 9c0755e4657323e0f4661713a32aeb0fa337debfab9d51c35437ef5879eef1eb is restarting, wait until the container is running
Error response from daemon: Container 9c0755e4657323e0f4661713a32aeb0fa337debfab9d51c35437ef5879eef1eb is restarting, wait until the container is running
Error response from daemon: Container 9c0755e4657323e0f4661713a32aeb0fa337debfab9d51c35437ef5879eef1eb is restarting, wait until the container is running
Error response from daemon: Container 9c0755e4657323e0f4661713a32aeb0fa337debfab9d51c35437ef5879eef1eb is restarting, wait until the container is running
Error response from daemon: Container 9c0755e4657323e0f4661713a32aeb0fa337debfab9d51c35437ef5879eef1eb is restarting, wait until the container is running
Error response from daemon: Container 9c0755e4657323e0f4661713a32aeb0fa337debfab9d51c35437ef5879eef1eb is restarting, wait until the container is running
Error response from daemon: Container 9c0755e4657323e0f4661713a32aeb0fa337debfab9d51c35437ef5879eef1eb is restarting, wait until the container is running
Error response from daemon: Container 9c0755e4657323e0f4661713a32aeb0fa337debfab9d51c35437ef5879eef1eb is restarting, wait until the container is running
Error response from daemon: Container 9c0755e4657323e0f4661713a32aeb0fa337debfab9d51c35437ef5879eef1eb is restarting, wait until the container is running
Error response from daemon: Container 9c0755e4657323e0f4661713a32aeb0fa337debfab9d51c35437ef5879eef1eb is restarting, wait until the container is running
Error response from daemon: Container 9c0755e4657323e0f4661713a32aeb0fa337debfab9d51c35437ef5879eef1eb is restarting, wait until the container is running
Error response from daemon: Container 9c0755e4657323e0f4661713a32aeb0fa337debfab9d51c35437ef5879eef1eb is restarting, wait until the container is running
Failed connecting to mongo to create replica set
[192.168.1.30] x Start Mongo: FAILED

          ------------------------------------STDERR------------------------------------
          Error response from daemon: Container 7d3155f5765a449501cb31f5150f4fb671a4e63b153fd49d702edb597679f1f8 is restarting, wait until the container is running
    Error response from daemon: Container 9c0755e4657323e0f4661713a32aeb0fa337debfab9d51c35437ef5879eef1eb is restarting, wait until the container is running
    Error response from daemon: Container 9c0755e4657323e0f4661713a32aeb0fa337debfab9d51c35437ef5879eef1eb is restarting, wait until the container is running
    Error response from daemon: Container 9c0755e4657323e0f4661713a32aeb0fa337debfab9d51c35437ef5879eef1eb is restarting, wait until the container is running
    Error response from daemon: Container 9c0755e4657323e0f4661713a32aeb0fa337debfab9d51c35437ef5879eef1eb is restarting, wait until the container is running
    Error response from daemon: Container 9c0755e4657323e0f4661713a32aeb0fa337debfab9d51c35437ef5879eef1eb is restarting, wait until the container is running
    Error response from daemon: Container 9c0755e4657323e0f4661713a32aeb0fa337debfab9d51c35437ef5879eef1eb is restarting, wait until the container is running
    Error response from daemon: Container 9c0755e4657323e0f4661713a32aeb0fa337debfab9d51c35437ef5879eef1eb is restarting, wait until the container is running
    Error response from daemon: Container 9c0755e4657323e0f4661713a32aeb0fa337debfab9d51c35437ef5879eef1eb is restarting, wait until the container is running
    Error response from daemon: Container 9c0755e4657323e0f4661713a32aeb0fa337debfab9d51c35437ef5879eef1eb is restarting, wait until the container is running
    Error response from daemon: Container 9c0755e4657323e0f4661713a32aeb0fa337debfab9d51c35437ef5879eef1eb is restarting, wait until the container is running
    Error response from daemon: Container 9c0755e4657323e0f4661713a32aeb0fa337debfab9d51c35437ef5879eef1eb is restarting, wait until the container is running
    Error response from daemon: Container 9c0755e4657323e0f4661713a32aeb0fa337debfab9d51c35437ef5879eef1eb is restarting, wait until the container is running
    Error response from daemon: Container 9c0755e4657323e0f4661713a32aeb0fa337debfab9d51c35437ef5879eef1eb is restarting, wait until the container is running
    Error response from daemon: Container 9c0755e4657323e0f4661713a32aeb0fa337debfab9d51c35437ef5879eef1eb is restarting, wait until the container is running
    Error response from daemon: Container 9c0755e4657323e0f4661713a32aeb0fa337debfab9d51c35437ef5879eef1eb is restarting, wait until the container is running
    Error response from daemon: Container 9c0755e4657323e0f4661713a32aeb0fa337debfab9d51c35437ef5879eef1eb is restarting, wait until the container is running
    Error response from daemon: Container 9c0755e4657323e0f4661713a32aeb0fa337debfab9d51c35437ef5879eef1eb is restarting, wait until the container is running
    Error response from daemon: Container 9c0755e4657323e0f4661713a32aeb0fa337debfab9d51c35437ef5879eef1eb is restarting, wait until the container is running
    Error response from daemon: Container 9c0755e4657323e0f4661713a32aeb0fa337debfab9d51c35437ef5879eef1eb is restarting, wait until the container is running
    Error response from daemon: Container 9c0755e4657323e0f4661713a32aeb0fa337debfab9d51c35437ef5879eef1eb is restarting, wait until the container is running
    Failed connecting to mongo to create replica set

          ------------------------------------STDOUT------------------------------------
          3.4.1: Pulling from library/mongo
    Digest: sha256:aff0c497cff4f116583b99b21775a8844a17bcf5c69f7f3f6028013bf0d6c00c
    Status: Image is up to date for mongo:3.4.1
    mongodb
    mongodb
    Running mongo:3.4.1
    9c0755e4657323e0f4661713a32aeb0fa337debfab9d51c35437ef5879eef1eb
    Creating replica set

          ------------------------------------------------------------------------------

我的“ mup.js ”配置文件如下:

module.exports = {
  servers: {
    one: {
      // TODO: set host address, username, and authentication method
      host: '192.xxx.x.xx',
      username: 'pi',
      // pem: './path/to/pem'
      password: 'password'
      // or neither for authenticate from ssh-agent
    }
  },

  app: {
    // TODO: change app name and path
    name: 'ceresTestApp',
    path: '../',

    servers: {
      one: {},
    },

    buildOptions: {
      serverOnly: true,
    },

    env: {
      // TODO: Change to your app's url
      // If you are using ssl, it needs to start with https://
      ROOT_URL: 'http://app.com',
      MONGO_URL: 'mongodb://mongodb/meteor',
      MONGO_OPLOG_URL: 'mongodb://mongodb/local',
    },

    docker: {
      // change to 'abernix/meteord:base' if your app is using Meteor 1.4 - 1.5
      image: 'abernix/meteord:node-8.4.0-base',
    },


    // Show progress bar while uploading bundle to server
    // You might need to disable it on CI servers
    enableUploadProgressBar: true
  },

  mongo: {
    version: '3.4.1',
    servers: {
      one: {}
    }
  },

  // (Optional)
  // Use the proxy to setup ssl or to route requests to the correct
  // app when there are several apps

  // proxy: {
  //   domains: 'mywebsite.com,www.mywebsite.com',

  //   ssl: {
  //     // Enable Let's Encrypt
  //     letsEncryptEmail: 'email@domain.com'
  //   }
  // }
};

我必须承认我不知道“ROOT_URL”或“MONGO_URL”是什么。在这里找到的最小配置示例:http: //meteor-up.com/docs.html

对我在生成文件时保留的这两个字段使用相同的默认条目。所以我不太确定这是问题所在。

当我在终端循环之前查看错误开始的位置时,我看到了这个:

Status: Image is up to date for mongo:3.4.1
mongodb
Error response from daemon: Container 7d3155f5765a449501cb31f5150f4fb671a4e63b153fd49d702edb597679f1f8 is restarting, wait until the container is running
mongodb
Running mongo:3.4.1
9c0755e4657323e0f4661713a32aeb0fa337debfab9d51c35437ef5879eef1eb
Creating replica set
Error response from daemon: Container 9c0755e4657323e0f4661713a32aeb0fa337debfab9d51c35437ef5879eef1eb is restarting, wait until the container is running

我的解释是 MongoDB 已安装并且是最新的。当设置过程尝试使用 Docker 运行 MongoDB 时,问题就开始了,因为不断循环的点是指容器。在我真的不知道从哪里开始之前从未与 docker 合作过。

运行时我的 MongoDB 进程似乎出了什么问题

sudo mup setup --verbose

?

打算去看一些关于 docker 的视频,而我把这个放在这里一会儿。

抱歉,我只是想提供尽可能多的细节。如果我能做些什么来改进我的问题的格式,请告诉我。

提前致谢!

4

1 回答 1

0

我有两个选择:

  1. Whit bild-in mongo change MONGO_URL: 'mongodb://localhost/ADD_HERE_DB_NAME', setoplog: true和 removeversion你有的地方mongo。像这样:
mongo: {
    oplog: true,
    port: 27017,
    servers: {
        one: {},
    },
}
  1. Whit 外部数据库。在您的 raspberryPi3B+ 或其他主机上安装 mongodb。

    设置MONGO_URL: 'mongodb://DB_USERNAME:USER_PASSWORD@DB_HOST_IP:DB_PORT/DB_NAME'
    删除:
mongo: {
    version: '3.4.1',
    servers: {
        one: {},
    },
}

我推荐第二个选项,因为更容易备份你的数据库。

于 2019-01-24T23:31:50.907 回答