I have bindhost which has an IPv6 and an IPv4 address, when I connect to an IPv6 IRC server ZNC connects fine, when I connect to an IPv4 server I get
[08:43] <_status> Attempting to connect to [1.2.3.4 6667] ...
[08:43] <_status> Cannot connect to IRC (Invalid argument). Retrying...
If I run ZNC in debug mode I see the following
User [user] is connecting to [1.2.3.4 6667] ...
Csocket.cpp:880 Connect Failed. ERRNO [22] FD [6]
IRC::user == SockError(22 Invalid argument)
Is this something that can be fixed?
Work around for now is to create a bindhost which is the IPv4 address of which ZNC will use to connect from.
Regards
Hi
I have bindhost which has an IPv6 and an IPv4 address, when I connect to an IPv6 IRC server ZNC connects fine, when I connect to an IPv4 server I get
[08:43] <_status> Attempting to connect to [1.2.3.4 6667] ...
[08:43] <_status> Cannot connect to IRC (Invalid argument). Retrying...
If I run ZNC in debug mode I see the following
User [user] is connecting to [1.2.3.4 6667] ...
Csocket.cpp:880 Connect Failed. ERRNO [22] FD [6]
IRC::user == SockError(22 Invalid argument)
Is this something that can be fixed?
Work around for now is to create a bindhost which is the IPv4 address of which ZNC will use to connect from.
Regards
<!-- github-sync-id:749596 -->
ZNC first resolves your bind host. If that results in an IPv6 address, it will use IPv6. If it gets an IPv4 address, it will use IPv4 for the connection to the target.
So this results in ZNC trying to connect to a IPv4 address with an IPv6 bindhost which isn't going to work.
ZNC first resolves your bind host. If that results in an IPv6 address, it will use IPv6. If it gets an IPv4 address, it will use IPv4 for the connection to the target.
So this results in ZNC trying to connect to a IPv4 address with an IPv6 bindhost which isn't going to work.
<!-- github-comment-id:979687 -->
It would make sense to fix csocket.
It should support bindhosts with both ipv4 and ipv6 ips, and in case of ipvX-only remote host choose appropriate family.
It would make sense to fix csocket.
It should support bindhosts with both ipv4 and ipv6 ips, and in case of ipvX-only remote host choose appropriate family.
<!-- github-comment-id:979839 -->
psychon, I did gather that, my point is more that it should see that the bindhost has 2 IP address, one is IPv6 and the is IPv4 and it should use the in the same address family as the server is connecting to.
When I first came across this I spent ages looking at it, since the error message is "Invalid argument" I thought I had entered in something wrong or something was odd was going on with server.
This problem is going show up more are more as the IPv4 address space runs out and people go for dual stacked IPv6 and IPv4 systems and put the both IPv6 and IPv4 address to one domain name or bindhost in the case of ZNC.
This should be fixed and done properly instead of just closing the issue.
psychon, I did gather that, my point is more that it should see that the bindhost has 2 IP address, one is IPv6 and the is IPv4 and it should use the in the same address family as the server is connecting to.
When I first came across this I spent ages looking at it, since the error message is "Invalid argument" I thought I had entered in something wrong or something was odd was going on with server.
This problem is going show up more are more as the IPv4 address space runs out and people go for dual stacked IPv6 and IPv4 systems and put the both IPv6 and IPv4 address to one domain name or bindhost in the case of ZNC.
This should be fixed and done properly instead of just closing the issue.
<!-- github-comment-id:992199 -->
Hehe. Thanks.
I looked over CSocket earlier and I noticed that some things could be improved. So do you have someone working on this or should I go ahead? I've got too much time on my hands :D
Hehe. Thanks.
I looked over CSocket earlier and I noticed that some things could be improved. So do you have someone working on this or should I go ahead? I've got too much time on my hands :D
<!-- github-comment-id:1356794 -->
Feel free to work on it. Imaginos (can be found on IRC, timezone is sth like GMT-9) is the Csocket author / maintainer, we just pull his version of Csocket.cc and Csocket.h
Feel free to work on it. Imaginos (can be found on IRC, timezone is sth like GMT-9) is the Csocket author / maintainer, we just pull his version of Csocket.cc and Csocket.h
<!-- github-comment-id:1357388 -->
#47 is a duplicate of this. (Colloquy module wants to send a push to colloquy.mobi (only has an A record), but bindhost is a v6 address)
#47 is a duplicate of this. (Colloquy module wants to send a push to colloquy.mobi (only has an A record), but bindhost is a v6 address)
<!-- github-comment-id:2040507 -->
I wanted to connect to irc.nerv.fi +6697 - but with BindHost to my host it was wrote: <*status> Cannot connect to IRC (Invalid argument). Retrying...
Removing the BindHost entry will immediately allow me to log in.
How can I get the full error message without debug mode? The "Invalid argument" is nothing... - this message should be fixed too!
This bug is still exists for me with version:
```
<*status> ZNC 1.4 - http://znc.in
<*status> IPv6: yes, SSL: yes, DNS: threads
```
I wanted to connect to irc.nerv.fi +6697 - but with BindHost to my host it was wrote:
`<*status> Cannot connect to IRC (Invalid argument). Retrying...`
Removing the BindHost entry will immediately allow me to log in.
How can I get the full error message without debug mode? The "Invalid argument" is nothing... - this message should be fixed too!
<!-- github-comment-id:59619120 -->
I wanted to connect to irc.nerv.fi +6697 - but with BindHost to my host
it was wrote:
<*status> Cannot connect to IRC (Invalid argument). Retrying...
Removing the BindHost entry will immediately allow me to log in.
How can I get the full error message without debug mode? The "Invalid
argument" is nothing... - this message should be fixed too!
So what was your bindhost? "localhost"?
irc.nerv.fi resolves to both v4 and v6.
2014-10-18 16:46 GMT+01:00 B. Roland notifications@github.com:
> This bug is still exists for me with version:
>
> <_status> ZNC 1.4 - http://znc.in
> <_status> IPv6: yes, SSL: yes, DNS: threads
>
> I wanted to connect to irc.nerv.fi +6697 - but with BindHost to my host
> it was wrote:
> <*status> Cannot connect to IRC (Invalid argument). Retrying...
> Removing the BindHost entry will immediately allow me to log in.
>
> How can I get the full error message without debug mode? The "Invalid
> argument" is nothing... - this message should be fixed too!
>
> —
> Reply to this email directly or view it on GitHub
> https://github.com/znc/znc/issues/37#issuecomment-59619120.
<!-- github-comment-id:59620592 -->
On your machine (where ZNC runs) it resolves to 94.229.34.11?
2014-10-18 17:30 GMT+01:00 B. Roland notifications@github.com:
> my host was it: "server1.ennet.sk" - now it is using my IP.
>
> —
> Reply to this email directly or view it on GitHub
> https://github.com/znc/znc/issues/37#issuecomment-59620631.
<!-- github-comment-id:59620744 -->
2014-10-18 18:17 GMT+01:00 B. Roland notifications@github.com:
using bindhost [127.0.1.1]
Fix your /etc/resolv.conf, you can't connect to external server using
localhost as bindhost.
2014-10-18 18:17 GMT+01:00 B. Roland notifications@github.com:
> using bindhost [127.0.1.1]
Fix your /etc/resolv.conf, you can't connect to external server using
localhost as bindhost.
<!-- github-comment-id:59622430 -->
Disconnected from IRC (Server address is IPv6-only, but bindhost is IPv4-only). Reconnecting...
How I fix this ?
I am having save problem
Disconnected from IRC (Server address is IPv6-only, but bindhost is IPv4-only). Reconnecting...
How I fix this ?
<!-- github-comment-id:267100904 -->
@fahadmehar try clearing your bindhost, /msg *status setuserbindhost or /msg *status setbindhost. If that doesn't help, give more details such as /msg *status version and output from znc -D showing the error.
@fahadmehar try clearing your bindhost, `/msg *status setuserbindhost` or `/msg *status setbindhost`. If that doesn't help, give more details such as `/msg *status version` and output from `znc -D` showing the error.
Related: https://github.com/znc/znc/issues/241 as thanks to it people set 0.0.0.0 as bindhost.
<!-- github-comment-id:267290756 -->
<*status> Disconnected from IRC (Server address is IPv6-only, but bindhost is IPv4-only). Reconnecting...
How I fix this '?
<*status> Disconnected from IRC (Server address is IPv6-only, but bindhost is IPv4-only). Reconnecting...
<!-- github-comment-id:267371596 -->
What server are you trying to connect to? Try something that also has an IPv4 address (dunno, some freenode server?)
What server are you trying to connect to? Try something that also has an IPv4 address (dunno, some freenode server?)
<!-- github-comment-id:267374334 -->
Try 194.68.45.50 or 91.217.189.35 or 154.35.175.101 or 194.14.236.50 as server (random dalnet servers; however, I cannot find one with an IPv6-address; what server did you give ZNC to connect to?)
Try 194.68.45.50 or 91.217.189.35 or 154.35.175.101 or 194.14.236.50 as server (random dalnet servers; however, I cannot find one with an IPv6-address; what server did you give ZNC to connect to?)
<!-- github-comment-id:267375027 -->
Pardon me, but my psychic abilities are having a bad day: Who is "they" and what exactly do "they" say? Any more specific error message from ZNC?
Why do you even still have a bindhost after /msg *status clearbindhost? That should unset any bindhost.
Pardon me, but my psychic abilities are having a bad day: Who is "they" and what exactly do "they" say? Any more specific error message from ZNC?
Why do you even still have a bindhost after `/msg *status clearbindhost`? That should unset any bindhost.
<!-- github-comment-id:267377324 -->
Man, I want to use my VHOST which I set from www.freedns.afraid.org. On IPv6 Address. But when I set the BindHost I get this message
Man, I want to use my VHOST which I set from www.freedns.afraid.org. On IPv6 Address. But when I set the BindHost I get this message
<!-- github-comment-id:267378134 -->
Uhm. That sounds more like ZNC's message is mixed up (is it?) and you are having an IPv6-bindhost, but DALnet does not have any IPv6 servers.
In that case, try /znc addserver ipv6.dal.net (or /znc addserver 2001:550:101:a::2 and /znc addserver 2a00:1a28:1100:4::a)
Uhm. That sounds more like ZNC's message is mixed up (is it?) and you are having an IPv6-bindhost, but DALnet does not have any IPv6 servers.
In that case, try `/znc addserver ipv6.dal.net` (or `/znc addserver 2001:550:101:a::2` and `/znc addserver 2a00:1a28:1100:4::a`)
<!-- github-comment-id:267545236 -->
DALnet allow Ipv6 and on my ZNC panal i have put ipv6.dal.net server...
[Edit] [Del] DALnet 1 ipv6.dal.net:+6697 Fahad
Now what ? shall i add this also /znc addserver 2001:550:101:a::2
DALnet allow Ipv6 and on my ZNC panal i have put ipv6.dal.net server...
[Edit] [Del] DALnet 1 ipv6.dal.net:+6697 Fahad
Now what ? shall i add this also /znc addserver 2001:550:101:a::2
<!-- github-comment-id:267582165 -->
Disconnected from IRC (Server address is IPv6-only, but bindhost is IPv4-only). Reconnecting...
and it says my bindhost is ipv4 only
Disconnected from IRC (Server address is IPv6-only, but bindhost is IPv4-only). Reconnecting...
<!-- github-comment-id:267584959 -->
Disconnected from IRC (Server address is IPv6-only, but bindhost is IPv4-only). Reconnecting...
But didn't you say that your bindhost is an IPv6 address?
Here:
Man, I want to use my VHOST which I set from www.freedns.afraid.org. On IPv6 Address. But when I set the BindHost I get this message
I'm confused by your setup. And the use of "VHOST" confuses me further.
Can you tell me what you set up with freedns? (Which IP, which DNS name)
I think that you cannot use this to get a vhost...
> and it says my bindhost is ipv4 only
>
> Disconnected from IRC (Server address is IPv6-only, but bindhost is IPv4-only). Reconnecting...
But didn't you say that your bindhost is an IPv6 address?
Here:
> Man, I want to use my VHOST which I set from www.freedns.afraid.org. On IPv6 Address. But when I set the BindHost I get this message
I'm confused by your setup. And the use of "VHOST" confuses me further.
Can you tell me what you set up with freedns? (Which IP, which DNS name)
I think that you cannot use this to get a vhost...
<!-- github-comment-id:267585799 -->
@psychon OK I can explain... I purchase VPS ok and I setup my ZNC and after setting up my ZNC i try to set Vhost for ZNC which i did from www.freedns.afraid.org. I put my IPV6 ip and set my VHost i try to put that vhost on znc. I get this message...
@psychon OK I can explain... I purchase VPS ok and I setup my ZNC and after setting up my ZNC i try to set Vhost for ZNC which i did from www.freedns.afraid.org. I put my IPV6 ip and set my VHost i try to put that vhost on znc. I get this message...
<!-- github-comment-id:267587719 -->
The BindHost in ZNC just selects the IP address that ZNC connects from. If you only have a single IP address, the BindHost option doesn't have any effect.
Since you mention VHost: When the IRC server sees an incoming connection, it only sees your IP address. It then looks up the PTR record of that IP address to get a domain. Then it resolves that domain into an IP address. If the result matches the IP address of the incoming connection, the domain is used for display purposes instead of the IP address.
So, just setting up a new DNS record with freedns does not help, because you also need the PTR DNS record of the IP address (which you cannot control in most cases).
All of the above is why the option in znc is called BindHost and not VHost.
The BindHost in ZNC just selects the IP address that ZNC connects from. If you only have a single IP address, the BindHost option doesn't have any effect.
Since you mention VHost: When the IRC server sees an incoming connection, it only sees your IP address. It then looks up the PTR record of that IP address to get a domain. Then it resolves that domain into an IP address. If the result matches the IP address of the incoming connection, the domain is used for display purposes instead of the IP address.
So, just setting up a new DNS record with freedns does not help, because you also need the PTR DNS record of the IP address (which you cannot control in most cases).
All of the above is why the option in znc is called BindHost and not VHost.
<!-- github-comment-id:267598547 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Hi
I have bindhost which has an IPv6 and an IPv4 address, when I connect to an IPv6 IRC server ZNC connects fine, when I connect to an IPv4 server I get
[08:43] <_status> Attempting to connect to [1.2.3.4 6667] ...
[08:43] <_status> Cannot connect to IRC (Invalid argument). Retrying...
If I run ZNC in debug mode I see the following
User [user] is connecting to [1.2.3.4 6667] ...
Csocket.cpp:880 Connect Failed. ERRNO [22] FD [6]
IRC::user == SockError(22 Invalid argument)
Is this something that can be fixed?
Work around for now is to create a bindhost which is the IPv4 address of which ZNC will use to connect from.
Regards
ZNC first resolves your bind host. If that results in an IPv6 address, it will use IPv6. If it gets an IPv4 address, it will use IPv4 for the connection to the target.
So this results in ZNC trying to connect to a IPv4 address with an IPv6 bindhost which isn't going to work.
It would make sense to fix csocket.
It should support bindhosts with both ipv4 and ipv6 ips, and in case of ipvX-only remote host choose appropriate family.
psychon, I did gather that, my point is more that it should see that the bindhost has 2 IP address, one is IPv6 and the is IPv4 and it should use the in the same address family as the server is connecting to.
When I first came across this I spent ages looking at it, since the error message is "Invalid argument" I thought I had entered in something wrong or something was odd was going on with server.
This problem is going show up more are more as the IPv4 address space runs out and people go for dual stacked IPv6 and IPv4 systems and put the both IPv6 and IPv4 address to one domain name or bindhost in the case of ZNC.
This should be fixed and done properly instead of just closing the issue.
Is anyone working on this? I could perhaps do it.
dxtr, welcome! ;)
Hehe. Thanks.
I looked over CSocket earlier and I noticed that some things could be improved. So do you have someone working on this or should I go ahead? I've got too much time on my hands :D
Feel free to work on it. Imaginos (can be found on IRC, timezone is sth like GMT-9) is the Csocket author / maintainer, we just pull his version of Csocket.cc and Csocket.h
#47 is a duplicate of this. (Colloquy module wants to send a push to colloquy.mobi (only has an A record), but bindhost is a v6 address)
This should be fixed since
717d0596e3. If you still have this issue please re-open.This bug is still exists for me with version:
I wanted to connect to irc.nerv.fi +6697 - but with BindHost to my host it was wrote:
<*status> Cannot connect to IRC (Invalid argument). Retrying...Removing the BindHost entry will immediately allow me to log in.
How can I get the full error message without debug mode? The "Invalid argument" is nothing... - this message should be fixed too!
So what was your bindhost? "localhost"?
irc.nerv.fi resolves to both v4 and v6.
2014-10-18 16:46 GMT+01:00 B. Roland notifications@github.com:
my host was it: "server1.ennet.sk" - now it is using my IP (no BindHost).
On your machine (where ZNC runs) it resolves to 94.229.34.11?
2014-10-18 17:30 GMT+01:00 B. Roland notifications@github.com:
Yep:
May you run znc -D and paste relevant lines from it (with the bindhost set)?
2014-10-18 17:35 GMT+01:00 B. Roland notifications@github.com:
I've found these line, while the global BindHost was "server1.ennet.sk"
2014-10-18 18:17 GMT+01:00 B. Roland notifications@github.com:
Fix your /etc/resolv.conf, you can't connect to external server using
localhost as bindhost.
I am having save problem
Disconnected from IRC (Server address is IPv6-only, but bindhost is IPv4-only). Reconnecting...
How I fix this ?
@fahadmehar try clearing your bindhost,
/msg *status setuserbindhostor/msg *status setbindhost. If that doesn't help, give more details such as/msg *status versionand output fromznc -Dshowing the error.Related: https://github.com/znc/znc/issues/241 as thanks to it people set 0.0.0.0 as bindhost.
It's
/msg *status clearbindhost. 0.0.0.0 shouldn't be needed anymore.This is my Ver
<*status> ZNC 1.6.4 - http://znc.in
<*status> IPv6: yes, SSL: yes, DNS: threads, charset: no
Please I really want to set VHost,
How I fix this '?
<*status> Disconnected from IRC (Server address is IPv6-only, but bindhost is IPv4-only). Reconnecting...
I clear my binhost so many times even with soap its not working...
What server are you trying to connect to? Try something that also has an IPv4 address (dunno, some freenode server?)
ON DALnet Server @psychon
Try 194.68.45.50 or 91.217.189.35 or 154.35.175.101 or 194.14.236.50 as server (random dalnet servers; however, I cannot find one with an IPv6-address; what server did you give ZNC to connect to?)
My IP address is IPv6 and They said my bIndhost is IPv6 only? I don't understand this?
Pardon me, but my psychic abilities are having a bad day: Who is "they" and what exactly do "they" say? Any more specific error message from ZNC?
Why do you even still have a bindhost after
/msg *status clearbindhost? That should unset any bindhost.Man, I want to use my VHOST which I set from www.freedns.afraid.org. On IPv6 Address. But when I set the BindHost I get this message
Uhm. That sounds more like ZNC's message is mixed up (is it?) and you are having an IPv6-bindhost, but DALnet does not have any IPv6 servers.
In that case, try
/znc addserver ipv6.dal.net(or/znc addserver 2001:550:101:a::2and/znc addserver 2a00:1a28:1100:4::a)DALnet allow Ipv6 and on my ZNC panal i have put ipv6.dal.net server...
[Edit] [Del] DALnet 1 ipv6.dal.net:+6697 Fahad
Now what ? shall i add this also /znc addserver 2001:550:101:a::2
And After setting my Vhost on afraid and i cant able to add Ipv6 Ip on my panal. It says Invalid Hostname.
and it says my bindhost is ipv4 only
Disconnected from IRC (Server address is IPv6-only, but bindhost is IPv4-only). Reconnecting...
But didn't you say that your bindhost is an IPv6 address?
Here:
I'm confused by your setup. And the use of "VHOST" confuses me further.
Can you tell me what you set up with freedns? (Which IP, which DNS name)
I think that you cannot use this to get a vhost...
@psychon OK I can explain... I purchase VPS ok and I setup my ZNC and after setting up my ZNC i try to set Vhost for ZNC which i did from www.freedns.afraid.org. I put my IPV6 ip and set my VHost i try to put that vhost on znc. I get this message...
The BindHost in ZNC just selects the IP address that ZNC connects from. If you only have a single IP address, the BindHost option doesn't have any effect.
Since you mention VHost: When the IRC server sees an incoming connection, it only sees your IP address. It then looks up the PTR record of that IP address to get a domain. Then it resolves that domain into an IP address. If the result matches the IP address of the incoming connection, the domain is used for display purposes instead of the IP address.
So, just setting up a new DNS record with freedns does not help, because you also need the PTR DNS record of the IP address (which you cannot control in most cases).
All of the above is why the option in znc is called BindHost and not VHost.
@psychon I think my VPS IP is Default IPV4 ? Maybe that's the issue?
@psychon Thank You My Problem is solve
IPV6 disable!!!
Copy:
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
Edit: nano /etc/sysctl.conf
Paste and save!
and shutdown -r now
ZNC configuration no write bindhost!
And work reverse domain irc.