Address family not supported by protocol что делать
97: Address family not supported by protocol #1125
Comments
ryancom2190 commented Nov 13, 2019
I am getting the following error when I check the configuration for errors.
Checking Nginx configuration. nginx: the configuration file /etc/nginx/nginx.conf syntax is ok nginx: [emerg] socket() [::]:443 failed (97: Address family not supported by protocol) nginx: configuration file /etc/nginx/nginx.conf test failed
It may be similar to the issue #1098
We have a dedicated server from Godaddy that runs CentOS 6.10 with WHM 84.0.8. I installed engintron yesterday and after the installation, all the sites stopped working so I disabled it and now trying to troubleshoot this error, which I am assuming is why the sites went down.
The text was updated successfully, but these errors were encountered:
fevangelou commented Nov 13, 2019
The latest release of Engintron supports both IPv4 & IPv6.
However, IPv6 is disabled in your system and this causes issues (when it shouldn’t). Enable it using the 2nd method as described here: https://www.thegeekdiary.com/how-to-enable-ipv6-on-centos-rhel-6/
You don’t have to actually use IPv6 addresses.
ryancom2190 commented Nov 14, 2019
This is what I get when I try to apply the changes:
net.ipv4.ip_forward = 0
net.ipv4.tcp_syncookies = 1
error: «net.ipv6.conf.all.disable_ipv6» is an unknown key
error: «net.ipv6.conf.default.disable_ipv6» is an unknown key
ryancom2190 commented Nov 14, 2019 •
Found the issue, had to edit /etc/nginx/conf.d/default_https.conf
Changed:
And now get this on testing the configuration:
ping: socket: Address family not supported by protocol #293
Comments
lekto commented Sep 2, 2020 •
Hi, I got message «ping: socket: Address family not supported by protocol» when using ping without «-4» after update to s20200821.
I did git bisect and it’s showing me that this commit is causing this:
I’m using kernel without IPv6 support.
The text was updated successfully, but these errors were encountered:
pevik commented Sep 2, 2020
Thanks for your report. The commit is correct. But is there a regression? I don’t thing so, but code could be improved.
Lines 523 to 533 in 4fd276c
Then obviously correct socket is used. Ideally code would know which socket needs to use before trying to create it. I’ll have to look more deeply into the code how big rewrite it will be (and I’d prefer to have some ping tests written before changing it unless the change is trivial). And at least the warning could print whether the error is on IPv4 or on IPv6 to be at least a less confusing.
floppym commented Sep 2, 2020
I would guess that the desired outcome is to run ping github.com on a kernel with IPv6 disabled without seeing a warning message.
It is unlikely that a user who has disabled IPv6 support in the kernel would care that ping is unable to create an IPv6 socket.
Whissi commented Sep 2, 2020
. and keep in mind that github.com doesn’t return any AAAA record at all. 🙂
klynastor commented Nov 25, 2020 •
This broke nagios on me, since nagios expects no warnings sent to stderr. Here’s a quick patch.
clayne commented Feb 4, 2021
This is absolutely a regression. If a user pings a destination on an IPv4 only host, they should not suddenly be seeing a new warning just because socket(AF_INET6, SOCK_DGRAM, IPPROTO_ICMPV6) failed.
This is the commit that first introduced this behavior based on a bisect:
Presumably what happened here is that once the right variable was used this warning started being emitted in cases where AF_INET6 is not supported and nobody caught this because either the committers or build infrastructure is entirely dual-stack? However, it seems like the change above is merely a red herring and merely made the check start working correctly. IMO, the real issue started back in 9fd870a once the conditional itself was changed.
[VS Code] Address family not supported by protocol #544
Comments
okashirin commented Jun 14, 2018 •
Error:
Address family not supported by protocol
log.zip
Steps to Reproduce:
The text was updated successfully, but these errors were encountered:
daytonellwanger commented Jun 14, 2018
@okashirin thanks for attaching your logs!
Priya91 commented Jun 14, 2018
@okashirin Can you run the below c++ code, it jsut tries to create a socket on your machine.
okashirin commented Jun 14, 2018 •
i got it
g++ test.cpp
test.cpp: In function ‘int main()’:
test.cpp:5:25: error: ‘AF_UNSPEC’ was not declared in this scope
printf(«%d», socket(AF_UNSPEC, SOCK_STREAM|SOCK_CLOEXEC, 0));
^
test.cpp:5:36: error: ‘SOCK_STREAM’ was not declared in this scope
printf(«%d», socket(AF_UNSPEC, SOCK_STREAM|SOCK_CLOEXEC, 0));
^
test.cpp:5:48: error: ‘SOCK_CLOEXEC’ was not declared in this scope
printf(«%d», socket(AF_UNSPEC, SOCK_STREAM|SOCK_CLOEXEC, 0));
^
test.cpp:5:63: error: ‘socket’ was not declared in this scope
printf(«%d», socket(AF_UNSPEC, SOCK_STREAM|SOCK_CLOEXEC, 0));
frezbo commented Jun 15, 2018
I don;t know if this is the right issue, otherwise I can create a new one:
I am getting this with the LIve share extension everytime I start VSCode:
This seems like a bad bug:
Clearly I’m running a RHEL based system (Fedora 28)
UDP socket: server sending file to client Address family not supported by protocol family
I am just a beginner in socket programming and currently working on an small program dealing with file transfer using UDP. This program is written in C.
Here is my problem:
UDP server will first use the recvfrom() function to catch message from UDP client so to start sending a file. I sent the file name first, and it couldn’t went through, appearing with: Address family not supported by protocol family as the error message(). I checked the sin_family of client_addr, and it is 7. Furthermore, after I tried to set client_addr.sin_family = AF_INET; the server worked fine, except that the client couldn’t even receive any message.
I have checked some sources but it happened to be not so helpful, please if anyone knows why and willing to tell. Appreciate all your help.
Below is a short portion of server code:
2 Answers 2
The last argument to recvfrom takes the address of a socklen_t which needs to be initialized with the size of the sockaddr parameter. I don’t see clientLength initialized prior to this call, so client_addr is probably not being updated properly when this function returns. This causes the subsequent call to sendto to fail.
If you initialize clientLength before calling recvfrom that will take care of the problem.
I am slightly tired of all incorrect and half-correct UDP socket program attempts at Stack Overflow. I have decided to do the reference UDP implementation, taking this question as an example. Next time I see TCP question (and have some time and energy) I will do reference TCP implementation.
This implementation does everything correctly (to the best of my knowledge :). It uses BSD sockets, so Windows implementations will have to make minor changes. Other than that, it should be C-99 conforiming in all.
Errors handling: application checks for possible errors, but does not try to correct them, simply reports. It also is known to leak a socket in certain error conditions (which lead to application shutdown), but adding proper socket close in this case will simply warrant for more code without actually adding a lot of benefit.
Usage: ./test_udp server or ./test_udp
«Address family not supported by protocol», web container won’t start #2170
Comments
mglaman commented Apr 11, 2020
Describe the bug
Trying to start my project, Nginx dies about the address format.
Version and configuration information (please complete the following information):
macOS Catalina 10.15.4
The text was updated successfully, but these errors were encountered:
mglaman commented Apr 11, 2020
This looks like the problem is about IPv6 support? I don’t get why this stopped.
mglaman commented Apr 11, 2020
Note: IPv6 networking is only supported on Docker daemons running on Linux hosts.
mglaman commented Apr 11, 2020
For folks hitting this via search: @rfay has a fix until this is released:
Note that you can use the image that works with webimage: drud/ddev-webserver:20200402_remove_ipv6 in your project’s config.yaml
rfay commented Apr 12, 2020
This is already in Edge release v1.14.0-alpha1, and will be in full v1.14 release in the next week or two. As @mglaman says you can also use it with v1.13 and earlier by changing the webimage, but don’t forget to remove that when you upgrade.
Note that this is a bug in Docker Edge 2.2.3.0, and they’ll have a fix for it before long. It’s just that we didn’t actually need to have the ipv6 usage in there in the first place.
Closing, I think people will find this OK even if closed. Thanks for reporting @mglaman
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.