Host Engineering Forum
General Category => Do-more CPUs and Do-more Designer Software => Topic started by: Andrew S on August 24, 2019, 10:39:45 AM
-
I'm running DNSLOOKUP with 8.8.8.8 and 8.8.4.4 as the servers. I'm attempting to resolve an address (on a domain that I control) but it's failing. Because the system is still being tested I'm using an internal IP address which resolves correctly when I run nslookup on the two google servers.
I'm wondering if I'm getting tripped up by some sanity-checking in the function. Does it disallow private addresses on public servers to avoid dns cache poisoning?
The reality is that it's much more likely to be something stupid in my code but for the life of me I can't see it.
Andrew.
-
Still struggling with this. I pointed the command to use an internal DNS server as the primary and made sure I could resolve the host on a PC - it failed. I changed the host to a different hostname on the local network but it still failed. At this point I can't make the command work at all. The PLC communicates fine for other network commands and I've double-checked the network setup of the PLC which appears to be fine. I've checked and double-checked the values I'm putting into the command and they seem ok. I'm using all lower-case hostnames (the same as defined in the DNS server) in case something odd's going on such as PLCNut saw in a previous post.
Stumped on a Saturday - can't be good....
Andrew.
-
The reality is that it's much more likely to be something stupid in my code but for the life of me I can't see it.
A cautionary tale for those daft enough to be coding on a Saturday. Always make sure that "Automatically Insert Space" is switched off when you STRPRINT your hostname.
Where's that face-palm icon?... :o
-
That's one of the things that makes Quoted String format more helpful than ASCII format in Data View - you can see trailing spaces in Quoted String
"plcxyz "
vs
plcxyz
Editing in ASCII format is easier than Quoted String for simple text. Quoted String requires the start/end double quotes, but it then also supports the $ escape sequence grammar, which is sometimes needed (but typically not for most text).
-
Yes, quoted string is awesome. It's caught that exact problem (trailing space) for me on more than one occasion.