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

Bug or misconfiguration of colibri-ws Proxy? #101

Closed
gjaekel opened this issue Nov 26, 2020 · 7 comments · Fixed by #108
Closed

Bug or misconfiguration of colibri-ws Proxy? #101

gjaekel opened this issue Nov 26, 2020 · 7 comments · Fixed by #108

Comments

@gjaekel
Copy link
Contributor

gjaekel commented Nov 26, 2020

On my approval stage currently using v1_1_1.20201124-222400, I just discovered the messages

20201126-103347.534 INFO  [Jetty-QTP-BOSH-55434] [ProxyConnection] ProxyConnection ws://10.10.1.137:8080/colibri-ws/default-id/4795dec25903761b/bae75517?pwd=2k0uanbntvov7f0jot24ln6feh null
20201126-103347.554 ERROR [HttpClient@78d78009-55808] [ProxyConnection] Error: Connection refused
java.net.ConnectException: Connection refused
        at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) ~[?:1.8.0_262]
        at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:714) ~[?:1.8.0_262]
        at org.eclipse.jetty.io.SelectorManager.doFinishConnect(SelectorManager.java:355) ~[jetty-io-9.4.28.v20200408.jar:9.4.28.v20200408]
        at org.eclipse.jetty.io.ManagedSelector.processConnect(ManagedSelector.java:232) ~[jetty-io-9.4.28.v20200408.jar:9.4.28.v20200408]
        at org.eclipse.jetty.io.ManagedSelector.access$1400(ManagedSelector.java:62) ~[jetty-io-9.4.28.v20200408.jar:9.4.28.v20200408]
        at org.eclipse.jetty.io.ManagedSelector$SelectorProducer.processSelected(ManagedSelector.java:543) ~[jetty-io-9.4.28.v20200408.jar:9.4.28.v20200408]
        at org.eclipse.jetty.io.ManagedSelector$SelectorProducer.produce(ManagedSelector.java:401) ~[jetty-io-9.4.28.v20200408.jar:9.4.28.v20200408]
        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.produceTask(EatWhatYouKill.java:360) ~[jetty-util-9.4.28.v20200408.jar:9.4.28.v20200408]
        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:184) ~[jetty-util-9.4.28.v20200408.jar:9.4.28.v20200408]
        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171) ~[jetty-util-9.4.28.v20200408.jar:9.4.28.v20200408]
        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:135) ~[jetty-util-9.4.28.v20200408.jar:9.4.28.v20200408]
        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:806) [jetty-util-9.4.28.v20200408.jar:9.4.28.v20200408]
        at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:938) [jetty-util-9.4.28.v20200408.jar:9.4.28.v20200408]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_262]

But port 8080 is just bound to localhost for the JVB-JVM.

@gjaekel
Copy link
Contributor Author

gjaekel commented Nov 26, 2020

So this was a bug?

@deleolajide
Copy link
Member

I don't know. I had the same issue trying to access the colibri rest service for the conference statistics. In the end I used localhost. It is working ok on my dev windows pc as well as pade.chat linux docker instance, so it stays for now until it becomes an issue elsewhere.

The websockets data-channel is not mandatory for JVB2 to work, but the jitsi-meet needs the connection in order to receive conference events like active speaker, etc.

@gjaekel
Copy link
Contributor Author

gjaekel commented Nov 26, 2020

I definitely need to support again Jitsi-Meet for iOS and Android as well because it was in common use as long as the newer version don't work with our OFMeet V1.0 / JVB1 instance at production. This happens about start of November. And about mid of last week, Chrome for iOS was also updated and with this any coworker using an iOS device get banned.

For this reason, thank you for the patch.

@gjaekel
Copy link
Contributor Author

gjaekel commented Nov 28, 2020

Sorry, please reopen, because I have still problems with the colibri websocket proxy.

The port open to the internet is 443, it is local redirected to 7443. If I request the client's config.js, it shows the right information.

gjaekel@vz370 ~ $ wget -qSO- https://miet.dnb.de/config.js |& grep -i websocket
  "websocket": "wss://eval.xmpp.dnb.de:443/ws/",
  "openBridgeChannel": "websocket",     

But inside the clients js console, I get error messages concerning a try to connect to port 7443.

lib-jitsi-meet.min.js:15686 WebSocket connection to 'wss://eval.xmpp.dnb.de:7443/colibri-ws/default-id/e7d92f32562da35f/ec00fa24?pwd=60v2a3vvc7imquq3jkln9esfrt' failed: Establishing a tunnel via proxy 

Is this caused by a "wrong" upgrade message based on the local view?

@gjaekel
Copy link
Contributor Author

gjaekel commented Nov 28, 2020

I found in the server log

20201128-175739.822 INFO  [Thread-88] [o.j.o.p.o.JvbPluginWrapper] INFO: [1] ColibriWebSocketService.<init>#40: Base URL: wss://eval.xmpp.dnb.de:7443/colibri-ws/default-id
20201128-175739.838 INFO  [Thread-88] [o.j.o.p.o.JvbPluginWrapper] INFO: [1] org.eclipse.jetty.util.log.Log.initialized: Logging initialized @1166ms to org.eclipse.jetty.util.log.JavaUtilLog
20201128-175739.950 INFO  [Thread-88] [o.j.o.p.o.JvbPluginWrapper] INFO: [1] ColibriWebSocketService.registerServlet#65: Registering servlet at /colibri-ws/*, baseUrl = wss://eval.xmpp.dnb.de:7443/colibri-ws/default-id

This may be the root cause.

@gjaekel
Copy link
Contributor Author

gjaekel commented Nov 28, 2020

Just discovered https://github.com/igniterealtime/openfire-pade-plugin/blob/master/ofmeet/src/java/org/jivesoftware/openfire/plugin/ofmeet/JvbPluginWrapper.java#L79 !

final String public_port = JiveGlobals.getProperty( "httpbind.port.secure", "7443");

That's also the property used for the main https server; i.e. changing this value will affect other things.

I think, we have to change
https://github.com/igniterealtime/openfire-pade-plugin/blob/master/ofmeet/src/java/org/jivesoftware/openfire/plugin/ofmeet/JvbPluginWrapper.java#120

 "      domain = \"" + JiveGlobals.getProperty( "ofmeet.websockets.domain", domain) + ":" + public_port + "\"",

Proposed a patch.

@gjaekel
Copy link
Contributor Author

gjaekel commented Nov 28, 2020

This should fix my problem: I simulate it by editing the generated application.conf (replace the port 7443 by 443) and set it read-only. After a restart, the exceptions at the clients vanished.

gjaekel added a commit to gjaekel/openfire-pade-plugin that referenced this issue Jan 26, 2021
* add label to sip-communicator.properties file

* Fix NPE issue

* version 1.1.2

* Use the username instead of room nicks for participants in summary

* Update logging.properties

avoid double-timestamping

Fixes igniterealtime#97 for JiCoFo.

* Update logging.properties

avoid double-timestamping

* do not use jitsi jvm options for windows

* fix igniterealtime#101 - Bug or misconfiguration of colibri-ws Proxy?

* fix igniterealtime#96 - IP Address Mapping no longer takes when changed from Automatic to Disabled

* test for all windows platforms

* stop message notification flood

* fix igniterealtime#103 - Openfire meeting watermark images does not show up

* fix igniterealtime#102 - Look n Feel via android mobile Mic does not shown up

* bump pade version

* fix igniterealtime#105 - Add support for configuring the new video quality settings

* fix igniterealtime#104 - Enhancement: Cam don't switch offline if Video is disabled

* update changelog

* Update JvbPluginWrapper.java

Along with domain, make port of public URL of colibri-ws announced to the *client* configurable.

* add public port for jvb websockets

* make jvb2 websockets mandatory

* refresh with latest jicofo build

* refresh with latest jvb build

* Update JitsiJicofoWrapper.java

Pass inverted Property `ofmeet.conference.auto-moderator` as config property  `org.jitsi.jicofo.DISABLE_AUTO_OWNER` inside the Jicofo config file.

The tag name `ofmeet.conference.auto-moderator` is chosen with respect to `ofmeet.conference.admin`

* added back ofgasi

* added new settings to jigasi for sip proxy

* added support for jigasi

* bump version

* remove test config file

* work-in-progress

* add support for jigasi plugin and fix issues

* update version to 1.1.3

* prepare for 1.1.3

* tidy up websocket code

* provide dummy file

* remove focus and callcontrol components

* build and test on linux

* Update ConfigServlet.java

Refactor a possible bug: In case of _stereo_ enable, the config tag `stereo` was putted twice to config.

* ensure max bitrate for screenshare

* Update ConfigServlet.java

Make _audioLevels_ an configurable option.
Most people advice to have disabled this, therefore introduce the inverted tag `ofmeet.audioLevels.enabled` with default `false`.

* Update ofmeet_i18n.properties

Clarify (at least to me!) misleading description.

* Update ofmeet-settings.jsp

refactor label name

* Update ofmeet_i18n.properties

refactor label

* Update ofmeet-settings.jsp

refactor 2nd tag name

* Update ofmeet_i18n.properties

refactor 2nd tag name

* Update custom_ofmeet.js

Make audio toggling as short as possible to keep privacy;  un-muting of 1s will dispose recognizable contents to the other participants.

I already suggest this with my first contribution, but you (Dele) changed it for some reason unknown to me.

* Update custom_ofmeet.js

Enhance resolution of default "initials" avatar by 4 to 128px.

For unknown reasons, with OFMeet V1.1 this code path is finally used! And my work on an appropriate order of initials come into place.

* Update JitsiJicofoWrapper.java

fixed type clash

* Update custom_ofmeet.js

* Update custom_ofmeet.js

* Update custom_ofmeet.js

* Update custom_ofmeet.js

* Update confetti.browser.min.js

Here's the Xmas Edition of the confetti tool!

I did a bit un-minify to allow better editing. In this first sprint, the shapes set for Xmas is hard coded. On may refactor to externalize this later.

The code change is taken from the upstream pull request catdad/canvas-confetti#111 , which is not processed for now. Because it's not restricted to emojis but may be used with any text, I changed the token used for declaration.

* remove redundant files

* video quality work-in-progress

* Update confetti.browser.min.js

Move Xmas shape set to `custom_ofmeet.js`

* Update custom_ofmeet.js

Change shape set for the confetti tool to an *Xmas edition* during December.

ToDo: Add an easter egg.

* Update custom_ofmeet.js

more snow flakes to keep more balance with other shapes

* Update custom_ofmeet.js

* empty classes/jitsi-meet folder

* copy modified files to correct location

* revert back to stable release 5142 for jvb  and jicofo

* add more video quality settings to admin web page

* add visual indicators for jvm, jicofo and jigasi services

* version 1.1.3

* change default background to igniterealtime fans image

* fix igniterealtime#75
fix igniterealtime#110
fix igniterealtime#114
fix igniterealtime#113
fix igniterealtime#106
fix igniterealtime#82

* remove testing data

* Update custom_ofmeet.js

* make websocket data channel optional and configurable

* merge jigasi and jicofo into ofmeet plugin

* fix igniterealtime#132 fix igniterealtime#119 fix igniterealtime#210

* Update InterfaceConfigServlet.java

Make `DISABLE_VIDEO_BACKGROUND` configurable by the System Property `org.jitsi.videobridge.ofmeet.disable.video_background`

Disabling the video background will remove flickering on fine-lined screen shares.

* Update README.md

* Update README.md

* Update README.md

* Add FreeSWITCH integration to Jigasi

* make jigasi and freeswitch services enable configurable

* fix igniterealtime#139

* remove quotes. linux does not like them

* fix igniterealtime#139 fix igniterealtime#137 fix igniterealtime#111

* Update InterfaceConfigServlet.java

Enable enforced notification auto-dismiss with a timeout of 15s.

Solves igniterealtime#142.

* fix igniterealtime#145 - Enhancement: Deliver Administrative Messages to Meeting Participants

* fix igniterealtime#144 - Enhancement: add several options to meeting settings

* prepare for version 1.2.0

* fix igniterealtime#149 - Regression: Remove "stay on page" on leaving a conference

* improve detection of active conference recording

* version 1.2.0

* fix igniterealtime#150 - Cosmetical: Quirk in Status Table on Summary Page

* add FS JSPs from deprecated FS plugin

* Fix character encoding problem on welcome page.

* Update JitsiJigasiWrapper.java

* Update README.md

* Update README.md

* Update README.md

* version 1.2.1

* Update README.md

* Update README.md

* Update README.md

* Update WellKnownHostMeta.java

Allow to override the annouced port of the XMPP server, `httpbind.port.secure` (with the default `7443`), by a public view  defined by `httpbind.publicport.secure`.

* fix igniterealtime#120 - Dominant Speaker Switching don't work

* version 1.2.2

* Update ofmeet_i18n.properties

Enhance description for Data Channel via Web Socket

Supports igniterealtime#120

* final ver 1.2.2

* Update README.md

Please also alter the Image included at L47-

* Update README.md

* Update README.md

* Update README.md

* further validation on colibri-ws port. prevent 8080 and 8888

* Update README.md

for the simplest case, one may use iptables to redirect a port with just one rule
```
iptables -A PREROUTING -i eth0 -p tcp -m tcp --dport 443 -j REDIRECT --to-ports 7443
```

* Update custom_ofmeet.js

Fix broken avatar image in case the information taken from the vCard PHOTO is incomplete. This may happen if the vCard is pulled by LDAP at an WinAD.

May fix igniterealtime#168.

* fix igniterealtime#154 - Start Order of Plugins OFMeet and Pade

* blank jvm default not working with linux

* use correct plugin name

* fix igniterealtime#176 - Meeting planner does not show up in Meeting plugin

* prepare for release 1.3.0

* cosmetic changes

* fix igniterealtime#178 - Remove webinar mode

* add accents to pade name

* added ofmeet changelog

* Update custom_ofmeet.js

Sort names in Contact Manager.

Support igniterealtime#50.

* fix igniterealtime#50 - Enhancement: Sort Entries in Contact Manager

* Update custom_ofmeet.js

Make the icon area of a contact clickable.

Fixes igniterealtime#51.

* Update custom_ofmeet.js

Use UI message type _error_, which will stay until dismissed.

Enhances igniterealtime#145.

* cosmetic changes

* update changelog

* use versioning with pade client maven build

* fix syntax error

* Update JitsiJvbWrapper.java

Note: The (internal) default binding for the JVB private interface is localhost. Use `local_ip`, if another `public_ip` is in use, because then it should be save to allow access from the local net.

Also drop former used `keystore`

* Update JitsiJvbWrapper.java

In local mode, bind to all interfaces.

* Update JitsiJvbWrapper.java

Remove support to configure the address of the private REST API for security reasons. Without this, it will default to `localhost`.

* cosmetic change

* Update JitsiJvbWrapper.java

Fix a missing use of `rest_port` instead of former fixed `8080`.

* fix igniterealtime#182 - Feature Request: Allow access to JVB REST-API via private http interface

* fix igniterealtime#163 - Support VP9 codec

* disable bandwidth estimation (bwe) when vp9 forced

* Add list of meetings in progress.

* Fix i18n Pade corruption

* Fix Comment COOL0707 -> BAO

* fix igniterealtime#186 - Feature Request: List of meetings in progress on Welcome page

* fix igniterealtime#186 - Don't add non public rooms to meetings in progress list

* fix igniterealtime#186 - use forwarded url if available

* Update InProgressListServlet.java

Use refer(r)er URL to reflect external (client browser) view of the URL used for meetings.

* Create ofmeet-de.json

German translation for the "Meetings in Progress" feature.

* Update custom_ofmeet.css

To keep display clean, make "green" (good) connection state indicator hidden after a while

* revert igniterealtime#190

* fix igniterealtime#193 - Custom branding.js file to be preserved

* remove webinar code again

* fix igniterealtime#189 - Enhancement: Clean-up display by hiding green "good connection" state inidcator

* cosmetic changes

* Update README.md

* Update custom_ofmeet.css

Allow the Conferences Display at the Welcome Page to show more entires.

* fix igniterealtime#193 - Custom branding.js file to be preserved

* fix igniterealtime#197 - Enhancement: Enlarge Conferences Display

* Update custom_ofmeet.css

Make the right Toolbar wrapping around in the same way as the left one.

* add ofmeetUrl to branding.js

* added missing stop method on websocket client object

* fix NPE in BookmarkInterceptor

* add fastpath webchat to url redirect exclusion list

* update to jicofo 2.0.5390

* update to jvb 2.0.5390

* disable sctp for windows

* bump version to 1.3.1

* Avoild creation of unused HttpClients

At the backend connection of the WebSocket reverse proxy, there's no need to have a pool of HttpClients as provided by default.

* Create SslContextFactoryProvider.java

Provide a SslContextFactory

* Create QueuedThreadPoolProvider.java

Provide a common ThreadPool used by the HttpClient

* update changelog

* Update JitsiJvbWrapper.java

* enable REST-endpoints for health check (`/about/health`) and debug (`/debug`)
* brush-up indents and rearrange configuration sections

* fix igniterealtime#213 - Enhancement: Enable some useful REST-endpoints of JVB2

* Localize the view of custom_ofmeet

* fix #14 - cyrillic with some variables

* Update custom_ofmeet.js

Add a event handler to auto-hide the mouse pointer after an idle timeout of 10s.

Support igniterealtime#218 .

* fix igniterealtime#210 - APP.conference.addConferenceListener has been removed

* upgrade jitsi-meet

* fix igniterealtime#218 - Feature: Auto-hide mouse pointer

* Fixed initial letter avatars to be centered correctly.

* testing git

* fix igniterealtime#226 - Fixed initial letter avatars to be centred correctly

* igniterealtime#225 new feedback servlet

* igniterealtime#225 read feedback form from file

* igniterealtime#225 feedback post request

* igniterealtime#225 fixed wrong post location

* igniterealtime#225 writing post data to log

* igniterealtime#225 log raw post data

* igniterealtime#225 log parts

* igniterealtime#225 adding @MultipartConfig to servlet

* igniterealtime#225 read value from part inputstream

* Update FeedbackServlet.java

* brush code and format style
* Introduce macro replacing

* Update feedback.html

introduce macros

* Update pom.xml

Add Apache POI

* Update feedback.html

Introduce separate ratings for audio and video

* Update ConfigServlet.java

Introduce `ofMeetConfig.getFeedbackEnabled()` to add `enableClosePage`

* Update ConfigServlet.java

Use `ofmeet.feedback.enabled` to controll output of `enableClosePage`

* Update InterfaceConfigServlet.java

Introduce `ofmeet.feedback.enable` to control output of `SHOW_PROMOTIONAL_CLOSE_PAGE`

* fix build error

* Update FeedbackServlet.java

Add missing ìmport`

* work-in-progress

* Update FeedbackServlet.java

* Get macros from property repository 
* Brush-Up code syle

* updated feedback form

* fix i18n issue with feedback defaults

* Update branding.js

Added settings variables 👍   
  "publishLocation"         : {disable: false, value: true},
    "enableHomePage"          : {"disable": true, "value": false},
    "homePage"                : {"disable": true, "value": false},
    "ofmeetUrl"               : {"disable": false, "value": "https://pade.chat:5443/ofmeet/"},

* Update feedback.html

re-introduce separate ratings for audio and video.
Use "star" icons for now and a headline

* Update FeedbackServlet.java

* use `optString` to get JSON properties because they might be missing.
* update auditlog message, add a marker if it contain a comment message.

* Update branding.js

added     "showToolbarIcons"        : {"disable": false, "value": true},
and corrected some typo in file

* fix igniterealtime#225

Co-authored-by: Dele Olajide <dele@4ng.net>
Co-authored-by: 0xBAAAAAAD <tfeayush@gmail.com>
Co-authored-by: るしふぁ <cool0707@gmail.com>
Co-authored-by: Gitea <gitea@fake.local>
Co-authored-by: Oliver Kuhn <oliver.kuhn@web.de>
Co-authored-by: Claude Stabile <claude@stabile.com>
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

Successfully merging a pull request may close this issue.

2 participants