Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

DNS: The selected log file does not exist

Hi to all,


I am using Lion Server on a Mac Mini and everything seems to work fine. However, when I want to check my DNS log file (Server Admin > DNS > Log) I get a message that "The selected log file does not exist"! Stopping and starting the DNS service doesn't help. Anyone any idee how to view the log file within the Server Admin app?


Thanks in advance!


Ewald.

Posted on Aug 5, 2011 10:17 AM

Reply
17 replies

Sep 29, 2011 5:06 AM in response to Home_User

i think it has something to do with Lion Server 10.7.1 <vs> Server Admin 10.7


for inspecting and debuggin, the log file for "DNS service" (known as named, a.k.a. bind) is located in /Library/Logs/named.log


you can have similar funcionality with that command run on your Terminal:


# sudo tail -f /Library/Logs/named.log


That will keep watching the log file and dumping to you any new line, like in Server Admin > DNS > Log


To break the command hit CTRL+C


i guess we have to wait for an update of Server Admin Tools...

t

Nov 19, 2011 2:30 AM in response to Home_User

Since you can define the log file in named.conf (and hence change it to where the Server Admin tool is looking for its log) has anyone ever figured out where Server Admin is looking for its log file? I tried copying the /Library/logs/named.log to /var/logs, still the same error in Server Admin, can't find the log file. So either it is not looking there, or it is not actually looking for a log file.


Ideas are welcome!

Nov 24, 2011 3:30 AM in response to John Caradimas

hi John!


if you have time, patience, and squared balls (just for laugh! 🙂):


Use "strace" to trace all system calls a binary make... System calls like "open" file and "close" file =)

That's say, we are going to "trace the files opened by specific application".


"Strace" in MacOSX comes with Developer Tools, so you'll need to install these to continue.


First you have to know which are the Applications in the game, because "Server Admin" is a client-server application, there will be a client application in the client machine, and a server application running in the server.


You have to trace the server application running in the server. It will be the one which opens the log file, and sends the data to the client application.


I've made some previous investigation about the Server Admin Log parser (see https://discussions.apple.com/thread/3352647?start=0&tstart=0).

Also will be helpfull to read a little bit about strace ( http://linux.die.net/man/1/strace )


Here i do my bet, maybe that command line is what you look for:


#sudo strace launchctl load -w /System/Library/LaunchDaemons/com.apple.ServerPerfLog.plist | grep "open"


sudo: do as super user

strace: trace the binary

launchctl: system service

load -w file: load, as defined in this file

| grep open: and substract just the "open file" traces


Let me know if that gives you more clues!


regards, T

Nov 24, 2011 3:35 AM in response to John Caradimas

p.s.: there is a better way to solve this, better than change it in named.conf (which can conflicts with future apple updates) or copy it to elsewhere (the copy will not be updated).


you can do a symbolic link, which will make the trick (don't change Apple configuration, and keep file updated).


for example:


#ln -s /Library/Logs/named.log /var/log/named.log


that will make any read to /var/log/named.log to really go to /Library/Logs/named.log


You don't change Apple's choice, and the new "file" (because it's really just a link to the old one) will be updated by DNS server.

Nov 24, 2011 3:44 AM in response to John Caradimas

Well guys, thank you very much for the suggestions, but I took an easier root to solving this issue. But before, let me elaborate.


A couple of days ago, I called Apple support and ask this very same question: Where on earth is Server Admin looking for, to find its DNS log file. Of course, they didn't have the answer. So, after a lot of thinking, and since I hate seeing resources being wasted, I used an old Pentium 4 machine I had in the basement and installed CentOS on it. In a couple of days, I had the DNS, web and Wordpress server installed, without the problems Lion Server gave me. I just finished testing the new set up and I can say it's working like a champ. The Lion server will continue to provide Calendar and Address Book services for me and my family, allow us to share files (even though CentOS is also running afp, so I can use that for sharing too) and email service.


Sorry that I didn't had the chance to investigate your suggestions, but no matter how much I love Apple's products, I have more important jobs to do in my life, than debug their server. If my twins allow me, I may investigate the above and see what I can come up with, but please do not hold your breath.


Again, many thanks for your time answering my question.

DNS: The selected log file does not exist

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.