Mup setup try to use already used port

My meteor version 1.5

I installed mup

npm install -g mup

I am doing deployment to ubuntu 14.

My config:

module.exports = {
  servers: {
    one: {
      host: 'server_ip',
      username: 'root',
      pem: '~/.ssh/id_rsa'
      // password: 'server-password'
      // or neither for authenticate from ssh-agent
    }
  },

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

    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://localhost/meteor',
    },

    docker: {
      // change to 'kadirahq/meteord' if your app is not using Meteor 1.4
      image: 'abernix/meteord:base',
      imagePort: 9090, // (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: {}
    }
  }
};

In server I have the following images of docker:

docker image ls
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
mongo               3.4.1 

When i run mup setup I obtaining:


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

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

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

Started TaskList: Start Mongo
[217.182.77.104] - Start Mongo
[217.182.77.104] x Start Mongo: FAILED
	
	-----------------------------------STDERR-----------------------------------
	Error response from daemon: Container 832688cf0dfcbc24baf3bd8c587cec773ce15f00bd8b241fa51be8cbc0748356 is not running
	docker: Error response from daemon: driver failed programming external connectivity on endpoint mongodb (3b8a406eedb401a71e908cda5edb857f61a18c4916538b838a9c9d279952b119): Error starting userland proxy: listen tcp 127.0.0.1:27017: bind: address already in use.
	-----------------------------------STDOUT-----------------------------------
	3.4.1: Pulling from library/mongo
	5040bd298390: Already exists
	ef697e8d464e: Already exists
	67d7bf010c40: Already exists
	bb0b4f23ca2d: Already exists
	8efff42d23e5: Already exists
	11dec5aa0089: Already exists
	e76feb0ad656: Already exists
	5e1dcc6263a9: Already exists
	2855a823db09: Already exists
	Digest: sha256:aff0c497cff4f116583b99b21775a8844a17bcf5c69f7f3f6028013bf0d6c00c
	Status: Downloaded newer image for mongo:3.4.1
	mongodb
	mongodb
	Running mongo:3.4.1
	5eee1f768c1dc252fc55d2fb45a34877da982616b9efaf5f53ca3a08dc81397b
	----------------------------------------------------------------------------

I changed mongo.port to 27018 but there is the same error

Had the same issue: https://github.com/zodern/meteor-up/issues/631

Step 1: see what is running on port 80

netstat -tulpn | grep :80

Step 2: stop program running on that port

sudo fuser -k 80/tcp

Step 3: restart app

mup restart

1 Like

On port 80 there was apache2

netstat -tulpn | grep :80
tcp6       0      0 :::80                   :::*                    LISTEN      2929/apache2    
tcp6       0      0 :::8000                 :::*                    LISTEN      2929/apache2

but although stopping apche2 does not help, I stopped mongod service on server and then mup setup finished with success.

1 Like