New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nsd-control says "input in flex scanner failed"#119
Comments
I removed the part "--with-configdir=$etc --with-nsd_conf_file=$etc" and the problem disappeared. |
Thank you for the report, I fixed the compiler warnings, that is good to fix. The error seems to be because nsd-control by default reads the default config file. And you set it to a particular one with the configure statement. This caused that file to be read. But it has lots of syntax failures, I guess it is not an nsd.conf file at all, this error is printed if the flex code tries to read the file but there is an IO error while reading the file. I would like to print a better error at this time, for which I would like to reproduce it, can you tell me what was at the |
Yes, reproduced this by reading a directory. That causes the flex code to exit. There is code to print a warning about the impending problem, it prints that it is trying to read a directory. Also implemented that for zone files. That should make is easier to figure out what the problem is. Thanks for the report! The code is in the github repo, and should be in the next release. |
Hey! The $etc was an alias for $prefix/etc/nsd/. I noted one time too many that configure ignores --sysconfdir, in the sense that it adds a nsd subfolder to it. So that may have been the root problem with --sysconfdir=$etc in this case. The origin of this config is the attempt to chroot, similarly to how I do it with unbound. Unbound allows me to install sbin on a read-only side of the disk, and write under var, even if I have to write etc also under var. By comparison, nsd demands sbin to be inside chroot, which means I cannot have a read-only part. I do not know why netlabs decided to implement two different solutions for essentially the same problem. |
For NSD the sbin does not have to be in the chroot, I think? Just pass all absolute pathnames (that start with the chroot dir) and then NSD should strip off the leading chroot part when it needs that path, from nsd.conf. The nsd-checkconf tool should print warnings when chroot paths are wrong. |
I am at pains with this error message.
This is how I configured:
This is what the compiler says:
The server starts and runs, however.
The text was updated successfully, but these errors were encountered: