ortuman / jackal Goto Github PK
View Code? Open in Web Editor NEW๐ฌ Instant messaging server for the Extensible Messaging and Presence Protocol (XMPP).
License: Apache License 2.0
๐ฌ Instant messaging server for the Extensible Messaging and Presence Protocol (XMPP).
License: Apache License 2.0
Hello everyone,
I am searching for a xmpp server for my new project. And I just want to know the reason why you decide to create a new XMPP server even if there are already good existing one. I am just starting with xmpp so I am not an expert.
What is the advantage of Jackal in comparison to the others like ejabberd or openfire?
Thanks in advance.
Not sure if this is a jackal issue or an I don't understand postgres issue... Here's the log lines from immediately before the error.
๐ [DBG] session/session:228 - RECV(c2s:default:2): <iq xmlns="jabber:client" type="set" id="2ae1ad12-5611-4eac-aee1-7835099e3d8b" from="[email protected]/gajim.ITKJ"><query xmlns="jabber:iq:private"><roster xmlns="roster:delimiter">::</roster></query></iq>
โน๏ธ [INF] xep0049/private:150 - saving private element. ns: roster:delimiter... (waveletlet/gajim.ITKJ)
๐ฅ [ERR] xep0049/private:153 - pq: there is no unique or exclusion constraint matching the ON CONFLICT specification
Pops up when I restart the server for every user that's online. Not seeing anything strange on the client side.
let us present this use case:
I do not want to users can register new accounts, but I want to allow them to change their password, so I have change the config like this:
# XEP-0077: In-Band Registration
#- registration
at this point, users cannot change their password,
yet no error is presented to them, nor no error on server log is found.
On the README (RFCs and XEPs support), it is possible to have a XEPs and RFCs support page with version (XEP-XXXX v1.2)?
Examples:
This was spotted on Xabber:
when you are connected on mobile data and reconnect to wifi, Xabber cannot login again due to
XML error on reconnect.
Normally it should reconnect and server should immediately disconnect previous connection and replace it with new one.
Do you plan to develop this module?
Go Modules require tags of the form "v0.0.0" (with the "v" prefix). Please consider tagging this way in the future to make releases compatible with modules and possibly adding additional tags on the existing tagged commits. Thanks!
Hello,
I would like to know whether jackal is running on a shared host, Im using uberspace, but there is no docker possibility and another ways are not easy enough to run a own XMPP server on it.
Thanks
Hello,
I've set up Jackal on an entirely new machine (Debian Stretch) with PostgreSQL. Unfortunately I'm not able to create a new account on my server. Both Pidgin and Conversations for Android get stuck and neither the server nor the client is responding after a certain point.
Feb 07 17:23:52 jackal jackal[1619]: 2019-02-07 17:23:52 โน๏ธ [INF] c2s/server:147 - registered c2s stream... (id: c2s:default:3)
Feb 07 17:23:52 jackal jackal[1619]: 2019-02-07 17:23:52 ๐ [DBG] session/session:219 - RECV(c2s:default:3): <stream:stream version="1.0" xml:lang="en" xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" to="jackal.650thz.de"/>
Feb 07 17:23:52 jackal jackal[1619]: 2019-02-07 17:23:52 ๐ [DBG] session/session:182 - SEND(c2s:default:3): <?xml version="1.0"?><stream:stream xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams" id="46407619-0aed-471d-ba71-67ba9f7aed9d" from="jackal.650thz.de" version="1.0"><stream:features xmlns:stream="http://etherx.jabber.org/streams" version="1.0"><starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"><required/></starttls></stream:features>
Feb 07 17:23:52 jackal jackal[1619]: 2019-02-07 17:23:52 ๐ [DBG] session/session:219 - RECV(c2s:default:3): <starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"/>
Feb 07 17:23:52 jackal jackal[1619]: 2019-02-07 17:23:52 ๐ [DBG] session/session:209 - SEND(c2s:default:3): <proceed xmlns="urn:ietf:params:xml:ns:xmpp-tls"/>
Feb 07 17:23:52 jackal jackal[1619]: 2019-02-07 17:23:52 โน๏ธ [INF] c2s/in:487 - secured stream... id: c2s:default:3
Feb 07 17:23:52 jackal jackal[1619]: 2019-02-07 17:23:52 ๐ [DBG] session/session:219 - RECV(c2s:default:3): <stream:stream version="1.0" xml:lang="en" xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" to="jackal.650thz.de"/>
Feb 07 17:23:52 jackal jackal[1619]: 2019-02-07 17:23:52 ๐ [DBG] session/session:182 - SEND(c2s:default:3): <?xml version="1.0"?><stream:stream xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams" id="50fd5c57-1857-47af-b253-3dc222122141" from="jackal.650thz.de" version="1.0"><stream:features xmlns:stream="http://etherx.jabber.org/streams" version="1.0"><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>PLAIN</mechanism><mechanism>DIGEST-MD5</mechanism><mechanism>SCRAM-SHA-1</mechanism><mechanism>SCRAM-SHA-1-PLUS</mechanism><mechanism>SCRAM-SHA-256</mechanism><mechanism>SCRAM-SHA-256-PLUS</mechanism><mechanism>SCRAM-SHA-512</mechanism><mechanism>SCRAM-SHA-512-PLUS</mechanism></mechanisms><register xmlns="http://jabber.org/features/iq-register"/></stream:features>
Feb 07 17:23:52 jackal jackal[1619]: 2019-02-07 17:23:52 ๐ [DBG] session/session:219 - RECV(c2s:default:3): <iq type="get" id="fTpaDp5chmgJ" to="jackal.650thz.de"><query xmlns="jabber:iq:register"/></iq>
Jackal Version: 0.4.8
Database Backend: PostgreSQL 9.6+181+deb9u2
TLS CA: Let's Encrypt
Configuration:
pid_path: /var/run/jackal/jackal.pid
debug:
port: 6060
logger:
level: debug
log_path: /var/log/jackal/jackal.log
#storage:
# type: mysql
# mysql:
# host: 127.0.0.1:3306
# user: jackal
# password: password
# database: jackal
# pool_size: 16
storage:
type: pgsql
pgsql:
host: 127.0.0.1:5432
user: jackal
password: [password]
database: jackal
# cluster:
# name: node1
# port: 5010
# hosts: [127.0.0.1:5009, 127.0.0.1:5011]
router:
hosts:
- name: jackal.650thz.de
tls:
privkey_path: "/etc/jackal/privkey.pem"
cert_path: "/etc/jackal/fullchain.pem"
modules:
enabled:
- roster # Roster
- last_activity # XEP-0012: Last Activity
- private # XEP-0049: Private XML Storage
- vcard # XEP-0054: vcard-temp
- registration # XEP-0077: In-Band Registration
- version # XEP-0092: Software Version
- blocking_command # XEP-0191: Blocking Command
- ping # XEP-0199: XMPP Ping
- offline # Offline storage
mod_roster:
versioning: true
mod_offline:
queue_size: 2500
mod_registration:
allow_registration: yes
allow_change: yes
allow_cancel: yes
mod_version:
show_os: true
mod_ping:
send: no
send_interval: 60
c2s:
- id: default
connect_timeout: 5
max_stanza_size: 65536
resource_conflict: replace # [override, replace, reject]
transport:
type: socket # websocket
bind_addr: 0.0.0.0
port: 5222
keep_alive: 120
# url_path: /xmpp/ws
compression:
level: default
sasl:
- plain
- digest_md5
- scram_sha_1
- scram_sha_256
- scram_sha_512
#s2s:
# dial_timeout: 15
# dialback_secret: s3cr3tf0rd14lb4ck
# max_stanza_size: 131072
#
# transport:
# bind_addr: 0.0.0.0
# port: 5269
# keep_alive: 600
Please let me know if you need any more information :-)
Is there any documentation, example that explains/helps how to use this server? It would be really great if there proper documentation.
Hi,
I'm trying to install jackal and getting below error.
WangXus-MacBook-Pro:flitter wangxu$ go get -d github.com/ortuman/jackal
WangXus-MacBook-Pro:flitter wangxu$ cd $GOPATH/src/github.com/ortuman/jackal
WangXus-MacBook-Pro:jackal wangxu$ make install
# github.com/dgraph-io/badger/pb
../../dgraph-io/badger/pb/pb.pb.go:119:24: undefined: proto.InternalMessageInfo
../../dgraph-io/badger/pb/pb.pb.go:208:28: undefined: proto.InternalMessageInfo
../../dgraph-io/badger/pb/pb.pb.go:256:39: undefined: proto.InternalMessageInfo
../../dgraph-io/badger/pb/pb.pb.go:305:36: undefined: proto.InternalMessageInfo
../../dgraph-io/badger/pb/pb.pb.go:368:33: undefined: proto.InternalMessageInfo
../../dgraph-io/badger/pb/pb.pb.go:430:32: undefined: proto.InternalMessageInfo
../../dgraph-io/badger/pb/pb.pb.go:485:30: undefined: proto.InternalMessageInfo
# github.com/ortuman/jackal/log
log/log.go:168:9: undefined: strings.Builder
# github.com/miekg/dns
../../miekg/dns/dnssec_keyscan.go:260:7: undefined: strings.Builder
../../miekg/dns/msg_helpers.go:271:8: undefined: strings.Builder
../../miekg/dns/serve_mux.go:43:9: undefined: strings.Builder
../../miekg/dns/types.go:440:10: undefined: strings.Builder
../../miekg/dns/types.go:464:10: undefined: strings.Builder
../../miekg/dns/types.go:492:10: undefined: strings.Builder
../../miekg/dns/types.go:513:29: undefined: strings.Builder
../../miekg/dns/types.go:523:28: undefined: strings.Builder
make: *** [install] Error 2
Is there something I need double check?
BR,Xu
after some time of running the server it is no longer possible to login for some clients due to strange XML error.
attaching proof of the logs in case of Xabber
xabber.txt
Nice to have: Captchas for In-Band registration.
https://xmpp.org/extensions/xep-0158.html#register
Background info: Some XMPP server operators turn off in-band registration because of misuse by spam bots. Most web registration interfaces support captchas, so this is a common approach how to handle registrations.
Still this is not a really satisfying practise, since in-band registration exists for a reason and users are expecting to be able to register directly via their XMPP client (and not only via web). Therefore I'm asking to implement captchas for in-band registration.
Note: Captchas should not be implemented via Google Recatchas, because avoiding Google and its services is a main reason why people use XMPP ;-) XMPP users tend to dislike links and dependencies to/from "big players" for a good reason. Fortunately, there are some Golang captcha libraries out there, such as: https://github.com/dchest/captcha
When trying to import the MySQL schema for Jackal, my MySQL server reports an error:
root@jackal1 ~/golang/src/github.com/ortuman/jackal # mysql jackal < sql/mysql.sql
ERROR 1071 (42000) at line 6: Specified key was too long; max key length is 767 bytes
Note that I'm not using the official Oracle MySQL, but MariaDB as a MySQL server. Since MariaDB is e.g. shipped with Debian by default, I think this issue should be investigated and compatibility should be provided in the future.
Maybe this issue from another Golang project is helpful? https://github.com/gogits/gogs/pull/4913/files
jackal can't find a server, even though dig
shows it resolves correctly.
2019-03-11 23:51:42 ๐ฅ [ERR] s2s/server:94 - lookup _xmpp-server._tcp.riotcat.org on 9.9.9.9:53: no such host
# dig riotcat.org
; <<>> DiG 9.10.3-P4-Debian <<>> riotcat.org
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 59702
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;riotcat.org. IN A
;; ANSWER SECTION:
riotcat.org. 3586 IN A 87.106.127.220
;; Query time: 0 msec
;; SERVER: 9.9.9.9#53(9.9.9.9)
;; WHEN: Mon Mar 11 23:52:57 UTC 2019
;; MSG SIZE rcvd: 56
The error is consistent, I can't get any kind of connection to that server at all.
This isn't a global issue, I can successfully connect to other servers and send messages to users on them. According to compliance.conversations.im, the remote server is running Prosody 0.11.
Then when I was checking logs for more errors, I found that a server I can successfully communicate on is also returning the same error occasionally (2019-03-12 01:54:52 ๐ฅ [ERR] s2s/server:94 - lookup _xmpp-server._tcp.chat.404.city on 9.9.9.9:53: no such host
). The remote server with the intermittent error is running ejabberd 18.12.1-2~bpo9+1.
Maybe it's something I can tweak in the config? s2s section of jackal.yml is the same as in the example:
s2s:
dial_timeout: 15
dialback_secret: s3cr3tf0rd14lb4ck
max_stanza_size: 131072
transport:
bind_addr: 0.0.0.0
port: 5269
keep_alive: 600
Hi, I've tried to install Jackal on my test virtual server running Debian 9 Stretch. I've installed Golang 1.7.4:
root@jackal1 ~/golang # go version
go version go1.7.4 linux/amd64
... and all the build requirements for Jackal dependencies. Now go get github.com/ortuman/jackal
results in this error messages:
root@jackal1 ~/golang # go get github.com/ortuman/jackal
# github.com/dgraph-io/badger
src/github.com/dgraph-io/badger/db.go:1108: y.LSMSize.Get(db.opt.Dir).(*expvar.Int).Value undefined (type *expvar.Int has no field or method Value)
src/github.com/dgraph-io/badger/db.go:1109: y.VlogSize.Get(db.opt.Dir).(*expvar.Int).Value undefined (type *expvar.Int has no field or method Value)
src/github.com/dgraph-io/badger/level_handler.go:66: undefined: sort.Slice
src/github.com/dgraph-io/badger/level_handler.go:71: undefined: sort.Slice
src/github.com/dgraph-io/badger/levels.go:253: undefined: sort.Slice
src/github.com/dgraph-io/badger/levels.go:355: undefined: sort.Slice
src/github.com/dgraph-io/badger/levels.go:442: undefined: sort.Slice
src/github.com/dgraph-io/badger/transaction.go:233: undefined: sort.Slice
src/github.com/dgraph-io/badger/value.go:665: undefined: sort.Slice
Is there anything I can do about it... or is this a bug?
[...] This will retrieve the code and install the jackal server application into your $GOBIN path.
There's no binary in my $GOBIN after go get
.
Is there any suggested web client
or the simplest test example ?
thanks
I think it is a good practice to save a user's password to the database encrypted instead of in plain text.
Sorry for posting a suggestion only...
Anyways, this project would be ideal I think to include a gateway mode for the Mattermost chat system. They already have a similar system for IRC that allows connecting to Mattermost with any IRC client and have previously suggested that a similar approach could also be used to allow Mattermost to act as a XMPP server backend.
The relevant code for the minimalist IRC server can be found here:
https://github.com/42wim/matterircd
Both Mattermost and the MatterIRCd are written in Go, just like Jackal.
@42wim could probably provide some feedback on the feasibility of this suggestion.
Thanks in advance for looking into this suggestion :)
An XMPP server project having an official Gitter?? :/ We can do better, right? :)
I doubt you meant to commit your certs to the repo, but they should be removed (and probably invalidate/revoke them).
Add an option to listen for incoming client connections via Tor hidden service.
Removed s2s for now as I'm not sure if this would even be possible currently.
Do you have the plan to implement the XEP-0045(Multi-User Chat) ๏ผ
testable on wormhole.chat
There seems to be a bug in the way the server sends stanzas, often it sends only small parts of a stanza
<
_____________
16.03.2019 15:01:44 (I) nbxmpp.transports | pollin called, state == CONNECTED
16.03.2019 15:01:44 (I) nbxmpp.idlequeue | read timeout removed for fd 700
16.03.2019 15:01:44 (I) nbxmpp.idlequeue | read timeout set for fd 700 on 55 seconds
16.03.2019 15:01:44 (I) nbxmpp.idlequeue | read timeout set for fd 700 on 120 seconds with function <bound method NonBlockingTransport.read_timeout2 of <nbxmpp.transports.NonBlockingTCP object at 0x0000000009569390>>
16.03.2019 15:01:44 (I) nbxmpp.client | raising event from transport: :::::DATA RECEIVED::::
_____________
iq
_____________
16.03.2019 15:01:44 (I) nbxmpp.transports | pollin called, state == CONNECTED
16.03.2019 15:01:44 (I) nbxmpp.idlequeue | read timeout removed for fd 700
16.03.2019 15:01:44 (I) nbxmpp.idlequeue | read timeout set for fd 700 on 55 seconds
16.03.2019 15:01:44 (I) nbxmpp.idlequeue | read timeout set for fd 700 on 120 seconds with function <bound method NonBlockingTransport.read_timeout2 of <nbxmpp.transports.NonBlockingTCP object at 0x0000000009569390>>
16.03.2019 15:01:44 (I) nbxmpp.client | raising event from transport: :::::DATA RECEIVED::::
_____________
_____________
16.03.2019 15:01:44 (I) nbxmpp.transports | pollin called, state == CONNECTED
16.03.2019 15:01:44 (I) nbxmpp.idlequeue | read timeout removed for fd 700
16.03.2019 15:01:44 (I) nbxmpp.idlequeue | read timeout set for fd 700 on 55 seconds
16.03.2019 15:01:44 (I) nbxmpp.idlequeue | read timeout set for fd 700 on 120 seconds with function <bound method NonBlockingTransport.read_timeout2 of <nbxmpp.transports.NonBlockingTCP object at 0x0000000009569390>>
16.03.2019 15:01:44 (I) nbxmpp.client | raising event from transport: :::::DATA RECEIVED::::
_____________
type
_____________
16.03.2019 15:01:44 (I) nbxmpp.transports | pollin called, state == CONNECTED
16.03.2019 15:01:44 (I) nbxmpp.idlequeue | read timeout removed for fd 700
16.03.2019 15:01:44 (I) nbxmpp.idlequeue | read timeout set for fd 700 on 55 seconds
16.03.2019 15:01:44 (I) nbxmpp.idlequeue | read timeout set for fd 700 on 120 seconds with function <bound method NonBlockingTransport.read_timeout2 of <nbxmpp.transports.NonBlockingTCP object at 0x0000000009569390>>
16.03.2019 15:01:44 (I) nbxmpp.client | raising event from transport: :::::DATA RECEIVED::::
_____________
="
_____________
16.03.2019 15:01:44 (I) nbxmpp.transports | pollin called, state == CONNECTED
16.03.2019 15:01:44 (I) nbxmpp.idlequeue | read timeout removed for fd 700
16.03.2019 15:01:44 (I) nbxmpp.idlequeue | read timeout set for fd 700 on 55 seconds
16.03.2019 15:01:44 (I) nbxmpp.idlequeue | read timeout set for fd 700 on 120 seconds with function <bound method NonBlockingTransport.read_timeout2 of <nbxmpp.transports.NonBlockingTCP object at 0x0000000009569390>>
16.03.2019 15:01:44 (I) nbxmpp.client | raising event from transport: :::::DATA RECEIVED::::
_____________
result
_____________
16.03.2019 15:01:44 (I) nbxmpp.transports | pollin called, state == CONNECTED
16.03.2019 15:01:44 (I) nbxmpp.idlequeue | read timeout removed for fd 700
16.03.2019 15:01:44 (I) nbxmpp.idlequeue | read timeout set for fd 700 on 55 seconds
16.03.2019 15:01:44 (I) nbxmpp.idlequeue | read timeout set for fd 700 on 120 seconds with function <bound method NonBlockingTransport.read_timeout2 of <nbxmpp.transports.NonBlockingTCP object at 0x0000000009569390>>
16.03.2019 15:01:44 (I) nbxmpp.client | raising event from transport: :::::DATA RECEIVED::::
_____________
"
_____________
16.03.2019 15:01:44 (I) nbxmpp.transports | pollin called, state == CONNECTED
16.03.2019 15:01:44 (I) nbxmpp.idlequeue | read timeout removed for fd 700
16.03.2019 15:01:44 (I) nbxmpp.idlequeue | read timeout set for fd 700 on 55 seconds
16.03.2019 15:01:44 (I) nbxmpp.idlequeue | read timeout set for fd 700 on 120 seconds with function <bound method NonBlockingTransport.read_timeout2 of <nbxmpp.transports.NonBlockingTCP object at 0x0000000009569390>>
16.03.2019 15:01:44 (I) nbxmpp.client | raising event from transport: :::::DATA RECEIVED::::
_____________
_____________
16.03.2019 15:01:44 (I) nbxmpp.transports | pollin called, state == CONNECTED
16.03.2019 15:01:44 (I) nbxmpp.idlequeue | read timeout removed for fd 700
16.03.2019 15:01:44 (I) nbxmpp.idlequeue | read timeout set for fd 700 on 55 seconds
16.03.2019 15:01:44 (I) nbxmpp.idlequeue | read timeout set for fd 700 on 120 seconds with function <bound method NonBlockingTransport.read_timeout2 of <nbxmpp.transports.NonBlockingTCP object at 0x0000000009569390>>
16.03.2019 15:01:44 (I) nbxmpp.client | raising event from transport: :::::DATA RECEIVED::::
_____________
id
_____________
16.03.2019 15:01:44 (I) nbxmpp.transports | pollin called, state == CONNECTED
16.03.2019 15:01:44 (I) nbxmpp.idlequeue | read timeout removed for fd 700
16.03.2019 15:01:44 (I) nbxmpp.idlequeue | read timeout set for fd 700 on 55 seconds
16.03.2019 15:01:44 (I) nbxmpp.idlequeue | read timeout set for fd 700 on 120 seconds with function <bound method NonBlockingTransport.read_timeout2 of <nbxmpp.transports.NonBlockingTCP object at 0x0000000009569390>>
16.03.2019 15:01:44 (I) nbxmpp.client | raising event from transport: :::::DATA RECEIVED::::
_____________
="
_____________
16.03.2019 15:01:44 (I) nbxmpp.transports | pollin called, state == CONNECTED
16.03.2019 15:01:44 (I) nbxmpp.idlequeue | read timeout removed for fd 700
16.03.2019 15:01:44 (I) nbxmpp.idlequeue | read timeout set for fd 700 on 55 seconds
16.03.2019 15:01:44 (I) nbxmpp.idlequeue | read timeout set for fd 700 on 120 seconds with function <bound method NonBlockingTransport.read_timeout2 of <nbxmpp.transports.NonBlockingTCP object at 0x0000000009569390>>
16.03.2019 15:01:44 (I) nbxmpp.client | raising event from transport: :::::DATA RECEIVED::::
_____________
72bfa1e8-7cfe-45ae-a9d8-bc25a6fd551b
_____________
16.03.2019 15:01:44 (I) nbxmpp.transports | pollin called, state == CONNECTED
16.03.2019 15:01:44 (I) nbxmpp.idlequeue | read timeout removed for fd 700
16.03.2019 15:01:44 (I) nbxmpp.idlequeue | read timeout set for fd 700 on 55 seconds
16.03.2019 15:01:44 (I) nbxmpp.idlequeue | read timeout set for fd 700 on 120 seconds with function <bound method NonBlockingTransport.read_timeout2 of <nbxmpp.transports.NonBlockingTCP object at 0x0000000009569390>>
16.03.2019 15:01:44 (I) nbxmpp.client | raising event from transport: :::::DATA RECEIVED::::
_____________
"
_____________
16.03.2019 15:01:44 (I) nbxmpp.transports | pollin called, state == CONNECTED
16.03.2019 15:01:44 (I) nbxmpp.idlequeue | read timeout removed for fd 700
16.03.2019 15:01:44 (I) nbxmpp.idlequeue | read timeout set for fd 700 on 55 seconds
16.03.2019 15:01:44 (I) nbxmpp.idlequeue | read timeout set for fd 700 on 120 seconds with function <bound method NonBlockingTransport.read_timeout2 of <nbxmpp.transports.NonBlockingTCP object at 0x0000000009569390>>
16.03.2019 15:01:44 (I) nbxmpp.client | raising event from transport: :::::DATA RECEIVED::::
_____________
_____________
16.03.2019 15:01:44 (I) nbxmpp.transports | pollin called, state == CONNECTED
16.03.2019 15:01:44 (I) nbxmpp.idlequeue | read timeout removed for fd 700
16.03.2019 15:01:44 (I) nbxmpp.idlequeue | read timeout set for fd 700 on 55 seconds
16.03.2019 15:01:44 (I) nbxmpp.idlequeue | read timeout set for fd 700 on 120 seconds with function <bound method NonBlockingTransport.read_timeout2 of <nbxmpp.transports.NonBlockingTCP object at 0x0000000009569390>>
16.03.2019 15:01:44 (I) nbxmpp.client | raising event from transport: :::::DATA RECEIVED::::
_____________
from
_____________
16.03.2019 15:01:44 (I) nbxmpp.transports | pollin called, state == CONNECTED
16.03.2019 15:01:44 (I) nbxmpp.idlequeue | read timeout removed for fd 700
16.03.2019 15:01:44 (I) nbxmpp.idlequeue | read timeout set for fd 700 on 55 seconds
16.03.2019 15:01:44 (I) nbxmpp.idlequeue | read timeout set for fd 700 on 120 seconds with function <bound method NonBlockingTransport.read_timeout2 of <nbxmpp.transports.NonBlockingTCP object at 0x0000000009569390>>
16.03.2019 15:01:44 (I) nbxmpp.client | raising event from transport: :::::DATA RECEIVED::::
_____________
="
_____________
16.03.2019 15:01:44 (I) nbxmpp.transports | pollin called, state == CONNECTED
16.03.2019 15:01:44 (I) nbxmpp.idlequeue | read timeout removed for fd 700
16.03.2019 15:01:44 (I) nbxmpp.idlequeue | read timeout set for fd 700 on 55 seconds
16.03.2019 15:01:44 (I) nbxmpp.idlequeue | read timeout set for fd 700 on 120 seconds with function <bound method NonBlockingTransport.read_timeout2 of <nbxmpp.transports.NonBlockingTCP object at 0x0000000009569390>>
16.03.2019 15:01:44 (I) nbxmpp.client | raising event from transport: :::::DATA RECEIVED::::
_____________
[email protected]
_____________
16.03.2019 15:01:44 (I) nbxmpp.transports | pollin called, state == CONNECTED
16.03.2019 15:01:44 (I) nbxmpp.idlequeue | read timeout removed for fd 700
16.03.2019 15:01:44 (I) nbxmpp.idlequeue | read timeout set for fd 700 on 55 seconds
16.03.2019 15:01:44 (I) nbxmpp.idlequeue | read timeout set for fd 700 on 120 seconds with function <bound method NonBlockingTransport.read_timeout2 of <nbxmpp.transports.NonBlockingTCP object at 0x0000000009569390>>
16.03.2019 15:01:44 (I) nbxmpp.client | raising event from transport: :::::DATA RECEIVED::::
_____________
"
_____________
16.03.2019 15:01:44 (I) nbxmpp.transports | pollin called, state == CONNECTED
16.03.2019 15:01:44 (I) nbxmpp.idlequeue | read timeout removed for fd 700
16.03.2019 15:01:44 (I) nbxmpp.idlequeue | read timeout set for fd 700 on 55 seconds
16.03.2019 15:01:44 (I) nbxmpp.idlequeue | read timeout set for fd 700 on 120 seconds with function <bound method NonBlockingTransport.read_timeout2 of <nbxmpp.transports.NonBlockingTCP object at 0x0000000009569390>>
16.03.2019 15:01:44 (I) nbxmpp.client | raising event from transport: :::::DATA RECEIVED::::
_____________
_____________
16.03.2019 15:01:44 (I) nbxmpp.transports | pollin called, state == CONNECTED
16.03.2019 15:01:44 (I) nbxmpp.idlequeue | read timeout removed for fd 700
16.03.2019 15:01:44 (I) nbxmpp.idlequeue | read timeout set for fd 700 on 55 seconds
16.03.2019 15:01:44 (I) nbxmpp.idlequeue | read timeout set for fd 700 on 120 seconds with function <bound method NonBlockingTransport.read_timeout2 of <nbxmpp.transports.NonBlockingTCP object at 0x0000000009569390>>
16.03.2019 15:01:44 (I) nbxmpp.client | raising event from transport: :::::DATA RECEIVED::::
_____________
to
_____________
16.03.2019 15:01:44 (I) nbxmpp.transports | pollin called, state == CONNECTED
16.03.2019 15:01:44 (I) nbxmpp.idlequeue | read timeout removed for fd 700
16.03.2019 15:01:44 (I) nbxmpp.idlequeue | read timeout set for fd 700 on 55 seconds
16.03.2019 15:01:44 (I) nbxmpp.idlequeue | read timeout set for fd 700 on 120 seconds with function <bound method NonBlockingTransport.read_timeout2 of <nbxmpp.transports.NonBlockingTCP object at 0x0000000009569390>>
16.03.2019 15:01:44 (I) nbxmpp.client | raising event from transport: :::::DATA RECEIVED::::
_____________
="
_____________
16.03.2019 15:01:44 (I) nbxmpp.transports | pollin called, state == CONNECTED
16.03.2019 15:01:44 (I) nbxmpp.idlequeue | read timeout removed for fd 700
16.03.2019 15:01:44 (I) nbxmpp.idlequeue | read timeout set for fd 700 on 55 seconds
16.03.2019 15:01:44 (I) nbxmpp.idlequeue | read timeout set for fd 700 on 120 seconds with function <bound method NonBlockingTransport.read_timeout2 of <nbxmpp.transports.NonBlockingTCP object at 0x0000000009569390>>
16.03.2019 15:01:44 (I) nbxmpp.client | raising event from transport: :::::DATA RECEIVED::::
_____________
[email protected]/gajim.4JHK9BLI
_____________
16.03.2019 15:01:44 (I) nbxmpp.transports | pollin called, state == CONNECTED
16.03.2019 15:01:44 (I) nbxmpp.idlequeue | read timeout removed for fd 700
16.03.2019 15:01:44 (I) nbxmpp.idlequeue | read timeout set for fd 700 on 55 seconds
16.03.2019 15:01:44 (I) nbxmpp.idlequeue | read timeout set for fd 700 on 120 seconds with function <bound method NonBlockingTransport.read_timeout2 of <nbxmpp.transports.NonBlockingTCP object at 0x0000000009569390>>
16.03.2019 15:01:44 (I) nbxmpp.client | raising event from transport: :::::DATA RECEIVED::::
_____________
"
_____________
After a while of running server with about 3 testing users, one user get stuck in online state, even if there was no client connected to that user. Server stop sending pings, so the user cannot even timeout and disconnect. Incoming messages to this stucked user was treated by server as if it was online, yet no pings were sent.
This stucked user never disconnect. When client loged in to this stucked user, it can send the messages, but was unable to receive new messages (only OTR session control messages). It is difficult to spot this issue by users, as delivery reports working and showing that message was received even when it is not !
From this point, there was no help, not even logout and login again, remove user from contact and authorize it back again from both sides.
There is only fix when this happens to restart the server. Nothing clients can do about this stucked user
Parsing a JID with an empty resourcepart does not fail as expected:
_, err := jid.NewWithString("[email protected]/", false)
if err == nil { panic("oops") }
Empty resourceparts are illegal according to RFC7622 ยง 3.4. Resourcepart:
The resourcepart of a JID MUST NOT be zero octets in length and MUST
NOT be more than 1023 octets in length. This rule is to be enforced
after any normalization and mapping of code points as well as
encoding of the string as UTF-8.
I tried to register a new user "root" on my host "jackal1.security-enforced.de" via the Conversations Android app. Registration failed with this error message:
2018-03-30 17:27:41 โน๏ธ [INF] c2s:121 - registered stream... (id: jackal1.security-enforced.de:11)
2018-03-30 17:27:42 ๐ [DBG] stream:871 - RECV: <stream:stream version="1.0" xml:lang="en" xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" to="jackal1.security-enforced.de"/>
2018-03-30 17:27:42 ๐ [DBG] stream:866 - SEND: <stream:features xmlns:stream="http://etherx.jabber.org/streams" version="1.0"><starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"><required/></starttls></stream:features>
2018-03-30 17:27:42 ๐ [DBG] stream:871 - RECV: <starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"/>
2018-03-30 17:27:42 ๐ [DBG] stream:866 - SEND: <proceed xmlns="urn:ietf:params:xml:ns:xmpp-tls"/>
2018-03-30 17:27:42 โน๏ธ [INF] stream:524 - secured stream... id: jackal1.security-enforced.de:11
2018-03-30 17:27:42 ๐ [DBG] stream:871 - RECV: <stream:stream version="1.0" xml:lang="en" xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" to="jackal1.security-enforced.de"/>
2018-03-30 17:27:42 ๐ [DBG] stream:866 - SEND: <stream:features xmlns:stream="http://etherx.jabber.org/streams" version="1.0"><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>PLAIN</mechanism><mechanism>DIGEST-MD5</mechanism><mechanism>SCRAM-SHA-1</mechanism><mechanism>SCRAM-SHA-1-PLUS</mechanism><mechanism>SCRAM-SHA-256</mechanism><mechanism>SCRAM-SHA-256-PLUS</mechanism></mechanisms><register xmlns="http://jabber.org/features/iq-register"/></stream:features>
2018-03-30 17:27:42 ๐ [DBG] stream:871 - RECV: <iq type="get" id="AJ_X1mDV_3-N" to="jackal1.security-enforced.de"><query xmlns="jabber:iq:register"/></iq>
2018-03-30 17:27:42 ๐ [DBG] stream:866 - SEND: <iq type="result" id="AJ_X1mDV_3-N" from="jackal1.security-enforced.de" to="jackal1.security-enforced.de"><query xmlns="jabber:iq:register"><username/><password/></query></iq>
2018-03-30 17:27:42 ๐ [DBG] stream:871 - RECV: <iq type="set" id="rMx6g_wnzH8J" from="[email protected]"><query xmlns="jabber:iq:register"><username>root2</username><password>pass</password></query></iq>
2018-03-30 17:27:42 ๐ [DBG] stream:866 - SEND: <stream:error><invalid-from xmlns="urn:ietf:params:xml:ns:xmpp-streams"/></stream:error>
2018-03-30 17:27:42 โน๏ธ [INF] c2s:151 - unregistered stream... (id: jackal1.security-enforced.de:11)
Jackal seems to check the "from" which says "root@..." ... but because this user does not exist (yet) the stanza is declared invalid.
In-Band registration via Pidgin works fine.
Implement postgres storage backend.
when you send some malformed xml to your buddy, the server disconnect your buddy.
this is example of what you need to send to get your buddy disconected:
<test>test
Hi there,
I've been thinking about building an XMPP server in go for a while, and I just found yours. I haven't looked at the code yet (will do soon) but it looks good and active, so I was wondering if you have reached a point on the project where pull requests are welcome (API is more or less consolidated, etc).
Currently I'm really interested in PEP, as it is a hard requirement for OMEMO which is a feature I'd need for my XMPP service. What do you think? Can I give it a try? If you think it's worth it, I could use a few lines explaining the project structure, like if it is module-based, if there are hooks, and where should I place the PEP-related code.
Regards and thanks for your time!
When the server starts up and wrong permissions do not allow Jackal to access certificate and key, this happens:
2018-05-08 13:08:04 โน๏ธ [INF] main:99 - jackal 0.2.0
2018-05-08 13:08:04 โน๏ธ [INF] server:92 - default: listening at 0.0.0.0:5222 [transport: socket]
2018-05-08 13:08:13 โน๏ธ [INF] c2s:141 - registered stream... (id: default:1)
2018-05-08 13:08:13 ๐ [DBG] c2s_stream:889 - RECV: <stream:stream to="localhost" version="1.0" xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams"/>
2018-05-08 13:08:13 ๐ [DBG] c2s_stream:937 - SEND: <?xml version="1.0"?><stream:stream xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams" id="0cd01d9e-f756-4f05-9231-2b576113db77" from="jackal.local" version="1.0">
2018-05-08 13:08:13 ๐ [DBG] c2s_stream:883 - SEND: <stream:error><host-unknown xmlns="urn:ietf:params:xml:ns:xmpp-streams"/></stream:error>
2018-05-08 13:08:13 โน๏ธ [INF] c2s:171 - unregistered stream... (id: default:1)
2018-05-08 13:08:20 โน๏ธ [INF] c2s:141 - registered stream... (id: default:2)
2018-05-08 13:08:20 ๐ [DBG] c2s_stream:889 - RECV: <stream:stream to="jackal.local" xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams" version="1.0"/>
2018-05-08 13:08:20 ๐ [DBG] c2s_stream:937 - SEND: <?xml version="1.0"?><stream:stream xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams" id="540748f0-628e-486e-8999-1aa8844c4eab" from="jackal.local" version="1.0">
2018-05-08 13:08:20 ๐ [DBG] c2s_stream:883 - SEND: <stream:features xmlns:stream="http://etherx.jabber.org/streams" version="1.0"><starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"><required/></starttls></stream:features>
2018-05-08 13:08:20 ๐ [DBG] c2s_stream:889 - RECV: <starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"/>
2018-05-08 13:08:20 ๐ฅ [ERR] c2s_stream:516 - open /etc/jackal/jackal.local.key: permission denied
2018-05-08 13:08:20 ๐ [DBG] c2s_stream:883 - SEND: <failure xmlns="urn:ietf:params:xml:ns:xmpp-tls"/>
Maybe it's better to check permissions and validity of the certificates in a more early state, so Jackal can fail and return a error code immediately after startup. This would be more admin friendly ;-)
Please add support of XEP-0443: XMPP Compliance Suites 2021: https://xmpp.org/extensions/xep-0443.html
Which replaces:
I do not have an explanation yet, but pings from Pidgin to Jackal seem to fail:
2018-03-30 17:34:19 ๐ [DBG] stream:871 - RECV: <iq type="get" id="purpleba33a79"><ping xmlns="urn:xmpp:ping"/></iq>
2018-03-30 17:34:19 ๐ [DBG] stream:866 - SEND: <iq type="error" id="purpleba33a79" to="jackal1.security-enforced.de" from="[email protected]/test"><ping xmlns="urn:xmpp:ping"/><error code="403" type="auth"><forbidden xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/></error></iq>
The [email protected] account was also created via Pidgin / In-band registration. Client connection to the server is fine - authentication was successful.
While implementing XEP-0198 please design it in a way it would support both c2s and s2s [1].
[1] XEP-0198 s2s
processone/ejabberd#1969
See https://blog.golang.org/go-brand
๐
xml/jid.go:13:24: fatal error: stringprep.h: No such file or directory
Implement external gateway auth mechanism via HTTP.
Hi,
does it support audio and video?
rfc6121 (which obsoletes rfc3921) no longer requires session to be explicitly established by the client:
From rfc6121:
Interoperability Note: [RFC3921] specified one additional precondition: formal establishment of an instant messaging and presence session. Implementation and deployment experience has shown that this additional step is unnecessary. However, for backward compatibility an implementation MAY still offer that feature. This enables older software to connect while letting newer software save a round trip.
jackal still requires the session to be explicitly open.
Implement autoTLS via Let's Encrypt.
Split Storage in smaller interfaces.
I have seen a beautiful logo but the XMPP logo has been updated last year, can you update it too?
https://github.com/ortuman/jackal/blob/master/doc/gopher.png
Source: https://commons.wikimedia.org/wiki/File:XMPP_logo.svg
This was spotted on Xabber client, when two buddies communicate. From certain point only one of them is able to send the messages , the other one is getting error and cannot send any more message. Subscription is both,both in the DB.
Still cannot reproduce what possibly could cause this issue.
After the server has been running for some time, there is a client connection again. The message is somehow lost in the process of shaking hands
go get github.com/ortuman/jackal
# github.com/ortuman/jackal/xml
go/src/github.com/ortuman/jackal/xml/jid.go:13:10: fatal error: 'stringprep.h' file not found
#include "stringprep.h"
^~~~~~~~~~~~~~
1 error generated.
It is not listed in the README so I assume it is not implemented.
PEP is required by OMEMO, so it is essential for any modern XMPP server.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.