Comments (13)
colloquy is an external module, not part of znc. Sorry.
Also, no idea why connect() fails with EINVAL here. Connecting to colloquy.mobi:7906 should work fine. That address doesn't even have an AAAA record. :-/
from znc.
I don't know how things are glued together, or how colloquy uses Csocket.cpp, but the error-message deviates from Csocket.cpp, which would suggest the error being in Csocket.cpp? Anyhow, that's why I reported the issue here.
from znc.
Csocket is the socket abstraction used by znc. Technically, that's yet another seperate project. ;-)
Does this happen for everyone or just for you? Anyone bored enough to strace znc and figure out what the evil arguments to znc were? (strace -e connect znc --foreground --debug; then make it fail connect to colloquy.mobi)
from znc.
Connecting to [colloquy.mobi:7906] to send...
----------------------------------------------------------------------------
{"device-token":"*snip*","message":"test","sender":"roflmao","badge": 1,"connection":"*snip*","server":"Freenode","sound":"Stoof.aiff"}
----------------------------------------------------------------------------
connect(9, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("10.10.101.220")}, 16) = 0
connect(8, {sa_family=AF_INET, sin_port=htons(0), sin_addr=inet_addr("174.121.1.253")}, 16) = -1 EINVAL (Invalid argument)
Csocket.cpp:882 Connect Failed. ERRNO [22] FD [8]
MOD::C::colloquy::freenode == SockError(Invalid argument)
174.121.1.253 is colloquy.mobi. It seems as it uses port 0 as it's destination, which should be 7906? (sin_port=htons(0)
should be sin_port=htons(7906)
, yes?).
from znc.
Okay, so I guess this discussion can be moved over to the colloquy-module itself.
from znc.
Fixed:
commit 88e7f09
Author: Uli Schlachter [email protected]
Date: Sun Jun 26 12:11:40 2011 +0200
Update to latest Csocket
Fixes:
- A possible crash bug for empty DNS replies with c-ares. E.g. a AAAA lookup for
google.com doesn't give any reply but is still successful. This might be a
c-ares bug (there is ARES_ENODATA) or c-ares just changed its behavior?
(No bug report, just noticed accidentally)
- Connecting to ipv4-only hosts with a v6 bindhost caused weird errors:
https://github.com/znc/znc/issues/47
- There was a pull request for some DSA server certificate thingy:
https://github.com/znc/znc/pull/46
- Busy loop waiting for an SSL handshake to finish:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=631590
- Some other stuff? No idea what some of the changes in here are actually doing.
Signed-off-by: Uli Schlachter <[email protected]>
from znc.
Great! Thanks!
\o/
from znc.
So, the issue is still not resolved.
Connecting to [colloquy.mobi:7906] to send...
----------------------------------------------------------------------------
{"device-token":"*snip*","message":"test","sender":"roflmao","badge": 1,"connection":"*snip*","server":"Freenode","sound":"Stoof.aiff"}
----------------------------------------------------------------------------
connect(12, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("10.10.101.222")}, 16) = 0
connect(11, {sa_family=AF_INET, sin_port=htons(7906), sin_addr=inet_addr("174.121.1.253")}, 16) = -1 EINVAL (Invalid argument)
Csocket.cpp:886 Connect Failed. ERRNO [22] FD [11]
MOD::C::colloquy::freenode == SockError(Invalid argument)
I actually did some tests yesterday, where I had basically done the same change as this commit (setting both IPv4-port and IPv6-port), and it failed the same way. During the tests yesterday, I also had the added debug-part;
Connecting to [colloquy.mobi:7906] to send...
----------------------------------------------------------------------------
{"device-token":"*snip*","message":"test","sender":"roflmao","badge": 1,"connection":"*snip*","server":"Freenode","sound":"Stoof.aiff"}
----------------------------------------------------------------------------
Csocket.h:208 Setting IPv4-port to 0
Csocket.cpp:61 Setting v6 from 0 to 1 due to: Csock::getaddrinfo, got an IPv6
./znc[0x519eae]
./znc[0x519f0c]
./znc(_ZN5Csock11GetAddrInfoERK7CStringR10CSSockAddr+0x7b)[0x521cd7]
./znc(_ZN5Csock9DNSLookupENS_9EDNSLTypeE+0xbb)[0x5220a9]
./znc(_ZN14TSocketManagerI8CZNCSockE4LoopEv+0x9e)[0x54b10c]
./znc(_ZN14TSocketManagerI8CZNCSockE17DynamicSelectLoopEmml+0xde)[0x546088]
./znc(_ZN4CZNC4LoopEv+0x307)[0x52b9d3]
./znc(main+0x11b2)[0x506fc1]
/lib/libc.so.6(__libc_start_main+0xfd)[0x7f1fb5ac1c4d]
./znc[0x505429]
Csocket.h:204 Setting IPv6-port to 7906
Csocket.h:208 Setting IPv4-port to 7906
connect(12, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("10.10.101.222")}, 16) = 0
Csocket.cpp:61 Setting v6 from 1 to 0 due to: dns callback
./znc[0x519eae]
./znc[0x519f0c]
./znc[0x51a104]
/usr/lib/libcares.so.2(+0x3aa1)[0x7f1fb6ba9aa1]
/usr/lib/libcares.so.2(+0x3f75)[0x7f1fb6ba9f75]
/usr/lib/libcares.so.2(+0xaf27)[0x7f1fb6bb0f27]
/usr/lib/libcares.so.2(+0xb0cb)[0x7f1fb6bb10cb]
/usr/lib/libcares.so.2(+0xad33)[0x7f1fb6bb0d33]
/usr/lib/libcares.so.2(+0x97f0)[0x7f1fb6baf7f0]
/usr/lib/libcares.so.2(+0xa475)[0x7f1fb6bb0475]
/usr/lib/libcares.so.2(+0xa6d8)[0x7f1fb6bb06d8]
/usr/lib/libcares.so.2(+0xa974)[0x7f1fb6bb0974]
./znc(_ZN14TSocketManagerI8CZNCSockE6SelectERNSt7__debug3mapIPS0_NS1_9EMessagesESt4lessIS4_ESaISt4pairIKS4_S5_EEEE+0xa4a)[0x550de4]
./znc(_ZN14TSocketManagerI8CZNCSockE4LoopEv+0x489)[0x54b4f7]
./znc(_ZN14TSocketManagerI8CZNCSockE17DynamicSelectLoopEmml+0xde)[0x546088]
./znc(_ZN4CZNC4LoopEv+0x307)[0x52b9d3]
./znc(main+0x11b2)[0x506fc1]
/lib/libc.so.6(__libc_start_main+0xfd)[0x7f1fb5ac1c4d]
./znc[0x505429]
connect(11, {sa_family=AF_INET, sin_port=htons(7906), sin_addr=inet_addr("174.121.1.253")}, 16) = -1 EINVAL (Invalid argument)
Csocket.cpp:900 Connect Failed. ERRNO [22] FD [11]
MOD::C::colloquy::freenode == SockError(Invalid argument)
from znc.
And just so it's been mentioned; I have a ZNC-user connecting to Bitlbee via IPv4 (so no IPv6 bindhost), and Colloquy-push works just fine on this one.
from znc.
I don't mean to nag or anything, but this was never fixed. The issue is still present, as can be seen in my above post.
from znc.
Argh, the bug that was fixed was the port number which was set to 0. The bug which is left is a duplicate of issue #37. Sorry 'bout that.
from znc.
Since this is a duplicate of #37, 717d059 should close this.
from znc.
Hi,
Seems like I don't have permission to re-open this issue. Can someone else do it?
Nevertheless, this issue is not resolved. If you have a v6-only bindhost, Csocket fails to make a connection to a v4-only host).
[2012-05-06 03:04:36.284917] Connecting to [colloquy.mobi:7906] to send...
[2012-05-06 03:04:36.284989] ----------------------------------------------------------------------------
[2012-05-06 03:04:36.285036] {"device-token":"<snip>","message":"testing","sender":"<nick>","badge": 1,"connection":"<snip>","server":"Freenode","sound":"Stoof.aiff"}
[2012-05-06 03:04:36.285084] ----------------------------------------------------------------------------
[2012-05-06 03:04:36.285142] TDNS: initiating resolving of [colloquy.mobi] and bindhost [<IPv6-address>]
[2012-05-06 03:04:36.307553] MOD::C::colloquy::freenode, dns resolving error: Address family of bindhost doesn't match address family of server
[2012-05-06 03:04:36.307624] MOD::C::colloquy::freenode == SockError(Address family of bindhost doesn't match address family of server, Unknown error 18446744073709551615)
I know the error is "logical" in the sense that it's a v6-only bindhost trying to connect to a v4-only host. However, such a connection like this, shouldn't really rely on whatever settings the bindhost has, in my opinion. The system has a usable v4 address, so it should be able to use this, even though it only has a v6-bindhost.
Could one add some kind of option to allow it to use whatever IPv4 bindhost available, even if it's using a v6-only bindhost? Maybe even do something like this by default? Similar the other way around (if using v4-only bindhost, and trying to connect to v6-only host). Maybe like a 'primary v4 and v6 address' that it could fallback to, in case any failures like the above?
from znc.
Related Issues (20)
- Crypt Module - IRC Clients that do not keep "sent" text and instead read the IRC response will not display properly HOT 2
- Problem with znc HOT 3
- Problem with rejoin after kick
- znc+fish won't encrypt own messages
- Add OpenID Connect support HOT 3
- Add some way to bypass channel mode cache (or just remove it) HOT 6
- Feature request: ability to disable the "The channel could not be joined, disabling it" behavior HOT 1
- Client connecton stalled after CAP ACK HOT 3
- Portainer Add Template > ZNC - no login
- Add Security Headers to webadmin HOT 5
- Cannot load python modules via webadmin w/ Debian 12/Python 3.11.x/znc-1.9.x HOT 2
- can't remove some channels from chansaver HOT 5
- Reconnecting too fast HOT 6
- Missing `RPL_TOPICWHOTIME` from server results in incorrect `RPL_TOPICWHOTIME` sent to client
- Update the Copyright notice
- Perform /timer unknown command HOT 3
- Watch module ZNC HOT 7
- Missing : in PASS command
- Likely race condition in build system related to `generated.tar.gz` HOT 3
- identd and identfile doeset works HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from znc.