How configure Rocket Chat and MongoDB in separatelly hosts?

I’m thinking there is something really wrong with what I’m doing
Now I tested with vagrant environment and got the same error.

Am I miss something?

here is my vagrantfile:

Vagrant.configure("2") do |config|
  config.vm.define "app" do |app|
    app.vm.box = "ubuntu/bionic64"
    app.vm.hostname = 'app'
    
    app.vm.network :public_network, ip: "192.168.10.16"

    app.vm.provider :virtualbox do |v|
      v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
      v.customize ["modifyvm", :id, "--memory", 1024]
    end
  end

  config.vm.define "db" do |db|
    db.vm.box = "ubuntu/bionic64"
    
    db.vm.network :public_network, ip: "192.168.10.17"

    db.vm.provider :virtualbox do |v|
      v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
      v.customize ["modifyvm", :id, "--memory", 1024]
    end
  end
end

I’m still using this link to configure my environment: https://rocket.chat/docs/installation/manual-installation/ubuntu/

and here is the commands below:

for mongodb installation:

# 1
sudo apt-get -y update

# 2
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4

# 3
echo "deb [ arch=amd64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.0.list

# 4
sudo apt-get install -y mongodb-org

# 5
sudo sed -i "s/^#  engine:/  engine: mmapv1/"  /etc/mongod.conf

# 6
sudo sed -i "s/^#replication:/replication:\n  replSetName: rs01/" /etc/mongod.conf

# 7
sudo systemctl enable mongod && sudo systemctl start mongod

# 8 (and finally!!)
mongo --eval "printjson(rs.initiate())"

for rocketchat installation:

# 1
sudo apt-get -y update && sudo apt-get install -y curl && curl -sL https://deb.nodesource.com/setup_12.x | sudo bash -

# 2 (PS.: just remove the mongodb-org below)
sudo apt-get install -y build-essential nodejs graphicsmagick

# 3
sudo npm install -g inherits n && sudo n 12.14.0

# 4
curl -L https://releases.rocket.chat/latest/download -o /tmp/rocket.chat.tgz

# 5 
tar -xzf /tmp/rocket.chat.tgz -C /tmp

# 6
cd /tmp/bundle/programs/server && npm install

# 7
sudo mv /tmp/bundle /opt/Rocket.Chat

# 8
sudo useradd -M rocketchat && sudo usermod -L rocketchat

# 9
# PS.: I'm stil cofiguring the rocketchat service, but I'm not considering here on the commands (https://rocket.chat/docs/installation/manual-installation/ubuntu/#configure-the-rocketchat-service)
sudo chown -R rocketchat:rocketchat /opt/Rocket.Chat

# 10 (and finally)
vagrant@app:~$ MONGO_URL=mongodb://192.168.10.17:27017/rocketchat?replicaSet=rs01 MONGO_OPLOG_URL=mongodb://192.168.10.17:27017/local?replicaSet=rs01 ROOT_URL=http://0.0.0.0:3000 PORT=3000 node /opt/Rocket.Chat/main.js

And finally, I’m still got the same error:

/opt/Rocket.Chat/programs/server/node_modules/fibers/future.js:313
						throw(ex);
						^

MongoNetworkError: failed to connect to server [ubuntu-bionic:27017] on first connect [Error: connect ECONNREFUSED 127.0.1.1:27017
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1129:14) {
  name: 'MongoNetworkError',
  errorLabels: [Array],
  [Symbol(mongoErrorContextSymbol)]: {}
}]
    at Pool.<anonymous> (/opt/Rocket.Chat/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/topologies/server.js:431:11)
    at Pool.emit (events.js:210:5)
    at /opt/Rocket.Chat/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/connection/pool.js:557:14
    at /opt/Rocket.Chat/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/connection/connect.js:39:11
    at callback (/opt/Rocket.Chat/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/connection/connect.js:261:5)
    at Socket.<anonymous> (/opt/Rocket.Chat/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/connection/connect.js:286:7)
    at Object.onceWrapper (events.js:300:26)
    at Socket.emit (events.js:210:5)
    at emitErrorNT (internal/streams/destroy.js:92:8)
    at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
    at processTicksAndRejections (internal/process/task_queues.js:80:21) {
  name: 'MongoNetworkError',
  errorLabels: [ 'TransientTransactionError' ],
  [Symbol(mongoErrorContextSymbol)]: {}
}

Also, I got success to connect the application (192.168.10.16) into database (192.168.10.17) using mongo shell,