Carbonio Community ...
 
Notifications
Clear all

[Sticky] Carbonio Community Edition - New Release

338 Posts
72 Users
92 Reactions
94.7 K Views
(@david-burns)
New Member
Joined: 1 month ago
Posts: 13
 

fix it !

 

mkdir -p /etc/janus/ssl/

cp /opt/zextras/conf/domaincerts/mydomen.org.crt /etc/janus/ssl/commercial.crt

cp /opt/zextras/conf/domaincerts/mydomen.org.key /etc/janus/ssl/commercial.key

 

chown -R videoserver:videoserver /etc/janus/ssl/

chmod 700 /etc/janus/ssl/

chmod 600 /etc/janus/ssl/*

 

nano /etc/janus/janus.jcfg

certificates: { cert_pem = "/etc/janus/ssl/commercial.crt" cert_key = "/etc/janus/ssl/commercial.key" }

 

systemctl restart carbonio-videoserver

systemctl restart carbonio-ws-collaboration

 

systemctl status carbonio-videoserver | grep Active:

Active: active (running)

reboot

 


   
Sharif and anahuac reacted
ReplyQuote
arpadffy
(@arpadffy)
New Member
Joined: 9 months ago
Posts: 16
 

@hippiecool @Sharif

I have found a solution.
Indeed one of the issue was the database ownership as @Sharif pointed out

sudo -u postgres psql -d carbonio-message-dispatcher-db -c 'REASSIGN OWNED BY carbonio_adm TO "carbonio-message-dispatcher-db";'

This solved most of the services issue, but the "xmpp_server" was still down.

During some of the past apt upgrades, the installer detected that /etc/carbonio/message-dispatcher/mongooseim.toml had been modified at some point. When prompted whether to overwrite it with the new maintainer's version or keep the existing one, the system defaulted to keeping the old file.

Because Carbonio CE updated the MongooseIM binary to version 6.6 but left behind the old 5.x configuration file, the engine is now trying to parse deprecated TOML arrays and instantly crashing.

The FIX:

We need to replace the outdated configuration file with the correct version shipped by the package distributor, and then let Carbonio re-inject your database credentials into it.

Step 1: Locate and replace the configuration file Navigate to the configuration directory and look for the package manager's fresh copy (usually appended with .dpkg-dist or .dpkg-new).

cd /etc/carbonio/message-dispatcher/

# Backup the broken file
mv mongooseim.toml mongooseim.toml.broken

# Overwrite it with the fresh distributor template
cp mongooseim.toml.dpkg-dist mongooseim.toml

# Ensure correct permissions
chown carbonio-message-dispatcher:carbonio-message-dispatcher mongooseim.toml

But now manually edit the file to copy over the credentials:
I have copied over the following:

password = "<db-password>"
username = "<api-username>"
password = "<api-password>"

...but this is still not all - we need to instruct mongooseim how to listen

Edit the mongooseim.toml

remove line rdbms_server_type = "pgsql"

overwrite  [listen.http.handlers.mod_websockets]
with
[listen.http.handlers.mongoose_websocket_handler]
Save the file and test your new config

systemctl restart carbonio-message-dispatcher
systemctl restart carbonio-ws-collaboration

# Wait 10 seconds for the mesh network to sync, then run:
curl -s  http://127.78.0.4:10000/health  | jq

 
It worked for me

root@carbonio:/etc/carbonio/message-dispatcher# curl -s  http://127.78.0.4:10000/health  | jq
{
  "isLive": true,
  "status": "ok",
  "dependencies": [
    {
      "name": "database",
      "isHealthy": true
    },
    {
      "name": "authentication_service",
      "isHealthy": true
    },
    {
      "name": "profiling_service",
      "isHealthy": true
    },
    {
      "name": "xmpp_server",
      "isHealthy": true
    },
    {
      "name": "event_dispatcher",
      "isHealthy": true
    },
    {
      "name": "storage_service",
      "isHealthy": true
    },
    {
      "name": "previewer_service",
      "isHealthy": true
    },
    {
      "name": "videoserver_service",
      "isHealthy": true
    }
  ]
}

...and this solved the chat issue


   
Sharif reacted
ReplyQuote
(@sharif)
Honorable Member Admin
Joined: 4 years ago
Posts: 966
 

@arpadffy @david-burns

Kudos to you guys!


   
ReplyQuote
(@david-burns)
New Member
Joined: 1 month ago
Posts: 13
 

sudo nano /etc/systemd/system/carbonio-restart.service

[Unit]

Description=Restart Carbonio Video and Collaboration Services\

After=network-online.target

[Service]

Type=oneshot

ExecStart=/usr/bin/systemctl restart carbonio-message-dispatcher

ExecStart=/usr/bin/systemctl restart carbonio-videoserver

ExecStart=/usr/bin/systemctl restart carbonio-ws-collaboration

[Install]

WantedBy=multi-user.target

sudo nano /etc/systemd/system/carbonio-restart.timer

[Unit]

Description=Timer to restart Carbonio services 3 minutes after boot

[Timer]

OnBootSec=3min

Unit=carbonio-restart.service

[Install]

WantedBy=timers.target

sudo systemctl daemon-reload

sudo systemctl enable --now carbonio-restart.timer

systemctl status carbonio-restart.timer

 

reboot

 

journalctl -u carbonio-restart.service

 


   
ReplyQuote
(@hippiecool)
Eminent Member
Joined: 3 years ago
Posts: 34
 

@arpadffy @sharif 

I'm a bit confused as @sharif says do not use the REASSIGNED OWNED command but @arpadffy used it.  

I also do not know what you mean by  "I have copied over the following:"    Where did you get these values? From the mongoose.toml.broken file??  On mine, they are the same.

password = "<db-password>"
username = "<api-username>"
password = "<api-password>"

Could you be a little more specific on your steps.  I followed but Chat is still failing. 

 

Here is what I did (as Root):

1. sudo -u postgres pg_dump carbonio-message-dispatcher-db > /root/mdisp-db-backup.sql

2. sudo -u postgres psql -d carbonio-message-dispatcher-db -c "SELECT tablename, tableowner FROM pg_tables WHERE schemaname='public' AND tableowner <> 'carbonio-message-dispatcher-db';"

tablename | tableowner
--------------------------------+--------------
test_types | carbonio_adm
users | carbonio_adm
last | carbonio_adm
rosterusers | carbonio_adm
roster_version | carbonio_adm
auth_token | carbonio_adm
muc_registered | carbonio_adm
rostergroups | carbonio_adm
vcard | carbonio_adm
vcard_search | carbonio_adm
privacy_default_list | carbonio_adm
privacy_list | carbonio_adm
privacy_list_data | carbonio_adm
private_storage | carbonio_adm
mam_config | carbonio_adm
mam_server_user | carbonio_adm
mam_muc_message | carbonio_adm
offline_message | carbonio_adm
pubsub_node_collections | carbonio_adm
pubsub_affiliations | carbonio_adm
muc_rooms | carbonio_adm
muc_room_aff | carbonio_adm
muc_light_rooms | carbonio_adm
muc_light_occupants | carbonio_adm
muc_light_config | carbonio_adm
domain_events | carbonio_adm
muc_light_blocking | carbonio_adm
inbox | carbonio_adm
pubsub_nodes | carbonio_adm
pubsub_items | carbonio_adm
pubsub_last_item | carbonio_adm
pubsub_subscriptions | carbonio_adm
event_pusher_push_subscription | carbonio_adm
mongoose_cluster_id | carbonio_adm
smart_markers | carbonio_adm
offline_markers | carbonio_adm
domain_admins | carbonio_adm
domain_settings | carbonio_adm
discovery_nodes | carbonio_adm
mam_message | carbonio_adm
caps | carbonio_adm
(41 rows)

 

3. sudo -u postgres psql -d carbonio-message-dispatcher-db -c 'REASSIGN OWNED BY carbonio_adm TO "carbonio-message-dispatcher-db";'

 4. sudo -u postgres psql -d carbonio-message-dispatcher-db -c "SELECT tablename, tableowner FROM pg_tables WHERE schemaname='public' AND tableowner <> 'carbonio-message-dispatcher-db';"

 tablename | tableowner
-----------+------------
(0 rows)

5. pending-setups -a  (there were none)

6. systemctl restart carbonio-message-dispatcher

7. cd /etc/carbonio/message-dispatcher/

8. mv mongooseim.toml mongooseim.tom.broken

9. cp mongooseim.toml.dpkg-old mongooseim.toml

10. vi mongooseim.toml

## rdbms_server_type = "pgsql"  ## 

## [[listen.http.handlers.mod_websockets]] ##
[[listen.http.handlers.mongoose_websockets_handler]]

any field named "username" or "password" matches what was named "username" or "password" in mongooseim.toml.broken so there was nothing to change. 

:wq

11. systemctl restart carbonio-message-dispatcher

12. systemctl restart carbonio-ws-collaboration

13. curl -s http://127.78.0.4:10000/health | jq

{
"isLive": true,
"status": "error",
"dependencies": [
{
"name": "database",
"isHealthy": true
},
{
"name": "authentication_service",
"isHealthy": true
},
{
"name": "profiling_service",
"isHealthy": true
},
{
"name": "xmpp_server",
"isHealthy": false
},
{
"name": "event_dispatcher",
"isHealthy": true
},
{
"name": "storage_service",
"isHealthy": true
},
{
"name": "previewer_service",
"isHealthy": true
},
{
"name": "videoserver_service",
"isHealthy": false
}
]
}

 

Thanks

Hippiecool

 

 

 

 

 


   
ReplyQuote
arpadffy
(@arpadffy)
New Member
Joined: 9 months ago
Posts: 16
 

@hippiecool

I am sorry, I am not an expert - I just tried to understand what are the issues.

The database ownership change actually helped in my case.
Now I have all tables owned by carbonio-message-dispatcher-db - and my instance feels and behaves healthy.

root@carbonio:~# sudo -u postgres psql -d carbonio-message-dispatcher-db -c "SELECT tablename, tableowner FROM pg_tables WHERE schemaname='public' AND tableowner <> 'carbonio-message-dispatcher-db';"
 tablename | tableowner 
-----------+------------
(0 rows)

Regarding the xmpp_server, the original mongooseim.toml (that I copied over to mongooseim.toml.broken) contained the needed credentials.
I just simply moved them over to the new file.
This is the result (the credentials are partly masked out)

root@carbonio:~# cat /etc/carbonio/message-dispatcher/mongooseim.toml
# SPDX-FileCopyrightText: 2023 Zextras < https://www.zextras.com> 
#
# SPDX-License-Identifier: AGPL-3.0-only

[general]
  loglevel = "notice"
  hosts = ["carbonio"]
  default_server_domain = "carbonio"
  language = "en"
  # rdbms_server_type = "pgsql"

[auth]
  methods = ["http"]
  password.format = "plain"
  sasl_mechanisms = ["plain"]
  [auth.http]

[outgoing_pools.http.auth]
  connection.host = "http://127.78.0.23:10000"

[s2s]
  default_policy = "deny"

[outgoing_pools.rdbms.default]
  scope = "global"
  strategy = "best_worker"
  workers = 10

  [outgoing_pools.rdbms.default.connection]
    driver = "pgsql"
    host = "127.78.0.10"
    port = 20000
    database = "carbonio-message-dispatcher-db"
    username = "carbonio-message-dispatcher-db"
    password = "474a18***************805d54eb"
    keepalive_interval = 30

[listen]
  [[listen.c2s]]
    port = 10000
    ip_address = "127.78.0.11"

  [[listen.http]]
    port = 10000
    ip_address = "127.78.0.10"
    transport.num_acceptors = 100
    transport.max_connections = "infinity"

    [[listen.http.handlers.mongoose_websocket_handler]]
      host = "_"
      path = "/ws-xmpp"
      ping_rate = 30_000

    [[listen.http.handlers.mongoose_graphql_handler]]
      host = "_"
      path = "/api/graphql"
      schema_endpoint = "admin"
      username = "carbonio-message-dispatcher"
      password = "f62206***************dd819"

[modules.mod_muc_light]
  backend = "rdbms"
  host = "muclight.@HOST@"
  equal_occupants = true
  all_can_configure = true
  all_can_invite = true
  rooms_per_page = 10
  rooms_in_rosters = false
  max_occupants = 128

[modules.mod_disco]
  users_can_see_hidden_services = true

[modules.mod_mam]
  backend = "rdbms"
  muc.backend = "rdbms"
  muc.host = "muclight.@HOST@"
  db_message_format="mam_message_xml"
  archive_chat_markers = false
  full_text_search = true

[modules.mod_inbox]
  backend = "rdbms"
  reset_markers = ["displayed"]
  groupchat = ["muclight"]
  aff_changes = true
  remove_on_kicked = true

[modules.mod_last]
  backend = "rdbms"

[modules.mod_offline_stub]

[modules.mod_roster]
  backend = "rdbms"

[modules.mod_carboncopy]

[modules.mod_ping]
  send_pings = true
  ping_interval = 60
  timeout_action = "kill"
  ping_req_timeout = 10

[modules.mod_smart_markers]
  backend = "rdbms"

[modules.mod_presence]

[services.service_mongoose_system_metrics]
  report = false


Hope it helps

 


   
ReplyQuote
arpadffy
(@arpadffy)
New Member
Joined: 9 months ago
Posts: 16
 

@hippiecool

I am sorry, I am not an expert - I just tried to understand what are the issues.

The database ownership change actually helped in my case.
Now I have all tables owned by carbonio-message-dispatcher-db - and my instance feels and behaves healthy.

root@carbonio:~# sudo -u postgres psql -d carbonio-message-dispatcher-db -c "SELECT tablename, tableowner FROM pg_tables WHERE schemaname='public' AND tableowner <> 'carbonio-message-dispatcher-db';"
 tablename | tableowner 
-----------+------------
(0 rows)

Regarding the xmpp_server, the original mongooseim.toml (that I copied over to mongooseim.toml.broken) contained the needed credentials.
I just simply moved them over to the new file.
This is the result (the credentials are partly masked out)

root@carbonio:~# cat /etc/carbonio/message-dispatcher/mongooseim.toml
# SPDX-FileCopyrightText: 2023 Zextras < https://www.zextras.com> 
#
# SPDX-License-Identifier: AGPL-3.0-only

[general]
  loglevel = "notice"
  hosts = ["carbonio"]
  default_server_domain = "carbonio"
  language = "en"
  # rdbms_server_type = "pgsql"

[auth]
  methods = ["http"]
  password.format = "plain"
  sasl_mechanisms = ["plain"]
  [auth.http]

[outgoing_pools.http.auth]
  connection.host = "http://127.78.0.23:10000"

[s2s]
  default_policy = "deny"

[outgoing_pools.rdbms.default]
  scope = "global"
  strategy = "best_worker"
  workers = 10

  [outgoing_pools.rdbms.default.connection]
    driver = "pgsql"
    host = "127.78.0.10"
    port = 20000
    database = "carbonio-message-dispatcher-db"
    username = "carbonio-message-dispatcher-db"
    password = "474a18***************805d54eb"
    keepalive_interval = 30

[listen]
  [[listen.c2s]]
    port = 10000
    ip_address = "127.78.0.11"

  [[listen.http]]
    port = 10000
    ip_address = "127.78.0.10"
    transport.num_acceptors = 100
    transport.max_connections = "infinity"

    [[listen.http.handlers.mongoose_websocket_handler]]
      host = "_"
      path = "/ws-xmpp"
      ping_rate = 30_000

    [[listen.http.handlers.mongoose_graphql_handler]]
      host = "_"
      path = "/api/graphql"
      schema_endpoint = "admin"
      username = "carbonio-message-dispatcher"
      password = "f62206***************dd819"

[modules.mod_muc_light]
  backend = "rdbms"
  host = "muclight.@HOST@"
  equal_occupants = true
  all_can_configure = true
  all_can_invite = true
  rooms_per_page = 10
  rooms_in_rosters = false
  max_occupants = 128

[modules.mod_disco]
  users_can_see_hidden_services = true

[modules.mod_mam]
  backend = "rdbms"
  muc.backend = "rdbms"
  muc.host = "muclight.@HOST@"
  db_message_format="mam_message_xml"
  archive_chat_markers = false
  full_text_search = true

[modules.mod_inbox]
  backend = "rdbms"
  reset_markers = ["displayed"]
  groupchat = ["muclight"]
  aff_changes = true
  remove_on_kicked = true

[modules.mod_last]
  backend = "rdbms"

[modules.mod_offline_stub]

[modules.mod_roster]
  backend = "rdbms"

[modules.mod_carboncopy]

[modules.mod_ping]
  send_pings = true
  ping_interval = 60
  timeout_action = "kill"
  ping_req_timeout = 10

[modules.mod_smart_markers]
  backend = "rdbms"

[modules.mod_presence]

[services.service_mongoose_system_metrics]
  report = false


Hope it helps

 


   
ReplyQuote
(@funifuni)
Trusted Member
Joined: 5 years ago
Posts: 105
 

@anahuac Is your environment Ubuntu24.04 or Ubuntu2204 or other?


   
ReplyQuote
(@hippiecool)
Eminent Member
Joined: 3 years ago
Posts: 34
 

@arpadffy @sharif

Thanks for the quick reply.  I verified all usernames and passwords are identical in both files.  But I still get the following highlighted in RED.  Removing the line:

# rdbms_server_type = "pgsql"

only fixed the xmpp_server from false to true.  It's seems to specifically be the authentication_service and profiling_service that are failing.   Does anyone know what that could be? 

 

"isLive": true,
"status": "error",
"dependencies": [
{
"name": "database",
"isHealthy": true
},
{
"name": "authentication_service",
"isHealthy": false
},
{
"name": "profiling_service",
"isHealthy": false
},
{
"name": "xmpp_server",
"isHealthy": true
},
{
"name": "event_dispatcher",
"isHealthy": true
},
{
"name": "storage_service",
"isHealthy": true
},
{
"name": "previewer_service",
"isHealthy": true
},
{
"name": "videoserver_service",
"isHealthy": false    <<- this is fine as I am not using the Video Server
}
]


   
ReplyQuote
arpadffy
(@arpadffy)
New Member
Joined: 9 months ago
Posts: 16
 

@hippiecool

I had the very similar status (see my earlier post https://community.zextras.com/forum/postid/12468/ )
Changing the ownership helped me to restore the authentication_service and the profiling service

sudo -u postgres psql -d carbonio-message-dispatcher-db -c 'REASSIGN OWNED BY carbonio_adm TO "carbonio-message-dispatcher-db";'

I do not know if this is the best practice - but it worked for me.


   
ReplyQuote
(@hippiecool)
Eminent Member
Joined: 3 years ago
Posts: 34
 

@arpadffy @sharif

I did that and no luck.  Is there a place I can review logs to see what's failing? 

"name": "authentication_service",
"isHealthy": false
},
{
"name": "profiling_service",
"isHealthy": false
},
{
"name": "xmpp_server",
"isHealthy": true

 


   
ReplyQuote
(@anahuac)
Joined: 3 years ago
Posts: 344
 

@funifuni it is Ubuntu 24.04 since it was possible to upgrade


   
ReplyQuote
(@vladki)
Active Member
Joined: 11 months ago
Posts: 25
 

Hello, I see there are multiple issues with 26.6.0 - certbot, message-dispatcher, amavis, auth,...  Is there going to be a bugfix release?

Is there a way to put all carbonio packages on hold, so I can update the rest of the system? I tried to put carbonio-ce and carbonio-core on hold, but it does not prevent other packages from upgrading. Do I really have to put hold on all 172 packages individually?


   
ReplyQuote
(@david-burns)
New Member
Joined: 1 month ago
Posts: 13
 
Could you please advise? In Carbonio CE 2.6.0, when users are invited to a video conference, the link always results in a "Video conference not found" error. However, if a user is designated as a moderator and invited via the calendar, they successfully load the landing page (where they select their microphone and camera) and connect. Are video chat users invited via the calendar in Carbonio CE considered "guests" and therefore unable to connect? Is this feature supposed to work in Carbonio CE, or is it exclusive to the paid version of Carbonio?

   
ReplyQuote
(@david-burns)
New Member
Joined: 1 month ago
Posts: 13
 
Could you please advise? In Carbonio CE 2.6.0, when users are invited to a video conference, the link always results in a "Video conference not found" error. However, if a user is designated as a moderator and invited via the calendar, they successfully load the landing page (where they select their microphone and camera) and connect. Are video chat users invited via the calendar in Carbonio CE considered "guests" and therefore unable to connect? Is this feature supposed to work in Carbonio CE, or is it exclusive to the paid version of Carbonio?

   
ReplyQuote
Page 22 / 23