Open hpedrorodrigues opened 3 months ago
Hi, We've recently expanded our tests to cover the usage of mod_stream_management using the WebSockets API. During this process, we identified and fixed some errors and bugs. These changes were included in a recent pull request (https://github.com/esl/MongooseIM/pull/4303) that has already been merged into the master branch. Could you please check if the error is still present in the current master version?
Sure! I'll check the master branch, then. I'll let you know my findings!
Hi, have you experienced any issues with stream resumption using WebSockets after the version update? If everything is working fine, I'll proceed with closing the issue.
Hi. Yes, I'm still experiencing this issue. I'll collect a few things and will comment here soon.
MongooseIM version: 6.2.1 Installed from: image Erlang/OTP version: 26
Hey 👋🏻
I'm trying to implement stream resumption, and even though it works most of the time, there are cases where I receive this element:
This is because MongooseIM cannot find the SMID, but it's not clear the reason.
Example in the logs:
Example in the socket:
mongooseim.toml
```toml # https://esl.github.io/MongooseDocs/latest/configuration/general [general] loglevel = "debug" language = "en" hosts = ["localhost"] default_server_domain = "localhost" registration_timeout = "infinity" rdbms_server_type = "pgsql" sm_backend = "redis" max_fsm_queue = 1000 # https://esl.github.io/MongooseDocs/latest/configuration/listen/ # BOSH (Bidirectional-streams Over Synchronous HTTP | HTTP long-polling) and WebSockets [[listen.http]] ip_address = "0.0.0.0" port = 5280 transport.num_acceptors = 10 transport.max_connections = 1024 [[listen.http.handlers.mod_bosh]] host = "_" path = "/http-bind" [[listen.http.handlers.mod_websockets]] host = "_" path = "/ws-xmpp" # REST client port: https://esl.github.io/MongooseDocs/latest/rest-api/Client-frontend/ [[listen.http]] ip_address = "0.0.0.0" port = 8088 transport.num_acceptors = 10 transport.max_connections = 1024 protocol.compress = true [[listen.http.handlers.mongoose_client_api]] host = "_" path = "/api" [[listen.http.handlers.mongoose_graphql_handler]] host = "_" path = "/api/graphql" schema_endpoint = "user" # REST admin port: https://esl.github.io/MongooseDocs/latest/rest-api/Administration-backend/ [[listen.http]] ip_address = "0.0.0.0" port = 8089 transport.num_acceptors = 10 transport.max_connections = 1024 protocol.compress = true [[listen.http.handlers.mod_websockets]] host = "_" path = "/ws-xmpp" [[listen.http.handlers.mongoose_admin_api]] host = "_" path = "/api" username = "${MONGOOSEIM_USER}" password = "${MONGOOSEIM_PASSWORD}" [[listen.http.handlers.mongoose_graphql_handler]] host = "_" path = "/api/graphql" schema_endpoint = "admin" username = "${MONGOOSEIM_USER}" password = "${MONGOOSEIM_PASSWORD}" # Client-to-server connections [[listen.c2s]] port = 5222 access = "c2s" shaper = "c2s_shaper" max_stanza_size = 65536 [auth] methods = ["rdbms"] sasl_external = ["standard"] [auth.rdbms] users_number_estimate = true [outgoing_pools.redis.default] scope = "global" [outgoing_pools.redis.default.connection] host = "${REDIS_HOST}" port = 6379 database = 0 [outgoing_pools.rdbms.default] scope = "global" [outgoing_pools.rdbms.default.connection] driver = "pgsql" host = "${POSTGRES_HOST}" port = ${POSTGRES_PORT} database = "${POSTGRES_DB_NAME}" username = "${POSTGRES_USER}" password = "${POSTGRES_PASSWORD}" [modules.mod_adhoc] [modules.mod_disco] users_can_see_hidden_services = false [modules.mod_cache_users] [modules.mod_ping] [modules.mod_muc] host = "conference.@HOST@" access = "muc" access_create = "muc_create" backend = "rdbms" default_room.allow_multiple_sessions = true default_room.persistent = true [modules.mod_presence] [modules.mod_mam] muc.backend = "rdbms" backend = "rdbms" no_stanzaid_element = true pm.user_prefs_store = "rdbms" archive_chat_markers = true max_result_limit = 1000 pm.archive_groupchats = true [modules.mod_inbox] backend = "rdbms_async" reset_markers = ["displayed"] groupchat = ["muc"] [modules.mod_muc_log] [modules.mod_muc_light] backend = "rdbms" [modules.mod_stream_management] [modules.mod_last] backend = "rdbms" [modules.mod_roster] backend = "rdbms" [modules.mod_private] backend = "rdbms" [modules.mod_caps] cache_size = 2000 cache_life_time = 10_000 [modules.mod_event_pusher.rabbit] presence_exchange.name = "presence" presence_exchange.type = "topic" chat_msg_exchange.name = "chat_msg" chat_msg_exchange.sent_topic = "mongooseim_chat_msg_sent" chat_msg_exchange.recv_topic = "mongooseim_chat_msg_recv" groupchat_msg_exchange.name = "groupchat_msg" groupchat_msg_exchange.sent_topic = "mongooseim_groupchat_msg_sent" groupchat_msg_exchange.recv_topic = "mongooseim_groupchat_msg_recv" [outgoing_pools.rabbit.event_pusher.connection] host = "${RABBITMQ_HOST}" port = 5672 username = "${RABBITMQ_DEFAULT_USER}" password = "${RABBITMQ_DEFAULT_PASSWORD}" confirms_enabled = false max_worker_queue_len = 1000 [modules.mod_offline_stub] [modules.mod_sic] [modules.mod_vcard] host = "vjud.@HOST@" backend = "rdbms" [modules.mod_auth_token] backend = "rdbms" iqdisc.type = "queues" iqdisc.workers = 20 validity_period.access = {value = 1, unit = "hours"} validity_period.refresh = {value = 25, unit = "days"} [modules.mod_keystore] keys = [{name = "token_secret", type = "ram"}] [shaper.normal] max_rate = 1000 [shaper.fast] max_rate = 50_000 [shaper.mam_shaper] max_rate = 1 [shaper.mam_global_shaper] max_rate = 1000 [acl] local = [{}] [access] max_user_sessions = [ {acl = "all", value = 10} ] max_user_offline_messages = [ {acl = "admin", value = 5000}, {acl = "all", value = 100} ] local = [ {acl = "local", value = "allow"} ] c2s = [ {acl = "blocked", value = "deny"}, {acl = "all", value = "allow"} ] c2s_shaper = [ {acl = "admin", value = "none"}, {acl = "all", value = "normal"} ] muc_admin = [ {acl = "admin", value = "allow"} ] muc_create = [ {acl = "local", value = "allow"} ] muc = [ {acl = "all", value = "allow"} ] mam_set_prefs = [ {acl = "all", value = "default"} ] mam_get_prefs = [ {acl = "all", value = "default"} ] mam_lookup_messages = [ {acl = "all", value = "default"} ] mam_set_prefs_shaper = [ {acl = "all", value = "mam_shaper"} ] mam_get_prefs_shaper = [ {acl = "all", value = "mam_shaper"} ] mam_lookup_messages_shaper = [ {acl = "all", value = "mam_shaper"} ] mam_set_prefs_global_shaper = [ {acl = "all", value = "mam_global_shaper"} ] mam_get_prefs_global_shaper = [ {acl = "all", value = "mam_global_shaper"} ] mam_lookup_messages_global_shaper = [ {acl = "all", value = "mam_global_shaper"} ] [[host_config]] host = "anonymous.localhost" [host_config.auth.anonymous] allow_multiple_connections = true protocol = "both" ```Sharing these files in case they can help:
Not sure if I'm missing something here. Any help will be appreciated! Thanks. 🙏🏻