Can't upgrade from v6.13.0 to v7.0.0

Description

I switched to the next channel via

sudo snap switch rocketchat-server --channel=7.x/stable

and tried to refresh

sudo snap refresh rocketchat-server

The process got stuck with the following messages:

error: cannot perform the following tasks:

  • Run pre-refresh hook of “rocketchat-server” snap if present (run hook “pre-refresh”:

:92}}}
1 : syntax error: operand expected (error token is “{“t”:{”$date":“2025-04-02T08:42:54.552Z”},“s”:“I”, “c”:“NETWORK”, “id”:5693100, “ctx”:“js”,“msg”:“Asio socket.set_option failed with std::system_error”,“attr”:{“note”:“connect (sync) TCP fast open”,“option”:{“level”:6,“name”:30,“data”:“01 00 00 00”},“error”:{“what”:“set_option: Protocol not available”,“message”:“Protocol not available”,“category”:“asio.system”,“value”:92}}}
1 “)
/snap/rocketchat-server/1634/helpers/mongo.sh: line 50: ((: {“t”:{”$date":“2025-04-02T08:42:55.640Z”},“s”:“I”, “c”:“NETWORK”, “id”:5693100, “ctx”:“js”,“msg”:“Asio socket.set_option failed with std::system_error”,“attr”:{“note”:“connect (sync) TCP fast open”,“option”:{“level”:6,“name”:30,“data”:“01 00 00 00”},“error”:{“what”:“set_option: Protocol not available”,“message”:“Protocol not available”,“category”:“asio.system”,“value”:92}}}
1 : syntax error: operand expected (error token is “{“t”:{”$date":“2025-04-02T08:42:55.640Z”},“s”:“I”, “c”:“NETWORK”, “id”:5693100, “ctx”:“js”,“msg”:“Asio socket.set_option failed with std::system_error”,“attr”:{“note”:“connect (sync) TCP fast open”,“option”:{“level”:6,“name”:30,“data”:“01 00 00 00”},“error”:{“what”:“set_option: Protocol not available”,“message”:“Protocol not available”,“category”:“asio.system”,“value”:92}}}
1 “)
/snap/rocketchat-server/1634/helpers/mongo.sh: line 50: ((: {“t”:{”$date":“2025-04-02T08:42:56.736Z”},“s”:“I”, “c”:“NETWORK”, “id”:5693100, “ctx”:“js”,“msg”:“Asio socket.set_option failed with std::system_error”,“attr”:{“note”:“connect (sync) TCP fast open”,“option”:{“level”:6,“name”:30,“data”:“01 00 00 00”},“error”:{“what”:“set_option: Protocol not available”,“message”:“Protocol not available”,“category”:“asio.system”,“value”:92}}}
1 : syntax error: operand expected (error token is “{“t”:{”$date":“2025-04-02T08:42:56.736Z”},“s”:“I”, “c”:“NETWORK”, “id”:5693100, “ctx”:“js”,“msg”:“Asio socket.set_option failed with std::system_error”,“attr”:{“note”:“connect (sync) TCP fast open”,“option”:{“level”:6,“name”:30,“data”:“01 00 00 00”},“error”:{“what”:“set_option: Protocol not available”,“message”:“Protocol not available”,“category”:“asio.system”,“value”:92}}}
1 “)
/snap/rocketchat-server/1634/helpers/mongo.sh: line 50: ((: {“t”:{”$date":“2025-04-02T08:42:57.835Z”},“s”:“I”, “c”:“NETWORK”, “id”:5693100, “ctx”:“js”,“msg”:“Asio socket.set_option failed with std::system_error”,“attr”:{“note”:“connect (sync) TCP fast open”,“option”:{“level”:6,“name”:30,“data”:“01 00 00 00”},“error”:{“what”:“set_option: Protocol not available”,“message”:“Protocol not available”,“category”:“asio.system”,“value”:92}}}
1 : syntax error: operand expected (error token is “{“t”:{”$date":“2025-04-02T08:42:57.835Z”},“s”:“I”, “c”:“NETWORK”, “id”:5693100, “ctx”:“js”,“msg”:“Asio socket.set_option failed with std::system_error”,“attr”:{“note”:“connect (sync) TCP fast open”,“option”:{“level”:6,“name”:30,“data”:“01 00 00 00”},“error”:{“what”:“set_option: Protocol not available”,“message”:“Protocol not available”,“category”:“asio.system”,“value”:92}}}
1 “)
/snap/rocketchat-server/1634/helpers/mongo.sh: line 50: ((: {“t”:{”$date":“2025-04-02T08:42:58.915Z”},“s”:“I”, “c”:“NETWORK”, “id”:5693100, “ctx”:“js”,“msg”:“Asio socket.set_option failed with std::system_error”,“attr”:{“note”:“connect (sync) TCP fast open”,“option”:{“level”:6,“name”:30,“data”:“01 00 00 00”},“error”:{“what”:“set_option: Protocol not available”,“message”:“Protocol not available”,“category”:“asio.system”,“value”:92}}}
1 : syntax error: operand expected (error token is “{“t”:{”$date":“2025-04-02T08:42:58.915Z”},“s”:“I”, “c”:“NETWORK”, “id”:5693100, “ctx”:“js”,“msg”:“Asio socket.set_option failed with std::system_error”,“attr”:{“note”:“connect (sync) TCP fast open”,“option”:{“level”:6,“name”:30,“data”:“01 00 00 00”},“error”:{“what”:“set_option: Protocol not available”,“message”:“Protocol not available”,“category”:“asio.system”,“value”:92}}}
1 “)
/snap/rocketchat-server/1634/helpers/mongo.sh: line 50: ((: {“t”:{”$date":“2025-04-02T08:43:00.001Z”},“s”:“I”, “c”:“NETWORK”, “id”:5693100, “ctx”:“js”,“msg”:“Asio socket.set_option failed with std::system_error”,“attr”:{“note”:“connect (sync) TCP fast open”,“option”:{“level”:6,“name”:30,“data”:“01 00 00 00”},“error”:{“what”:“set_option: Protocol not available”,“message”:“Protocol not available”,“category”:“asio.system”,“value”:92}}}
1 : syntax error: operand expected (error token is “{“t”:{”$date":“2025-04-02T08:43:00.001Z”},“s”:“I”, “c”:“NETWORK”, “id”:5693100, “ctx”:“js”,“msg”:“Asio socket.set_option failed with std::system_error”,“attr”:{“note”:“connect (sync) TCP fast open”,“option”:{“level”:6,“name”:30,“data”:“01 00 00 00”},“error”:{“what”:“set_option: Protocol not available”,“message”:“Protocol not available”,“category”:“asio.system”,“value”:92}}}
1 “)
/snap/rocketchat-server/1634/helpers/mongo.sh: line 50: ((: {“t”:{”$date":“2025-04-02T08:43:01.100Z”},“s”:“I”, “c”:“NETWORK”, “id”:5693100, “ctx”:“js”,“msg”:“Asio socket.set_option failed with std::system_error”,“attr”:{“note”:“connect (sync) TCP fast open”,“option”:{“level”:6,“name”:30,“data”:“01 00 00 00”},“error”:{“what”:“set_option: Protocol not available”,“message”:“Protocol not available”,“category”:“asio.system”,“value”:92}}}
1 : syntax error: operand expected (error token is “{“t”:{”$date":“2025-04-02T08:43:01.100Z”},“s”:“I”, “c”:“NETWORK”, “id”:5693100, “ctx”:“js”,“msg”:“Asio socket.set_option failed with std::system_error”,“attr”:{“note”:“connect (sync) TCP fast open”,“option”:{“level”:6,“name”:30,“data”:“01 00 00 00”},“error”:{“what”:“set_option: Protocol not available”,“message”:“Protocol not available”,“category”:“asio.system”,“value”:92}}}
1 “)
/snap/rocketchat-server/1634/helpers/mongo.sh: line 50: ((: {“t”:{”$date":“2025-04-02T08:43:02.226Z”},“s”:“I”, “c”:“NETWORK”, “id”:5693100, “ctx”:“js”,“msg”:“Asio socket.set_option failed with std::system_error”,“attr”:{“note”:“connect (sync) TCP fast open”,“option”:{“level”:6,“name”:30,“data”:“01 00 00 00”},“error”:{“what”:“set_option: Protocol not available”,“message”:“Protocol not available”,“category”:“asio.system”,“value”:92}}}
1 : syntax error: operand expected (error token is “{“t”:{”$date":“2025-04-02T08:43:02.226Z”},“s”:“I”, “c”:“NETWORK”, “id”:5693100, “ctx”:“js”,“msg”:“Asio socket.set_option failed with std::system_error”,“attr”:{“note”:“connect (sync) TCP fast open”,“option”:{“level”:6,“name”:30,“data”:“01 00 00 00”},“error”:{“what”:“set_option: Protocol not available”,“message”:“Protocol not available”,“category”:“asio.system”,“value”:92}}}
1 “)
/snap/rocketchat-server/1634/helpers/mongo.sh: line 50: ((: {“t”:{”$date":“2025-04-02T08:43:03.316Z”},“s”:“I”, “c”:“NETWORK”, “id”:5693100, “ctx”:“js”,“msg”:“Asio socket.set_option failed with std::system_error”,“attr”:{“note”:“connect (sync) TCP fast open”,“option”:{“level”:6,“name”:30,“data”:“01 00 00 00”},“error”:{“what”:“set_option: Protocol not available”,“message”:“Protocol not available”,“category”:“asio.system”,“value”:92}}}
1 : syntax error: operand expected (error token is “{“t”:{”$date":“2025-04-02T08:43:03.316Z”},“s”:“I”, “c”:“NETWORK”, “id”:5693100, “ctx”:“js”,“msg”:“Asio socket.set_option failed with std::system_error”,“attr”:{“note”:“connect (sync) TCP fast open”,“option”:{“level”:6,“name”:30,“data”:“01 00 00 00”},“error”:{“what”:“set_option: Protocol not available”,“message”:“Protocol not available”,“category”:“asio.system”,“value”:92}}}
1 “)
/snap/rocketchat-server/1634/helpers/mongo.sh: line 50: ((: {“t”:{”$date":“2025-04-02T08:43:04.407Z”},“s”:“I”, “c”:“NETWORK”, “id”:5693100, “ctx”:“js”,“msg”:“Asio socket.set_option failed with std::system_error”,“attr”:{“note”:“connect (sync) TCP fast open”,“option”:{“level”:6,“name”:30,“data”:“01 00 00 00”},“error”:{“what”:“set_option: Protocol not available”,“message”:“Protocol not available”,“category”:“asio.system”,“value”:92}}}
1 : syntax error: operand expected (error token is “{“t”:{”$date":“2025-04-02T08:43:04.407Z”},“s”:“I”, “c”:“NETWORK”, “id”:5693100, “ctx”:“js”,“msg”:“Asio socket.set_option failed with std::system_error”,“attr”:{“note”:“connect (sync) TCP fast open”,“option”:{“level”:6,“name”:30,“data”:“01 00 00 00”},“error”:{“what”:“set_option: Protocol not available”,“message”:“Protocol not available”,“category”:“asio.system”,“value”:92}}}
1 “)
/snap/rocketchat-server/1634/helpers/mongo.sh: line 50: ((: {“t”:{”$date":“2025-04-02T08:43:05.499Z”},“s”:“I”, “c”:“NETWORK”, “id”:5693100, “ctx”:“js”,“msg”:“Asio socket.set_option failed with std::system_error”,“attr”:{“note”:“connect (sync) TCP fast open”,“option”:{“level”:6,“name”:30,“data”:“01 00 00 00”},“error”:{“what”:“set_option: Protocol not available”,“message”:“Protocol not available”,“category”:“asio.system”,“value”:92}}}
1 : syntax error: operand expected (error token is “{“t”:{”$date":“2025-04-02T08:43:05.499Z”},“s”:“I”, “c”:“NETWORK”, “id”:5693100, “ctx”:“js”,“msg”:“Asio socket.set_option failed with std::system_error”,“attr”:{“note”:“connect (sync) TCP fast open”,“option”:{“level”:6,“name”:30,“data”:“01 00 00 00”},“error”:{“what”:“set_option: Protocol not available”,“message”:“Protocol not available”,“category”:“asio.system”,“value”:92}}}
1 “)
/snap/rocketchat-server/1634/helpers/mongo.sh: line 50: ((: {“t”:{”$date":“2025-04-02T08:43:06.580Z”},“s”:“I”, “c”:“NETWORK”, “id”:5693100, “ctx”:“js”,“msg”:“Asio socket.set_option failed with std::system_error”,“attr”:{“note”:“connect (sync) TCP fast open”,“option”:{“level”:6,“name”:30,“data”:“01 00 00 00”},“error”:{“what”:“set_option: Protocol not available”,“message”:“Protocol not available”,“category”:“asio.system”,“value”:92}}}
1 : syntax error: operand expected (error token is “{“t”:{”$date":“2025-04-02T08:43:06.580Z”},“s”:“I”, “c”:“NETWORK”, “id”:5693100, “ctx”:“js”,“msg”:“Asio socket.set_option failed with std::system_error”,“attr”:{“note”:“connect (sync) TCP fast open”,“option”:{“level”:6,“name”:30,“data”:“01 00 00 00”},“error”:{“what”:“set_option: Protocol not available”,“message”:“Protocol not available”,“category”:“asio.system”,“value”:92}}}
1 ")
[ERROR] mongod server start wait timed out
[ERROR] pre refresh migration script /snap/rocketchat-server/1634/migrations/pre_refresh/feature_compatibity/00-adopt_version.sh
-----)

Any suggestions how to proceed?

Server Setup Information

  • Version of Rocket.Chat Server: 6.13.0 (community version)
  • Operating System: Ubuntu 22.04
  • Deployment Method: snap
  • Number of Running Instances:
  • DB Replicaset Oplog:
  • NodeJS Version: How to find on snap?
  • MongoDB Version: How to find on snap?
  • Proxy: nginx/caddy
  • Firewalls involved: ufw

You are using file storage not GridFS?

Your hardware supports newer Mongo eg AVX extensions?

You don’t mention what you are running it on. Check Mongo 5 compatibility.

First of it all, thank you for your reply. The MongoDB version is as follows

“name”:“MongoDB Internal Client”,“version”:“5.0.15”

thank you for your suggestion. I did the snap debug mode, but I don’t see a different output. So I spare you the whole output:

/snap/rocketchat-server/1634/helpers/mongo.sh: line 50: ((: {“t”:{“$date”:“2025-04-14T08:15:40.677Z”},“s”:“I”, “c”:“NETWORK”, “id”:5693100, “ctx”:“js”,“msg”:“Asio socket.set_option failed with std::system_error”,“attr”:{“note”:“connect (sync) TCP fast open”,“option”:{“level”:6,“name”:30,“data”:“01 00 00 00”},“error”:{“what”:“set_option: Protocol not available”,“message”:“Protocol not available”,“category”:“asio.system”,“value”:92}}}
1 : syntax error: operand expected (error token is “{“t”:{”$date":“2025-04-14T08:15:40.677Z”},“s”:“I”, “c”:“NETWORK”, “id”:5693100, “ctx”:“js”,“msg”:“Asio socket.set_option failed with std::system_error”,“attr”:{“note”:“connect (sync) TCP fast open”,“option”:{“level”:6,“name”:30,“data”:“01 00 00 00”},“error”:{“what”:“set_option: Protocol not available”,“message”:“Protocol not available”,“category”:“asio.system”,“value”:92}}}
1 ")

and I’m using GridFS

Read the docs.

Get off it, fast.

There are two file migrator repos about. Use them.

Do that before anything else.

You should also run a test dump, install, restore on another box.

Also read this.

Trying your suggestion gave me this error code:

/snap/rocketchat-server/1634/helpers/mongo.sh: line 50: ((: {“t”:{“$date”:“2025-04-15T06:48:04.415Z”},“s”:“I”, “c”:“NETWORK”, “id”:5693100, “ctx”:“js”,“msg”:“Asio socket.set_option failed with std::system_error”,“attr”:{“note”:“connect (sync) TCP fast open”,“option”:{“level”:6,“name”:30,“data”:“01 00 00 00”},“error”:{“what”:“set_option: Protocol not available”,“message”:“Protocol not available”,“category”:“asio.system”,“value”:92}}}
1 : syntax error: operand expected (error token is “{“t”:{”$date":“2025-04-15T06:48:04.415Z”},“s”:“I”, “c”:“NETWORK”, “id”:5693100, “ctx”:“js”,“msg”:“Asio socket.set_option failed with std::system_error”,“attr”:{“note”:“connect (sync) TCP fast open”,“option”:{“level”:6,“name”:30,“data”:“01 00 00 00”},“error”:{“what”:“set_option: Protocol not available”,“message”:“Protocol not available”,“category”:“asio.system”,“value”:92}}}
1 ")

The snap refresh failed and there was still a mongo instance listening on port 27017 which I had to kill to be able to restart the rocketchat-server.

Finally I made it work again.
But I had to remove rocketchat-server and install it again. Here is my workaround:

First backup your data:
sudo service snap.rocketchat-server.rocketchat-server stop (stop server instance)

sudo service snap.rocketchat-server.rocketchat-mongo status | grep Active (check if mongo instance is still running)

sudo snap run rocketchat-server.backupdb (backup the data)

mv /var/snap/rocketchat-server/common/backup/rocketchat_backup_[timestamp].tar.gz /home/[user]/
(important step, move the backup file to any other location, replace [placeholders] with your corresponding inputs)

when the backup was successful, you can remove the rocketchat-server snap:

sudo snap remove rocketchat-server --purge (the “–purge” parameter was very important for me, without it didn’t work)

when it was successful, you can follow the new installation of the rocketchat-server and restore of the database backup as described here:

I am now on the latest release. (keep in mind, that all users have to relogin again)

1 Like

That’ll be a mongo upgradd issue.

Thanks for posting your solution.