Hi everyone, I was able to sort the issue out:
What I was actually trying: Making a new handshake with guacd on a socket that was already established. I didn’t realize, that guacd only reacts to “select” instructions on a new socket. My procedure is like this when a “reconnect” happens: I establish a new socket to guacd -> sending opcode “select, <SessionID>” -> new handshake. Then I remove the old socket. It seems to work fine. Best regards Benjamin -- Benjamin Gericke Test Engineer InCarApp Integration 1, TV-I41 | Vehicle Solutions & Automated Driving [email protected]<mailto:[email protected]> | Mobile: +49 152 049 270 41 | IAV GmbH, Carnotstr. 1, 10587 Berlin, Germany We move the world for the better through technology and engineering. www.iav.com<https://www.iav.com> | Newsletter<https://www.iav.com/newsletter-anmeldung/> | Twitter<https://twitter.com/IAV_de> | Facebook<https://www.facebook.com/insideiav> | Instagram<https://www.instagram.com/inside_iav/> | LinkedIn<https://www.linkedin.com/company/iav-gmbh> | Xing<https://www.xing.com/companies/iav> | YouTube<https://www.youtube.com/user/IAVchannel> IAV GmbH Ingenieurgesellschaft Auto und Verkehr; Sitz/Registered Office: Berlin; Registergericht/Registration Court: Amtsgericht Charlottenburg; Registernummer/Company Registration Number: HRB 21 280; Geschäftsführer/Managing Directors: Matthias Kratzsch (Vorsitzender/Chairman), Katja Ziegler, Dr. Uwe Horn; Vorsitzender des Aufsichtsrates/Chairman of the Supervisory Board: Dr. Nikolai Ardey Datenschutzhinweise/Privacy Policy<https://www.iav.com/datenschutz> Von: "Gericke, Benjamin (TV-I)" <[email protected]> Antworten an: "[email protected]" <[email protected]> Datum: Montag, 23. Januar 2023 um 19:19 An: "[email protected]" <[email protected]> Betreff: How to "reconnect" audio to a guacd session Hi, We have a custom guacamole client for a web application based on guacamole-common-js and we are using the guacamole-lite NodeJS library as “gateway” to guacd. I’m currently implementing an auto-reconnect functionality in our app, because we have to deal with random disconnects in the future. I would like to implement a version that auto-reconnects as seamless as possible to work around short connection issues (such as Kubernetes Nginx Ingress reloads, which kill websockets). I’m currently re-initializing the common-js Guacamole.Client on tunnel disconnects and re-attaching the websocket to the existing guacamole-lite session, which keeps the connection to guacd open in the meantime. From guacd’s perspective, the session was never disconnected. This works fine so far. I just can’t get the audio channels to work again. My client is subscribing to Guacamole.Client.onaudio(), which is of course not triggered with my described behaviour, since guacd doesn’t know about the lost session. I tried the following things after a reconnect: * Sending a “select” command with the guacd session ID followed by a new handshake upon reconnect * Guacd in DEBUG says: Handler not found for “select” followed by “handler not found” for all the other handshake instructions I’m sending * Do I have to tell guacd something before initializing a new “select” command? * Sending an “audio” command * have the problem that the buffer handling in guacamole-lite is creating trouble for me (so nothing to help for you here) * The mimetype value seems to get mixed up with other messages, so I need to investigate that further * I just wanted to ask: Will guacd respond with a new audio output stream anytime when a correct “audio” command arrives? Thanks, and best regards Benjamin We move the world for the better through technology and engineering. www.iav.com<https://www.iav.com> | Newsletter<https://www.iav.com/newsletter-anmeldung/> | Twitter<https://twitter.com/IAV_de> | Facebook<https://www.facebook.com/insideiav> | Instagram<https://www.instagram.com/inside_iav/> | LinkedIn<https://www.linkedin.com/company/iav-gmbh> | Xing<https://www.xing.com/companies/iav> | YouTube<https://www.youtube.com/user/IAVchannel> IAV GmbH Ingenieurgesellschaft Auto und Verkehr; Sitz/Registered Office: Berlin; Registergericht/Registration Court: Amtsgericht Charlottenburg; Registernummer/Company Registration Number: HRB 21 280; Geschäftsführer/Managing Directors: Matthias Kratzsch (Vorsitzender/Chairman), Katja Ziegler, Dr. Uwe Horn; Vorsitzender des Aufsichtsrates/Chairman of the Supervisory Board: Dr. Nikolai Ardey Datenschutzhinweise/Privacy Policy<https://www.iav.com/datenschutz>
