Ip Address Could Not Be Resolved Getnameinfo Returned Error
Contents |
Reporter: Peter Brawley (Basic Quality Contributor) Email Updates: Status: Closed Impact on me: None Category:MySQL Server: Command-line Clients Severity:S3 (Non-critical) Version:5.5 OS:Any (MS Windows, Mac OS X) Assigned to: Alexander ip address has been resolved to the host name which resembles ipv4-address itself Nozdrin Tags: qc, regression Triage: Triaged: D2 (Serious) View Add Comment Files Developer Edit
Mysql Ip Address Could Not Be Resolved
Submission View Progress Log Contributions [18 Apr 2010 3:25] Peter Brawley Description: After upgrading from 5.5.2 to 5.5.3 on our
Mysql Ip Address Could Not Be Resolved No Such Host Is Known
LAN PC that serves as our 5.5 testbed, all _other_ machines on the LAN, running both *Nix and Windows, were refused connection to the machine running 5.5 ... mysql -hMACHINE_NAME -uUSR -pPWD mysql
Mysql Ip Address Could Not Be Resolved Name Or Service Not Known
-hMACHINE_IPADDRESS -uUSR -pPWD with the message "Can't get hostname for your address" until we added ... skip-name-resolve to my.ini on the machine running 5.5.3. There are several problems with this: 1. Our fix is a hack. It works in our case only because all mysql.user.host values in that installation box are '%'. 2. It is counter-intuitive, to say the least, that a server parameter called skip-name-resolve skip-name-resolve mysql fixes connection via IP address! 3. In general, it's impossible to find documentation on "Can't get hostname for your address" in the manual (unfortunately there's a rather long list of issues on which the manual is silent). The manual needs (i) coverage of this error and (ii) a better explanation of how the server deals with hostnames than simply naming the obscure C function which the server calls for the purpose. How to repeat: As above Suggested fix: As above [21 Apr 2010 7:22] Sveta Smirnova Thank you for the report. Verified as described. Grants used: grant all on *.* to bug52923@'192.168.0.%'; [12 May 2010 14:26] Bugs System A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/108155 3038 Alexander Nozdrin 2010-05-12 Fix for Bug#52923 (Inadequate documentation of "Can't get hostname for your address" error). The thing is that on some platforms (e.g. Mac OS X) sockaddr_in / sockaddr_in6 contain a non-standard field (sin_len / sin6_len), that must be set. The problem was that only standard fields were set, thus getnameinfo() returned EAI_SYSTEM instead of EAI_
For Printing -XML -Clone This Bug -Last Comment First Last Prev Next This bug is not in your last search results. Bug221583 - getnameinfo fails instead of returning IP address Summary: getnameinfo fails instead of returning IP address Status: CLOSED NOTABUG Aliases: None Product: Fedora Classification: Fedora Component: glibc (Show other bugs) Sub Component: --- Version: 6 Hardware: All Linux Priority medium Severity medium TargetMilestone: --- TargetRelease: --- Assigned To: Jakub Jelinek QA Contact: Brian Brock http://bugs.mysql.com/52923 Docs Contact: URL: Whiteboard: Keywords: Depends On: Blocks: Show dependency tree /graph Reported: 2007-01-05 09:29 EST by Jeremy Faith Modified: 2007-11-30 17:11 EST (History) CC List: 1 user (show) drepper.fsp See Also: Fixed In Version: Doc Type: Bug Fix Doc Text: Story Points: --- Clone Of: Environment: Last Closed: 2007-01-12 05:36:14 EST Type: --- Regression: --- Mount https://bugzilla.redhat.com/show_bug.cgi?id=221583 Type: --- Documentation: --- CRM: Verified Versions: Category: --- oVirt Team: --- RHEL 7.3 requirements from Atomic Host: Cloudforms Team: --- Attachments (Terms of Use) test prog to call getnodeinfo (1.08 KB, text/x-csrc) 2007-01-05 09:29 EST, Jeremy Faith no flags Details Add an attachment (proposed patch, testcase, etc.) Groups: None (edit) Description Jeremy Faith 2007-01-05 09:29:11 EST Description of problem: getnameinfo fails instead of returning IP address when looking up a hostname by IP address. Version-Release number of selected component (if applicable): glibc-2.5-3 How reproducible: This happens when a)The IP is not listed in /etc/hosts b)hosts enty in /etc/nsswitch.conf is as it is by default i.e. hosts: files dns Steps to Reproduce: 1. compile the attached program dnstst.c using gcc -odnstst dnstst.c 2. ./dnstst 10.1.1.1 # i.e. any dummy ip address not listed in /etc/hosts file Actual results: [root@eowen dnstst]# ./dnstst 10.1.1.1 gethostbyaddr host(10.1.1.1) getnameinfo: localhost: Success Temporary failure in name resolution: Illegal seek error=-3 Expected results: [jjf@jfaith ~/tmp/dnstst]$ dnstst 10.1.1.1 gethostbyaddr host(10.1.1.1) getnameinfo namebuf(10.1.1.1) Additional info: On both FC2 and FC4 the getn
a Web application is deployed in the 100.ZZZ.YYY.XXX MySQL 5.5.5 instance (New Machine) But when trying to access the database from a remote machine with PHP or Python, you will get the following error message: "Can http://www.databasesql.info/article/4319218279/ not get hostname for Your address." Pondering what to understand the phrase prompt MySql http://androidyou.blogspot.com/2010/11/how-to-ndb-replication-between-two.html Server return to the client. In other words, the MySQL Server in an attempt to reverse DNS on the IP address of the client, trying to get the host name, however, we have initiated to access the client either Machine or the server room, so I can not get the host name, the MySQL Server error then ip address refuse client connections. Error screenshots For example, Python will get this exception: The report of the event log The MySQL Server resides on the server, the Windows event log the following error: Event Type: Warning Event Source: MySQL Event Category: None Event ID: 100 Date: 2010-01-01 Event: 11:29:13 User: N / A Computers: SERVERII Description: IP address '100. ZZZ.YYY.XXX 'could not be resolved: getnameinfo () returned error (code: 11004). For more information, ip address could see Help and Support Center at . Simple explanation MySQL server received a request from you to allow you to connect to the database. So next thing it tried to do is to check what name is bound to your IP address (name resolution) and it failed to do so. So it just denied you Access. Mysql processing client resolver process can be understood: 1, when the MySQL client initiates a connection request, the MySQL Server will take the initiative to check the host name of the client. 2, first find the Windows system directory under the / etc / hosts file, search for the domain name and IP corresponding relationship. 3, if the hosts file is not, then the DNS settings, if not set the DNS server will immediately return failure; if the DNS server is set up, reverse DNS, until the timeout. Solution The first method to modify the Hosts In MySQL Server resides on the server, modify the Windows hosts file, add a line record, such as: 100.ZZZ.YYY.XXX dummy.ju690.cn Then in 100.ZZZ.YYY.XXX machine initiates a connection request in Python, tested, can connect MySql Server Oh, great by getnameinfo () parse out 100.ZZZ.YYY.XXX host name. However, this method is mechanical, it is generally using the following method. Second way to mod
testing Mysql NDB Cluster on Centos Tutorial. On each Server, there is one NDB cluster with one API Node and two Data Nodes and one mgmt node. before we kick off the replication, first make sure the /etc/hosts file has the right entry for both Hosts. Otherwise you may get the error in mysql like no access. 101123 5:55:16 [Warning] IP address '192.168.30.22' could not be resolved: getnameinfo() returned error (code: -3). 101123 5:55:56 [Warning] IP address '192.168.30.22' could not be resolved: getnameinfo() returned error (code: -3). Configuration changes on HOST Master. On HostA mysql instance, create one user that will be used by slave server hostb to pull the replication information. GRANT REPLICATION SLAVE ON *.* TO 'repluser'@'hostb' IDENTIFIED BY 'pass'; Chagne the /etc/my.cnf , add options to enable binlog logging on row level, and assign one server-id. [mysqld] ndbcluster ndb-connectstring=localhost log-bin binlog-format=row server-id=1 backup the db using the mysql dump and copy to Slave server for the initial restore. (ALL DB objects will be covered in the mysqldump , like view , storeprocedue) mysqldump -u root yourdatabase -master-data=1> ini.sql Restart the Master mysqld daemon. that's all the changes. Configuration changes on HOST Slave Server. Assign one explicit server-id in the my.cnf [mysqld] ndbcluster ndb-connectstring=localhost server-id=2 restore the db from the master backup mysql -u root ourdatabase