Closed ghost closed 8 years ago
Requires python 3.5, i'd start there.
Uh. I was pretty sure i was using 3.5. I'll try again.
thanks and cheers t.
Okiedokie. The Syntax error is gone now. But now i get.
pages ~ # xmppwb --config /etc/xmppwb/config.conf
04-18:28:40 INFO Using config file /etc/xmppwb/config.conf
04-18:28:40 INFO Listening for incoming webhooks on http://127.0.0.1:5000/
04-18:28:40 ERROR Exception in callback _SelectorSocketTransport._read_ready()
handle: <Handle _SelectorSocketTransport._read_ready()>
Traceback (most recent call last):
File "/usr/lib64/python3.5/asyncio/selector_events.py", line 660, in _read_ready
data = self._sock.recv(self.max_size)
AttributeError: 'NoneType' object has no attribute 'recv'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib64/python3.5/asyncio/events.py", line 125, in _run
self._callback(*self._args)
File "/usr/lib64/python3.5/asyncio/selector_events.py", line 664, in _read_ready
self._fatal_error(exc, 'Fatal read error on socket transport')
File "/usr/lib64/python3.5/asyncio/selector_events.py", line 584, in _fatal_error
self._loop.call_exception_handler({
AttributeError: 'NoneType' object has no attribute 'call_exception_handler'
There is something running on 127.0.0.1:5000 but no connection to my openfire server.
Any hints?
thanks t.
Which version of xmppwb are you using? The latest git version or the latest from pypi? Also, can you start xmppwb with the -v and -d flags and post the debug output?
here we go:
pages ~ # xmppwb -v -d --config /etc/xmppwb/config.conf
04-18:55:34 INFO Using config file /etc/xmppwb/config.conf
04-18:55:34 DEBUG Get address info 127.0.0.1:5000, type=<SocketKind.SOCK_STREAM: 1>, flags=1
04-18:55:34 DEBUG Getting address info 127.0.0.1:5000, type=<SocketKind.SOCK_STREAM: 1>, flags=1 took 0.032 ms: [(<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_STREAM: 1>, 6, '', ('127.0.0.1', 5000))]
04-18:55:34 INFO <Server sockets=[<socket.socket fd=6, family=AddressFamily.AF_INET, type=2049, proto=6, laddr=('127.0.0.1', 5000)>]> is serving
04-18:55:34 INFO Listening for incoming webhooks on http://127.0.0.1:5000/
04-18:55:34 DEBUG poll 999.764 ms took 0.232 ms: 1 events
04-18:55:34 DEBUG poll 999.909 ms took 0.330 ms: 1 events
04-18:55:34 DEBUG Get address info 138.201.43.27:5222, type=<SocketKind.SOCK_STREAM: 1>
04-18:55:34 DEBUG Getting address info 138.201.43.27:5222, type=<SocketKind.SOCK_STREAM: 1> took 0.020 ms: [(<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_STREAM: 1>, 6, '', ('138.201.43.27', 5222))]
04-18:55:34 DEBUG connect <socket.socket fd=7, family=AddressFamily.AF_INET, type=2049, proto=6, laddr=('0.0.0.0', 0)> to ('138.201.43.27', 5222)
04-18:55:34 DEBUG poll took 0.059 ms: 1 events
04-18:55:34 DEBUG <_SelectorSocketTransport fd=7 read=idle write=<idle, bufsize=0>>: Fatal write error on socket transport
Traceback (most recent call last):
File "/usr/lib64/python3.5/asyncio/selector_events.py", line 698, in write
n = self._sock.send(data)
ConnectionResetError: [Errno 104] Connection reset by peer
04-18:55:34 DEBUG <socket.socket [closed] fd=-1, family=AddressFamily.AF_INET, type=2049, proto=6> connected to 138.201.43.27:5222: (<_SelectorSocketTransport closed fd=7>, <xmppwb.xmpp.XMPPBridgeBot object at 0x7fb8311fa550>)
04-18:55:34 ERROR Exception in callback _SelectorSocketTransport._read_ready()
handle: <Handle _SelectorSocketTransport._read_ready() created at /usr/lib64/python3.5/asyncio/selector_events.py:232>
source_traceback: Object created at (most recent call last):
File "/usr/bin/xmppwb", line 9, in <module>
load_entry_point('xmppwb==0.2.6', 'console_scripts', 'xmppwb')()
File "/usr/lib64/python3.5/site-packages/xmppwb/core.py", line 77, in main
bridge.process()
File "/usr/lib64/python3.5/site-packages/xmppwb/bridge.py", line 88, in process
self.loop.run_forever()
File "/usr/lib64/python3.5/asyncio/base_events.py", line 301, in run_forever
self._run_once()
File "/usr/lib64/python3.5/site-packages/slixmpp/xmlstream/asyncio.py", line 24, in my_run_once
real_run_once(self)
File "/usr/lib64/python3.5/asyncio/base_events.py", line 1190, in _run_once
handle._run()
File "/usr/lib64/python3.5/asyncio/events.py", line 125, in _run
self._callback(*self._args)
File "/usr/lib64/python3.5/asyncio/selector_events.py", line 232, in add_reader
handle = events.Handle(callback, args, self)
Traceback (most recent call last):
File "/usr/lib64/python3.5/asyncio/selector_events.py", line 660, in _read_ready
data = self._sock.recv(self.max_size)
AttributeError: 'NoneType' object has no attribute 'recv'
I tried connecting to this XMPP server, but can't reproduce this error. Can you post your config? (Blank things like your password, of course.)
# vim: syntax=yaml
# Example configuration for bridging XMPP with RocketChat.
#
# The <placeholders> need to be filled out.
#
# This would connect to the XMPP MUC "conference1" using the account
# "alice" and relay messages to and from this MUC to a RocketChat-instance,
# as specified by the webhooks. The webhooks need to be configured in
# RocketChat aswell.
#
# Refer to the README for detailed documentation of all settings.
xmpp:
jid: rocketbridge@dings.meine-oma.de
password: "changed"
# A list of all MUCs that should be available to the bridges defined later.
mucs:
- jid: rocketbridge@conference.dings.meine-oma.de
nickname: rocketbridge
# password: "<muc-password>"
incoming_webhook_listener:
# The outgoing webhook URL that must be set in Rocket.Chat is of the form
# "http://{bind_adress}:{port}/".
bind_address: "127.0.0.1"
port: 5000
bridges:
- xmpp_endpoints:
- muc: rocketbridge@conference.dings.meine-oma.de
# - normal: <bob@example.com>
# - relay_all_normal: true
outgoing_webhooks:
# Note: "Outgoing from this bridge" means "Incoming to RocketChat",
# so this URL refers to the incoming webhook URL of RocketChat.
- url: https://chat.meine-oma.de/hooks/N.....
override_username: "{nick}"
message_template: "_{msg}_"
use_attachment_formatting: true
incoming_webhooks:
# Note: "Incoming to this bridge" means "Outgoing from RocketChat",
# so this token must match the token in the outgoing webhook from
# RocketChat.
- token: blub
I tried to connect with that user and the android app xabber. Worked. Thanks for your support.
Oh dear. It works now. It was a firewall issue. What else. Sorry for the noise. I'm now going to test it.
thanks for your patience t.
I'm glad that it works now. Just open another issue if there are any bugs.
Hello Devs.
I'm playing around with xmppwb but with little success. After running:
xmppwb --config /etc/xmppwb/config.conf
i get:
The specific snippet looks like:
Any suggestions?
thanks and cheers