Search code examples
amazon-web-servicesmeteordeploymentamazon-ec2meteor-up

Meteor-up : deploy does not update app on AWS EC2


I am hosting a Meteor app on an AWS EC2 instance. I successfully managed to deploy my app twice using Meteor-up (mup deploy command).

But after some modification, mup deploy still return a perfectly fine message (below) but does nothing, the app is not updated. I tried rebooting the instance after that (and cleaning my own cache) but I still got the old version.

Building App Bundle Locally

Started TaskList: Pushing Meteor
[XX.XX.XX.X] - Pushing Meteor App Bundle to The Server
[XX.XX.XX.X] - Pushing Meteor App Bundle to The Server: SUCCESS
[XX.XX.XX.X] - Pushing the Startup Script
[XX.XX.XX.X] - Pushing the Startup Script: SUCCESS

I can connect to the app using ssh, but I don't know what to do next. I switched to Meteor 1.4.1 (from Meteor 1.4.0) recently, but I don't think this is related.

Could someone please help me to investigate this issue / provide some possible solutions ?

Edit : here is the log from the docker info command. I have two containers running, but deploying does not seem to increase this number, I am not familiar with Docker either.

Containers: 2
 Running: 2
 Paused: 0
 Stopped: 0
Images: 4
Server Version: 1.12.0
Storage Driver: aufs
 Root Dir: /var/lib/docker/aufs
 Backing Filesystem: extfs
 Dirs: 20
 Dirperm1 Supported: false
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: bridge null host overlay
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Security Options: apparmor
Kernel Version: 3.13.0-93-generic
Operating System: Ubuntu 14.04.4 LTS
OSType: linux
Architecture: x86_64
CPUs: 1
Total Memory: 992.5 MiB
Name: ip-XXX-XX-XX-XX
ID: XXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
WARNING: No swap limit support
Insecure Registries:
 127.0.0.0/8

Edit 2 : The issue seems to be related to some kind of fake positive. Deployment is okay, but the app actually crash on launch and thus rollback to the last version, according to docker logs.


Solution

  • Okay I found the issue. My settings.json file had a syntax error (trailing comma), so the app actually crashed on start.

    To get this info, I connected to my EC2 instance using ssh. Then I found the container id using docker ps and I used the docker logs MyContainerId command to get the app logs. mup logs should actually give the same info without the need of an ssh connection to the instance, but there is an open issue about it and it does not work.

    The logs told me that Meteor.settings was undefined, I simply fixed it. I opened an issue on Github here https://github.com/kadirahq/meteor-up/issues/242 , since I think mup deploy should have informed me about the crash from the beginning.