Skip to content
This repository has been archived by the owner on Aug 10, 2023. It is now read-only.

Bridge creation hangs after connecting to Murmur #25

Closed
bertiebaggio opened this issue Mar 10, 2021 · 8 comments
Closed

Bridge creation hangs after connecting to Murmur #25

bertiebaggio opened this issue Mar 10, 2021 · 8 comments

Comments

@bertiebaggio
Copy link

Hi, I was hoping to get this cool-looking bridge up and running. To this end, I spun up a dev homeserver, and started up a newly-compiled 1.4.0 murmur server.

However, though it reports that it can successfully connect to the gRPC endpoint on murmur, the bot never appears in the room. It has been invited!

I've tried tracking through the code but I am not familiar enough with how bridges work. Perhaps it get hung up awaiting setupCallBacks:

await murmur.setupCallbacks(bridge, roomLinks, config);

or somewhere around there, given where the console messages halt and due to lack of error messages.

some pointers as where to look would be appreciated. Can the latest git HEAD be built simply by git clone-ing and running build.sh ? If so, I can give debugging it a shot myself- or at least add some more debug console.logs !

Config etc information included below.

Cheers :)


From the container running MAM:

bertieb@matrix-mumble-bridge-test:~$ matrix-appservice-mumble -c mumble-config.yaml -f mumble-registration.yaml 
Connecting to Murmur...
Connetion to Murmur established!
Matrix-side listening on port 8090

nothing more is printed.

mumble-config.yaml:

# Address where Murmur is listening for gRPC. This will be in Murmur's logs.
mumble_grpc_endpoint: '192.168.1.218:50051'
# Homeserver domain
domain: 'example.org'
# Homeserver URL
homeserverURL: 'https://matrix.example.org/'
# Internal ID of the Matrix room to use for bridge admin commands.
# Anyone in this room will be able to link Mumble channels to Matrix.
# Type "help" for commands, you should only use this room for bot admin tasks.
# On Riot this is under 'Room Settings' => 'Advanced' => 'Room information'.
matrixRoom: '!REDACTEDROOMID:example.org'

mumble-registration.yml:

id: REDACTED_ID
hs_token: REDACTED_HS_TOKEN
as_token: REDACTED_AS_TOKEN
namespaces:
  users:
    - exclusive: true
      regex: '@mumble_.*'
  aliases: []
  rooms: []
url: 'http://192.168.1.209:8090'
sender_localpart: mumblebot
rate_limited: true
protocols: null

I can curl MAM on port 8090 from the HS, though it gives an error:

curl 192.168.1.209:8090                                                                                 
<!DOCTYPE html>                                                                                                                         
<html lang="en">                                                    
<head>                                                                                                                                  
<meta charset="utf-8">                                                                                                                  
<title>Error</title>         
</head>                           
<body>                     
<pre>Cannot GET /</pre>                                             
</body>                    
</html>

and I can curl the homeserver URL from the container running MAM:

$ curl https://matrix.example.org/
<html>
<head><title>302 Found</title></head>
<body>
<center><h1>302 Found</h1></center>
<hr><center>nginx</center>
</body>
</html>
@bertiebaggio
Copy link
Author

Can the latest git HEAD be built simply by git clone-ing and running build.sh ?

I did this (with npm i) and it seems to work. Does this mean the version on nodejs is out of date? It says it was last updated 9 months ago.

Cheers!

@mymindstorm
Copy link
Owner

I apologize for the confusion, yes the version on npm is out of date. Hence the disclaimer in the readme. I haven't had the chance to investigate an issue with the GRPC api that is blocking me from finishing the changes in command-parse.

@bertiebaggio
Copy link
Author

bertiebaggio commented Mar 10, 2021

Edit: didn't mean to close, my click accuracy was way off! As below, happy for it to stay closed or be reopened

No worries, thanks for taking the time to reply! I had a look at the other install options and couldn't see much difference in the early parts at a brief glance, though I see they do diverge :)

I was asking some questions in the #mumble IRC/matrix channel and was given fair warning about gRPC there being pretty experimental there!

Is there a specific issue for the gRPC problem?

(Side note: I am happy for this issue to be closed out, or left as a search hit for others who stumble into the same issue; whatever you feel is best)

@mymindstorm
Copy link
Owner

mymindstorm commented Mar 10, 2021

No worries, thanks for taking the time to reply!

No problem. Thank you for the detailed error report, I wish more people would give me reports like this one.

I was asking some questions in the #mumble IRC/matrix channel and was given fair warning about gRPC there being pretty experimental there!

Is there a specific issue for the gRPC problem?

Yep, might have been a better idea to use ICE, at this point I can't remember why I gave up on using it.

In terms of specifics, I can't remember exactly as it has been a while. I think the issue boiled down to channelGet not returning anything when I was trying to get parent channels from it for sending recursive messages. My plan was to investigate using GDB on murmur's end.

this.client.channelGet(channel, (response: Channel | Error | null) => {
if (response instanceof Channel) {
resolve(response);
return;
} else if (response !== null) {
console.error(response);
}

where channel is the one that is sent with the USERTEXTMESSAGE event:

const textMtxRooms = await getMatrixRooms(event.getMessage()?.getChannelsList());

@mymindstorm mymindstorm reopened this Mar 10, 2021
@mymindstorm mymindstorm pinned this issue Mar 10, 2021
@bertiebaggio
Copy link
Author

Yep, might have been a better idea to use ICE, at this point I can't remember why I gave up on using it.

While it's experimental at this stage, gRPC feels more future-proof in the long run; not that I'm familiar with mumble-server dev!

In terms of specifics, I can't remember exactly as it has been a while. I think the issue boiled down to channelGet not returning anything when I was trying to get parent channels from it for sending recursive messages. My plan was to investigate using GDB on murmur's end.

Thanks for the explanation. I'm not well-versed in either the gRPC protocol or TypeScript, but if anything comes up in my playing around with the bridge I'll explore further.

Now that I've got the murmur side and the bridge functional, my intention is actually to Dockerise this so that it can be installed using matrix-docker-ansible-deploy. If I get somewhere useful with it -- no promises! -- and if you're interested, I can open an issue ± PR here once some meaningful progress has been made :)

@mymindstorm
Copy link
Owner

I can open an issue ± PR here once some meaningful progress has been made :)

I'd be happy to have the contribution.

1 similar comment
@mymindstorm
Copy link
Owner

I can open an issue ± PR here once some meaningful progress has been made :)

I'd be happy to have the contribution.

@bertiebaggio
Copy link
Author

I'd be happy to have the contribution.

Great! I'll work in a fork, and will probably seek guidance from the MDAD folks on what they consider best practices. I'll update here (or likely in a new issue/PR) when I get somewhere. Cheers again :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants