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

Update main.go #5

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Update main.go #5

wants to merge 5 commits into from

Conversation

nosmicek
Copy link

@nosmicek nosmicek commented Jan 3, 2020

this PR does 2 things:

  1. renames XMPP_USER and XMPP_PW env variables into PROMEXP_AUTH_USER and PROMEXP_AUTH_PASSWORD (so it is more compliant with jitsi naming standards) - we use k8s deployment and this collides with other things
  2. solves compilation problems with new versions of FluuxIO/go-xmpp go xmpp library
    ./main.go:150:3: cannot use promoted field TransportConfiguration.Address in struct literal of type xmpp.Config
    ./main.go:152:3: unknown field 'Password' in struct literal of type xmpp.Config
    ./main.go:155:3: cannot use promoted field TransportConfiguration.TLSConfig in struct literal of type xmpp.Config
    ./main.go:264:31: not enough arguments in call to xmpp.NewClient
    have (xmpp.Config, *xmpp.Router)
    want (xmpp.Config, *xmpp.Router, func(error))

this patch doesnt update any documentation

this PR does 2 things:
1) renames XMPP_USER and  XMPP_PW env variables into PROMEXP_XMPP_USER and PROMEXP_XMPP_PASSWORD (so it is more compliant with jitsi naming standards) - we use k8s deployment and this collides with other things
2) solves compilation problems with new versions of FluuxIO/go-xmpp go xmpp library
./main.go:150:3: cannot use promoted field TransportConfiguration.Address in struct literal of type xmpp.Config
./main.go:152:3: unknown field 'Password' in struct literal of type xmpp.Config
./main.go:155:3: cannot use promoted field TransportConfiguration.TLSConfig in struct literal of type xmpp.Config
./main.go:264:31: not enough arguments in call to xmpp.NewClient
        have (xmpp.Config, *xmpp.Router)
        want (xmpp.Config, *xmpp.Router, func(error))

this patch doesnt update any documentation
@nosmicek nosmicek mentioned this pull request Jan 3, 2020
little change to be more in line with jitsi env variables for naming auth domain credentials
@Kroev
Copy link
Contributor

Kroev commented Jan 6, 2020

ok thank you, let me check this

@Kroev Kroev self-assigned this Jan 6, 2020
updated PR with my latest findings.. i don't know why, but xmpp library for unknown reason didn't parse xmppAuthDomain from jid, so its necessary to set it explicitly via Domain variable.

With this setup i was able to compile and get the prom exp working, ie. i got some real metrics on 8080.
@nosmicek
Copy link
Author

nosmicek commented Jan 6, 2020

i have updated PR with my latest findings with latest version of fluuxIO xmpp library, see commit message.

@nosmicek
Copy link
Author

nosmicek commented Jan 6, 2020

also good to point out, maybe in readme.md, that for jitsi prom exp to work there is necessary to have tls module enabled in prosody. we had it disabled for some reason (certificate errors), and the jitsi prom exp could not authorize to prosody due to "starttls" handshake error with prosody. it took me some time to understand the problem and enable the tls module (we are running the whole jitsi in kubernetes cluster so its a little bit more complicated).

ty for the work.

updated readme to match all changes in commits.
@msolters
Copy link

Hi @nosmicek , thanks for this PR. unfortunately there's yet another compilation fix that I guess was recently introduced due to upstream?
Regardless, our exporters are not receiving any presences despite connecting to the XMPP server. Was there some other configuration you had to do to your MUCs in prosody's config for this exporter to work for you? I see the JVBs publishing presences but the exporter receives nothing.

@nosmicek
Copy link
Author

@msolters can you specify what compilation fix do you mean? according to docker i compiled two days ago with this patch against upstream, but i might want to check that..

what do you mean by exporters (in plural) not receiving any presence? we have only one exporter and that should be enough for whole setup - it works this way on our setup pretty flawlessly.

basic things to check:

  • user created in prosody
  • tls enabled in prosody global config
  • colibri statistics enabled in jvb
  • some env variables need to be set, i would esp. check if JVB_BREWERY_MUC is the same in exporter config and in jitsi env variables for your situation, but that's just a hinch (i think both defaults to other values if not set)

what do you see in logs? i had to enable debug logs in prosody to see communication here and then in jvb, that was pretty much all i had to debug.

upstream sync with go-xmpp v0.5.0 (https://www.process-one.net/blog/go-xmpp-v0-5-0/), now builds with latest version
@nosmicek
Copy link
Author

@msolters check if my latest update doesn't help u fix your build problems.

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 this pull request may close these issues.

3 participants