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

[xmppclient] regression: host parameter required #18007

Closed
skazi0 opened this issue Dec 31, 2024 · 5 comments · Fixed by #18289
Closed

[xmppclient] regression: host parameter required #18007

skazi0 opened this issue Dec 31, 2024 · 5 comments · Fixed by #18289
Labels
bug An unexpected problem or unintended behavior of an add-on

Comments

@skazi0
Copy link

skazi0 commented Dec 31, 2024

Expected Behavior

The host parameter should not be required and domain should be used as default (as documented).

Bridge xmppclient:xmppBridge:xmpp "XMPP Client" [ username="user", domain="example.com", password="secret" ] {
}

Current Behavior

Since last update (debian bookworm) the configuration as in example above stopped working. The log says:

[INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'xmppclient:xmppBridge:xmpp' changed from UNKNOWN to OFFLINE (CONFIGURATION_ERROR): Please check configuration

Possible Solution

I think the regression comes from recent change in xmpp binding.
Looks like the if (!host.isBlank()) condition doesn't work as expected if host is missing.
For now my workaround is:

Bridge xmppclient:xmppBridge:xmpp "XMPP Client" [ username="user", domain="example.com", host="example.com", password="secret" ] {
}

Steps to Reproduce (for Bugs)

  1. remove host=... from xmpp bridge configuration.
  2. observe above error in events log.

Your Environment

# dpkg -l | grep openhab
ii  openhab                                          4.3.1-1                                   all          openhab
ii  openhab-addons                                   4.3.1-1                                   all          openhab-addons

# cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
NAME="Debian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
@skazi0 skazi0 added the bug An unexpected problem or unintended behavior of an add-on label Dec 31, 2024
@lsiepel
Copy link
Contributor

lsiepel commented Dec 31, 2024

Let me see if I can fix this.

@riorado
Copy link

riorado commented Jan 17, 2025

Hello,

I have the same behavior on Openhabian 4.3.2. It happened after the upgrade.
Impossible to get online with the XMPP Client binding. CONFIGURATION_ERROR Please check configuration
If I put the domain string in the Server Hostname/IP, the status becom "UNKNOWN"
I tried all possibilities, no way to let it work.

@lsiepel
Copy link
Contributor

lsiepel commented Feb 19, 2025

Sorry it took so long. Created a new JAR that should fix this case. Please download it from the linked PR and test it:

  1. Make sure you have openHAB 4.3.x (latest stable)
  2. Uninstall the current XMPP binding (all links etc won;t be affected)
  3. Drop the downloaded JAR in the addon folder.
  4. Report your results.

@skazi0
Copy link
Author

skazi0 commented Feb 20, 2025

I'm getting following error:

2025-02-20 11:12:25.773 [WARN ] [org.apache.felix.fileinstall        ] - Error while starting bundle: file:/usr/share/openhab/addons/org.openhab.binding.xmppclient-4.3.3-SNAPSHOT.j
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.xmppclient [413]
  Unresolved requirement: Import-Package: org.jivesoftware.smack; version="[4.3.0,5.0.0)"

    at org.eclipse.osgi.container.Module.start(Module.java:463) ~[org.eclipse.osgi-3.18.0.jar:?]
    at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:445) ~[org.eclipse.osgi-3.18.0.jar:?]
    at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1260) [bundleFile:3.7.4]
    at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1233) [bundleFile:3.7.4]
    at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:520) [bundleFile:3.7.4]
    at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:365) [bundleFile:3.7.4]
    at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:316) [bundleFile:3.7.4]

but since the fix was already merged, maybe I'll just wait for next release and test then.

@lsiepel
Copy link
Contributor

lsiepel commented Feb 20, 2025

f

Better wait for the release as the issue you have is related to how karaf handles dependency's in the addon folder. It is not related to this fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An unexpected problem or unintended behavior of an add-on
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants