Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Matrix gateway not working: Confusion with Ids to use #4172

Open
chstoltz opened this issue Mar 8, 2024 · 4 comments
Open

Matrix gateway not working: Confusion with Ids to use #4172

chstoltz opened this issue Mar 8, 2024 · 4 comments

Comments

@chstoltz
Copy link

chstoltz commented Mar 8, 2024

Environment

  • ejabberd version: 24.02
  • OS: Linux (Debian)
  • Installed from: official binary installer

Configuration

[...]
  -
    port: 8448
    module: ejabberd_http
    tls: true
    request_handlers:
      "/_matrix": mod_matrix_gw
[...]
s2s_access: s2s
[...]
access_rules:
[...]
  s2s:
    allow: all
[...]
  mod_matrix_gw:
    matrix_domain: "jabjab.de"
    key_name: "key1"
    key: "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
[...]

Errors from error.log/crash.log

No errors

Bug description

I can't send/receive messages to/from a matrix.org account.

If I send a message from ejabberd to matrix, the debug log shows s.th. like this:

2024-03-08 12:55:02.285510+01:00 [notice] <0.1805.0> (tls|<0.1805.0>) Received XML on stream = <<"<message xmlns=\"jabber:client\" to=\"XXXXXXX@matrix.org\" type=\"chat\" id=\"64b4373b-dff9-4372-87b5-62a05a4004af\"><body>test</body><origin-id xmlns=\"urn:xmpp:sid:0\" id=\"64b4373b-dff9-4372-87b5-62a05a4004af\" /><request xmlns=\"urn:xmpp:receipts\" /><markable xmlns=\"urn:xmpp:chat-markers:0\" /></message>">>
         to = #jid{user = <<"XXXXXXX">>,server = <<"matrix.org">>,
                   resource = <<>>,luser = <<"XXXXXXX">>,
         to = #jid{user = <<"XXXXXXX">>,server = <<"matrix.org">>,
                   resource = <<>>,luser = <<"XXXXXXX">>,
2024-03-08 12:55:02.323089+01:00 [notice] <0.1882.0> (tls|<0.1882.0>) Send XML on stream = <<"<message xml:lang='en' to='XXXXXXX@matrix.org' from='admin@jabjab.de/Work' type='chat' id='64b4373b-dff9-4372-87b5-62a05a4004af'><origin-id xmlns='urn:xmpp:sid:0' id='64b4373b-dff9-4372-87b5-62a05a4004af'/><request xmlns='urn:xmpp:receipts'/><markable xmlns='urn:xmpp:chat-markers:0'/><body>test</body></message>">>

The webclient of app.element.io recieves nothing.

If I send a message from matrix.org to myself, the message returns like an echo. My chat window in gajim stays empty.

I already tried to set a specific host in the modules section, but that didn't work either. If I do a service discovery with Gajim, the matrix gateway is listed but greyed out.

Screenshot_20240308_132608

The federationtester is all green, so it must be a problem on my side I think.

What am I missing?

@licaon-kter
Copy link
Contributor

@chstoltz
Copy link
Author

chstoltz commented Mar 8, 2024

Yes, I did. Actually I waited for this post to be published. I couldn't figure out how to get this working since last saturday.

The only difference I can see: I am using the top level cert option instead of including the certfile in the listener block.

@centertivevier
Copy link

I have the same problem, but with one change. I can send from my Matrixserver x1.eu to xmpp.eu. The messages was post at conversations. But rewrite to the jid (i see this one in conversation) test%x1.eu@matrixx.xmpp.eu and ejabberd give me the message "host-unknown". The mode is set to implicit.

@Neustradamus
Copy link
Contributor

Neustradamus commented Mar 14, 2024

From ejabberd MUC Room:

neox: Hi there. I don't have a github account so I can't answer here: #4172

My observation is that when matrix_id_as_jid is set to true, matrix users are reachable with user1@domain1.com and not user%remotedomain.com@matrix.xmppdomain.com, and when implicit routing is enabled that's user%remotedomain.com@matrix.xmppdomain.com that is working !

neox: I tested it and reproduced it many times this week

@mremond mremond changed the title Matrix gateway not working Matrix gateway not working: Confusion with Ids to use May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants