CyCoreSystems / docker-meteor

Dockerfile and script for running Meteor on Docker
MIT License
120 stars 73 forks source link

Unable to locate server directory in; using mup #27

Closed avishaan closed 7 years ago

avishaan commented 7 years ago

I'm using Kadira/Mup with the following config

module.exports = {
  servers: {
    one: {
      host: "55.55.84.25",
      username: "root",
      pem: "/Users/avi/.ssh/id_rsa.pem",
    }
  },

  meteor: {
    name: 'app',
    path: '../',
    servers: {
      one: {}
    },
    buildOptions: {
      serverOnly: true,
    },
    env: {
      ROOT_URL: 'http://app.com',
      MONGO_URL: 'mongodb://localhost:27017/app'
    },

    dockerImage: 'ulexus/meteor:v1.4',
    deployCheckWaitTime: 280
  },

  mongo: {
    oplog: true,
    port: 27017,
    servers: {
      one: {},
    },
  },
};

and I keep getting

pasted_image_9_23_16__9_07_am

I'm not sure how familiar you are with mup but incase you are were hoping you could lead me in the right direction

avishaan commented 7 years ago

here is my package.json, I noticed you have asked others for that in the past

{
  "name": "app",
  "private": true,
  "scripts": {
    "start": "meteor run"
  },
  "dependencies": {
    "bcrypt": "^0.8.7",
    "c3": "^0.4.11",
    "chart.js": "^2.1.6",
    "lodash": "^4.13.1",
    "meteor-node-stubs": "~0.2.0",
    "moment": "^2.14.1",
    "papaparse": "^4.1.2",
    "react": "^15.2.0",
    "react-addons-pure-render-mixin": "^15.2.1",
    "react-dom": "^15.2.0",
    "react-mounter": "^1.2.0"
  }
}
avishaan commented 7 years ago

@Ulexus I also tried to use your command based deploy instead of MUP I get the following error

/usr/bin/entrypoint.sh: line 106:    56 Killed                  meteor build --directory ${APP_DIR}

My deploy command looks as follows

docker run --rm -e RELEASE=1.4.1 -e ROOT_URL=http://55.55.84.25 -e REPO=git@github.com:codeHatcher/autoDashboardGenerator.git -e DEPLOY_KEY=/root/.ssh/id_rsa -v /root/.ssh/id_rsa:/root/.ssh/id_rsa -e BRANCH=feature/upgradeMeteor -e MONGO_URL=mongodb://localhost:27017/app ulexus/meteor:v1.4
Ulexus commented 7 years ago

I have no particular knowledge of mup, no. I wonder if you are seeing a problem from #26 since you are using NPM packages. I would hope you have more logging than just the one you posted, though; that's the result, not the cause.

If the updated image doesn't work for you, could you post your container logs in their entirety (or at least the last dozen lines or so)?

avishaan commented 7 years ago

No worries about mup, I figure if I can use your command based approach that will be good enough for my use.

I'll run it again and get you the rest of the context of the logs

avishaan commented 7 years ago

That's all it shows me, how do I get more logs?

pasted_image_9_23_16__9_05_am

Ulexus commented 7 years ago

Okay, then. Something is killing it externally. The first place I would look is at the kernel logs (dmesg) to see if the out of memory killer is the culprit. It may also show a segmentation fault, if that is the cause.

avishaan commented 7 years ago

ran dmesg with no arguments, not sure what to look for

0*1024kB 0*2048kB 0*4096kB = 3896kB                                                                                   [139352.495706] Node 0 DMA32: 238*4kB (UMEH) 127*8kB (UMEH) 82*16kB (UEH) 1*32kB (H) 3*64kB (H) 3*128kB (H) 1*256kB (H) 1*512kB (H) 0*1024kB 0*2048kB 0*4096kB = 4656kB
[139352.495732] Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=1048576kB
[139352.495757] Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=2048kB
[139352.495760] 1010 total pagecache pages
[139352.495783] 0 pages in swap cache
[139352.495791] Swap cache stats: add 0, delete 0, find 0/0                                                           [139352.495793] Free swap  = 0kB                                                                                      [139352.495795] Total swap = 0kB                                                                                      [139352.495798] 130972 pages RAM                                                                                      [139352.495799] 0 pages HighMem/MovableOnly
[139352.495801] 5867 pages reserved
[139352.495803] 0 pages cma reserved
[139352.495805] 0 pages hwpoisoned                                                                                    [139352.495807] [ pid ]   uid  tgid total_vm      rss nr_ptes nr_pmds swapents oom_score_adj name
[139352.495819] [  662]     0   662     4870       59      14       3        0             0 upstart-udev-br
[139352.495825] [  669]     0   669    12880      136      28       3        0         -1000 systemd-udevd
[139352.495829] [  909]     0   909     3849       85      13       3        0             0 upstart-socket-
[139352.495834] [ 1139]   102  1139     9806      112      23       3        0             0 dbus-daemon
[139352.495838] [ 1186]     0  1186    10887      105      26       3        0             0 systemd-logind
[139352.495841] [ 1188]   101  1188    63961     1005      28       4        0             0 rsyslogd                 [139352.495845] [ 1229]     0  1229     3853       76      14       3        0             0 upstart-file-br
[139352.495849] [ 1312]     0  1312     4015       42      13       3        0             0 getty
[139352.495853] [ 1316]     0  1316     4015       41      13       3        0             0 getty                    [139352.495856] [ 1321]     0  1321     4015       41      13       3        0             0 getty
[139352.495860] [ 1322]     0  1322     4015       41      13       3        0             0 getty
[139352.495863] [ 1324]     0  1324     4015       40      13       3        0             0 getty
[139352.495867] [ 1358]     0  1358     1093       38       8       3        0             0 acpid
[139352.495871] [ 1359]     0  1359     4785       43      13       3        0             0 atd
[139352.495874] [ 1360]     0  1360     5914       55      17       3        0             0 cron
[139352.495878] [ 1369]     0  1369    15346      169      34       3        0         -1000 sshd
[139352.495882] [ 1447]     0  1447     4015       42      13       3        0             0 getty
[139352.495885] [ 2602]     0  2602     5916       63      17       3        0             0 cgmanager
[139352.495889] [ 2816]   107  2816     7052       62      18       3        0             0 dnsmasq
[139352.495893] [ 4788]     0  4788   132011     4813      86       5        0          -500 dockerd
[139352.495897] [ 4797]     0  4797    77430      791      31       5        0          -500 docker-containe
[139352.495914] [ 3269]     0  3269    16298      116      37       3        0             0 sudo
[139352.495918] [ 3270]     0  3270    29800      839      25       5        0             0 docker
[139352.495922] [ 6815]     0  6815    16298      115      36       3        0             0 sudo
[139352.495926] [ 6816]     0  6816    29800      841      24       6        0             0 docker
[139352.495930] [10348]     0 10348    16298      115      37       3        0             0 sudo
[139352.495934] [10349]     0 10349    29800      855      24       5        0             0 docker
[139352.495938] [11000]     0 11000    25239      105      16       5        0          -500 docker-proxy
[139352.495942] [11012]     0 11012    49761      122      20       5        0          -500 docker-containe
[139352.495945] [11028]   999 11028    65479     9811      85       3        0             0 mongod
[139352.495950] [30324]     0 30324    12845      901      25       3        0             0 mosh-server
[139352.495953] [30325]     0 30325     6594     1391      18       3        0             0 bash                     [139352.495957] [30586]     0 30586     1112       21       8       3        0             0 sh
[139352.495961] [30587]     0 30587    37996      894      28       5        0             0 docker[139352.495965] [30622]     0 30622    33377      100      21       5        0          -500 docker-containe
[139352.495969] [30647]     0 30647     5022       76      15       3        0             0 entrypoint.sh[139352.495973] [30722]     0 30722   385193    83795     346     262        0             0 node
[139352.495976] Out of memory: Kill process 30722 (node) score 674 or sacrifice child
[139352.502708] Killed process 30722 (node) total-vm:1540772kB, anon-rss:335180kB, file-rss:0kB
[139352.763717] docker0: port 2(veth05c24da) entered disabled state
[139352.766558] veth5f51b1c: renamed from eth0
[139352.815366] docker0: port 2(veth05c24da) entered disabled state
[139352.816689] device veth05c24da left promiscuous mode
[139352.816696] docker0: port 2(veth05c24da) entered disabled state
Ulexus commented 7 years ago

Yep; that's it. Your system is running out of memory building Meteor. Notice the line saying that process 30722 was killed; it was running node, which is almost certainly the Meteor build process.

Now, the question, of course, is why it is running out of memory. If this is a RAM-constrained system, then that could explain it, but it is likely enough that something in the build is messed up. Can you build it manually, yourself?

avishaan commented 7 years ago

Yes, it was a memory issue. I added a swap file and seem to have gotten further. Will keep you up to date as I finish this off

avishaan commented 7 years ago

I now have another issue, but I think my issue above is at least closed out

avishaan commented 7 years ago

Much appreciated