Rocket.chat: Rocket.chat not starting with server

Created on 8 Mar 2017  路  10Comments  路  Source: RocketChat/Rocket.Chat

I used the troubleshooting section of the documentation and
/usr/local/bin/docker-compose up
works very well. The server is up and running. But if i exit the terminal in which i executed this command (via SSH), it will stop. The rocket does not start when i reboot the server... What should i do ?

Rocket.Chat Version: 0.53
Running Instances: 1
DB Replicaset OpLog: Disabled (?)
Node Version: v4.7.3

deployment support

Most helpful comment

Try doing docker-compose up -d rocketchat.

All 10 comments

You are probably experiencing the same issue I had and which would happen at random. I simply added restart: always.

@k0nsl ok but where should i add that ?

@Julianoe: You add it to your docker-compose.yml file, specifically for the chat container but you could add it to both containers as well.

Here is my docker-compose.yml file

db:
  image: mongo
  volumes:
    - ./data/runtime/db:/data/db
    - ./data/dump:/dump
  command: mongod --smallfiles

rocketchat:
  image: rocketchat/rocket.chat:latest
  environment:
    - MONGO_URL=mongodb://db:27017/rocketchat
    - ROOT_URL=https://mychaturl.fr
    - Accounts_UseDNSDomainCheck=True
  links:
    - db:db
  ports:
    - 3000:3000

hubot:
  restart:always
  image: rocketchat/hubot-rocketchat:v0.1.4
  environment:
    - ROCKETCHAT_URL=myip:3000
    - ROCKETCHAT_ROOM=GENERAL
    - ROCKETCHAT_USER=MyPseudo
    - ROCKETCHAT_PASSWORD=pass
    - BOT_NAME=Botname
    - EXTERNAL_SCRIPTS=hubot-help,hubot-seen,hubot-links,hubot-greetings
  links:
    - rocketchat:rocketchat
# this is used to expose the hubot port for notifications on the host on port 3001, e.g. for hubot-jenkins-notifier
  ports:
    - 3001:8080

I'm sorry i tried in several lines but the server even after reboot does not start the rocket chat :/
Sorry my request may be a very simple problem but it is my first instance of Rocket and first use of Docker ^^

You put it in the hubot section: put it in the rocketchat section instead.

My docker-compose.yml looks like this:

mongo:
  image: mongo
# volumes:
#    - ./data/runtime/db:/data/db
#    - ./data/dump:/dump
  command: mongod --smallfiles --oplogSize 128

chat:
  image: rocketchat/rocket.chat:latest
# volumes:
#    - ./uploads:/app/uploads
  environment:
    - PORT=3000
    - ROOT_URL=https://k0nsl.org
    - MONGO_URL=mongodb://mongo:27017/rocketchat
  links:
    - mongo:mongo
  ports:
    - 3000:3000
  restart: always

Thanks for your answer and help !

I edited the file and did the reboot command on my server to test it but it still does not restart.
It still works when i do the following command though

cd /var/www/rocket.chat
/usr/local/bin/docker-compose up

I modified my .ylm and put restart: always in the rocketchat section as you recommended

db:
  image: mongo
  volumes:
    - ./data/runtime/db:/data/db
    - ./data/dump:/dump
  command: mongod --smallfiles

rocketchat:
  image: rocketchat/rocket.chat:latest
  environment:
    - MONGO_URL=mongodb://db:27017/rocketchat
    - ROOT_URL=https://mychaturl.fr
    - Accounts_UseDNSDomainCheck=True
  links:
    - db:db
  ports:
    - 3000:3000
  **restart: always**

hubot:
  image: rocketchat/hubot-rocketchat:v0.1.4
  environment:
    - ROCKETCHAT_URL=myip:3000
    - ROCKETCHAT_ROOM=GENERAL
    - ROCKETCHAT_USER=MyPseudo
    - ROCKETCHAT_PASSWORD=pass
    - BOT_NAME=Botname
    - EXTERNAL_SCRIPTS=hubot-help,hubot-seen,hubot-links,hubot-greetings
  links:
    - rocketchat:rocketchat
# this is used to expose the hubot port for notifications on the host on port 3001, e.g. for hubot-jenkins-notifier
  ports:
    - 3001:8080

Do you have any other idea of what i could do to make it run in the background without having to execute it in the terminal via ssh?

Try doing docker-compose up -d rocketchat.

Hi ! It worked !
Well at first it did not but i figured by doing docker ps -a that one service of the three was not running.
So i ran docker-compose up -d hubot and now it is working as intended !

Just so i can understand it well, what does the -d rocketchat do ?

Anyway thanks for the help @k0nsl ! You rock !

The d flag means that it will run the container daemonized, in the background -- or as it says in the man page:

Detached mode: Run containers in the background

I'm glad I could be of help. I had some similar issues when I started with Docker, so you're not alone ;)

@rocket-cat close

Was this page helpful?
0 / 5 - 0 ratings

Related issues

karlprieb picture karlprieb  路  3Comments

lunitic picture lunitic  路  3Comments

engelgabriel picture engelgabriel  路  3Comments

neha1deshmukh picture neha1deshmukh  路  3Comments

Buzzele picture Buzzele  路  3Comments