[SOLVED] $mup deploy successful, but site can’t be reached


#1

Hi,

I am on 1.5.1, and uploading my app to EC2. I followed this instruction: https://medium.com/@philipaffulnunoo/how-to-deploy-meteor-1-4-app-to-aws-ec2-in-2017-bfea1a7c308a, and all of my setups have been successful:

$mup setup

Started TaskList: Setup Docker
[54.199.143.9] - Setup Docker
[54.199.143.9] - Setup Docker: SUCCESS

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

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

Started TaskList: Start Mongo
[54.199.143.9] - Start Mongo
[54.199.143.9] - Start Mongo: SUCCESS

and

$mup deploy

Started TaskList: Pushing Meteor App
[54.199.143.9] - Pushing Meteor App Bundle to The Server
[54.199.143.9] - Pushing Meteor App Bundle to The Server: SUCCESS

Started TaskList: Configuring App
[54.199.143.9] - Pushing the Startup Script
[54.199.143.9] - Pushing the Startup Script: SUCCESS
[54.199.143.9] - Sending Environment Variables
[54.199.143.9] - Sending Environment Variables: SUCCESS

Started TaskList: Start Meteor
[54.199.143.9] - Start Meteor
[54.199.143.9] - Start Meteor: SUCCESS
[54.199.143.9] - Verifying Deployment
[54.199.143.9] - Verifying Deployment: SUCCESS

Here is my mup.json

module.exports = {
  servers: {
    one: {
      // TODO: set host address, username, and authentication method
      host: '54.199.143.9',
      username: 'ubuntu',
      pem: '/Users/leeyude/Projects/myapp/myapp.pem',
      // password: 'server-password'
      // or neither for authenticate from ssh-agent
    }
  },

  meteor: {
    // TODO: change app name and path
    name: 'my app name',
    path: 'my app 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://
      "port":3000,
      ROOT_URL: 'http://www.myapp.com',
      MONGO_URL: 'mongodb://54.199.143.9/meteor',
    },

    // ssl: { // (optional)
    //   // Enables let's encrypt (optional)
    //   autogenerate: {
    //     email: 'email.address@domain.com',
    //     // comma seperated list of domains
    //     domains: 'website.com,www.website.com'
    //   }
    // },

    docker: {
      // change to 'kadirahq/meteord' if your app is not using Meteor 1.4
      image: 'abernix/meteord:base',
      // imagePort: 80, // (default: 80, some images EXPOSE different ports)
    },

    // This is the maximum time in seconds it will wait
    // for your app to start
    // Add 30 seconds if the server has 512mb of ram
    // And 30 more if you have binary npm dependencies.
    deployCheckWaitTime: 60,

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

  mongo: {
    port: 27017,
    version: '3.4.1',
    servers: {
      one: {}
    }
  }
};

However, my Chrome browser keeps saying: This site can’t be reached. Anyone could help?


#2

Have you setup your instance to accept connections on the port your server is configured to (i.e. 3000)?

I am also wondering why you set the port to 3000. Was this intentionally? Normally, the server should run on either 80 or 443, unless you have more servers on the same instance.

The tutorial you linked opens ports 80 and 443 only, so your setup cannot work.


#3

I tried port:80, not putting the line of port:80, and 3000, and none of them allowed me to reach my site…


#4

Did you allow the port in the config of your EC2 instance?


#5

You made my day! My security group setup was not completed for some reason. After I launched a new instance and replaced info in the mup.json file, everything works as expected! Thank you so much @waldgeist!


#6

Always here to help :slight_smile:


#7

PS: I recommend to mark this question as [Solved]