# Lost log file



## kerogaz (Dec 22, 2022)

After upgrading 
	
	



```
syslog: /var/log/daemon.log:No such file or .
```
.. What can I do?


----------



## richardtoohey2 (Dec 22, 2022)

Upgrading from what to what on what and how?


----------



## kerogaz (Dec 22, 2022)

13.1 from p4 to p5       freebsd-update fetch


----------



## covacat (Dec 22, 2022)

just touch it or run newsyslog -CC


----------



## kerogaz (Dec 22, 2022)

sudo newsyslog -CC
Password:
newsyslog: error in config file; bad permissions:
<<<<<<< current version

newsyslog: missing field in config file:
=======


----------



## covacat (Dec 22, 2022)

you have a botched update merge
find /etc -type f |xargs grep -l =====
then inspect the listed files for sequences
like 
>>>>>> freebsd old version
foo 
bar baz
=========
bar baz
foo3
<<<<<<< current version 
and fix them by keeping just one of the fragment between ===== and >>>> or <<<<
also delete the <<<< >>>> =====  containing lines


----------



## kerogaz (Dec 22, 2022)

sudo find /etc -type f |xargs grep -l =====
Password:
grep: /etc/ppp/ppp.conf: Permission denied
grep: /etc/opieaccess: Permission denied
grep: /etc/ssh/ssh_host_key: Permission denied
grep: /etc/ssh/ssh_host_rsa_key: Permission denied
grep: /etc/ssh/ssh_host_dsa_key: Permission denied
grep: /etc/ssh/ssh_host_ecdsa_key: Permission denied
grep: /etc/ssh/ssh_host_ed25519_key: Permission denied
grep: /etc/ssl/private/dovecot.pem: Permission denied
grep: /etc/defaults/devfs.rules: Permission denied
grep: /etc/spwd.db: Permission denied
grep: /etc/snmpd.config: Permission denied
/etc/mail/mailer.conf
grep: /etc/mail/aliases.db: Permission denied
grep: /etc/mail/certs/host.key: Permission denied
/etc/newsyslog.conf
/etc/newsyslog.conf.orig
/etc/services
grep: /etc/security/audit_user: Permission denied
grep: /etc/security/audit_control: Permission denied
grep: /etc/security/audit_warn: Permission denied
grep: /etc/nsmb.conf: Permission denied
grep: /etc/ntp/leap-seconds: Permission denied
grep: /etc/bluetooth/hcsecd.conf: Permission denied
grep: /etc/master.passwd: Permission denied
grep: /etc/opiekeys: Permission denied
grep: /etc/pw.WqSqQs: Permission denied
There are a lot of them. And why should I do this and not the developer, It's kind of a bug


----------



## covacat (Dec 22, 2022)

do it as root or 
sudo find /etc -type f |sudo xargs grep -l =====
/etc/mail/mailer.conf
/etc/newsyslog.conf
/etc/newsyslog.conf.orig
seem to be problematic


----------



## kerogaz (Dec 22, 2022)

And I did both as root and as sudo No difference.Look closely at my first line


----------



## covacat (Dec 22, 2022)

you should not get permission denied while running as root
anyway fix newsyslog.conf and mailer.conf


----------



## covacat (Dec 22, 2022)

kerogaz said:


> And why should I do this and not the developer, It's kind of a bug


when you update configuration files are merged 
when the automatic process can't decide what to keep and what to change it creates a file with >>>===<<< sequence in it which you are supposed to fix manually


----------



## kerogaz (Dec 22, 2022)

I noticed that these listed files are neither root nor sudo accessible. Maybe this is the problem.To be honest, I have never seen anything like this in any Unix-like system, neither in Arch, nor in Red Hat, nor in Debian.


----------



## covacat (Dec 22, 2022)

sudo sh
id


----------



## kerogaz (Dec 22, 2022)

And how will I edit these files if there is no access to them?


----------



## kerogaz (Dec 22, 2022)

sudo sh
Password:
# id
uid=0(root) gid=0(wheel) groups=0(wheel),5(operator)


----------



## covacat (Dec 22, 2022)

that looks ok
id && head /etc/ppp/ppp.conf


----------



## kerogaz (Dec 22, 2022)

id && head /etc/ppp/ppp.conf
uid=0(root) gid=0(wheel) groups=0(wheel),5(operator)
#################################################################
# PPP  Sample Configuration File
# Originally written by Toshiharu OHNO
# Simplified 5/14/1999 by wself@cdrom.com
#
# See /usr/share/examples/ppp/ for some examples
#
# $FreeBSD$
#################################################################


----------



## covacat (Dec 22, 2022)

so it reads it, you should be able to run the initial find | xargs command as root and get the list of problematic merged files


----------



## kerogaz (Dec 22, 2022)

Thank you. I'd rather wait for the next update. And if I manually create the missing log file, will it work?Because on the example of a red hat, files created in this way do not always work


----------



## covacat (Dec 22, 2022)

you have to fix the config files
otherwise different services like newsyslog wont run
this is not complicated at all


----------



## zirias@ (Dec 22, 2022)

kerogaz said:


> There are a lot of them. And why should I do this and not the developer, It's kind of a bug


You had merge conflicts in config files on upgrade. This is definitely *not* a bug. There will be messages about it, telling you to resolve them. Seems you missed this.


kerogaz said:


> I'd rather wait for the next update.


This certainly *won't* help. Merge conflicts happen when a change in the default config (from FreeBSD) conflicts with a change you did locally. You have to solve these conflicts.


----------



## Tieks (Dec 22, 2022)

As mentioned, you need to do something about it. There are probably more problems than you've noticed so far. It may be helpful that you can find default versions of these files under /usr/src.
An example:
`find / -name opieaccess
/etc/opieaccess
/var/db/etcupdate/current/etc/opieaccess
/usr/src/lib/libopie/opieaccess`


----------



## kerogaz (Dec 23, 2022)

Can this link help?








						syslogd no such file or directory - OpenBSD 3.9
					

OK - long story short: I have OpenBSD box that was setup as a network appliance (long time ago) I have returned to life. Several errors I am working on and could use any help I can get. Errors on ...




					serverfault.com
				




""have you tried by reinstalling the package, like i have faced same issue in ubuntu 12.04, in which suddenly default logs are unavailable and i solved by installing *syslog* again.""


----------



## SirDice (Dec 23, 2022)

No, fix those merge errors in the configuration files, as has been suggested multiple times already. You could have solved the entire issue by now.


----------



## kerogaz (Dec 23, 2022)

zirias@ said:


> You had merge conflicts in config files on upgrade. This is definitely *not* a bug. There will be messages about it, telling you to resolve them. Seems you missed this.
> 
> This certainly *won't* help. Merge conflicts happen when a change in the default config (from FreeBSD) conflicts with a change you did locally. You have to solve these conflicts.


I consistently upgrade from 10.0 to 13.1 on this computer and never had conflicts with the local config. Then why only now did it arise, when updating 13.1 from p4 to p5?


----------



## SirDice (Dec 23, 2022)

Results archived in the past are not a guarantee for the future. Merge issues can happen, you just need to deal with them. And these issues probably happened earlier, you just didn't notice them.


----------



## zirias@ (Dec 23, 2022)

kerogaz said:


> I consistently upgrade from 10.0 to 13.1 on this computer and never had conflicts with the local config. Then why only now did it arise, when updating 13.1 from p4 to p5?


I think it happened earlier and you just didn't notice, patch levels are very unlikely to change any configuration files.

But in general, because this specific update when it happened finally changed some lines in config files you also changed previously.


----------



## kerogaz (Dec 23, 2022)

I manually created the daemon.log file. Rebooted the system. The previous error has disappeared. Now a new one has appeared

```
Creating and/or trimming log filesnewsyslog:error in config file; bad permissons:
<<<<<<<current version
newsyslog: missing field in config file:
=======
```


----------



## kerogaz (Dec 23, 2022)

Would adding ======= to the end of syslog.conf help?


----------



## zirias@ (Dec 23, 2022)

Those are the conflict markers `<<<<<<<`, `=======` and `>>>>>>>`). They are not supposed to be in the config files at all. They separate the parts that YOU changed versus the parts that were changed by the update and it's your job to find a sane way of merging these changes (and then remove all the conflict markers).


----------



## kerogaz (Dec 23, 2022)

So what exactly should I fix then?


----------



## chrbr (Dec 23, 2022)

kerogaz said:


> So what exactly should I fix then?


I have had the same behaviour as you, but during a former update. Please check the difference between the old entries and the new ones. Normally it is sane to delete the old sections including the markers. And just in case - you can keep the current situation until everything works fine by tar the /etc/ directory.


----------



## eternal_noob (Dec 23, 2022)

That's why i always do a fresh new install. Even when updating to a new minor version.

But seriously, an update to just another patch level should not have such issues.


----------



## kerogaz (Dec 23, 2022)

chrbr said:


> I have had the same behaviour as you, but during a former update. Please check the difference between the old entries and the new ones. Normally it is sane to delete the old sections including the markers. And just in case - you can keep the current situation until everything works fine by tar the /etc/ directory.


Maybe this error appeared for me as well as for you in an earlier update, I just paid attention to it only in p5


----------



## kerogaz (Dec 26, 2022)

I'd rather wait for the next update, maybe this bug will disappear, although the developer claims that this is not a bug, but this is already an area of casuistry. "A *software bug* is an error, flaw or fault in the design, development, or operation of computer software that causes it to produce an incorrect or unexpected result, or to behave in unintended ways."


----------



## richardtoohey2 (Dec 26, 2022)

kerogaz said:


> I'd rather wait for the next update, maybe this bug will disappear


The point is that the next update will not magically unmangle your files.

So there will be no change until you manually fix them.

Waiting will not change that.


----------



## kerogaz (Dec 26, 2022)

richardtoohey2 said:


> The point is that the next update will not magically unmangle your files.
> 
> So there will be no change until you manually fix them.
> 
> Waiting will not change that.


And I have not changed anything in my config files since 2015, this update changed them, letting the developers correct if something means to them the prestige of the system.I noticed that with each new release the system becomes more complicated and somewhat worse. I don't know what the reason for such an incident.
Therefore, you probably do not need to remove the support of old but reliable releases. The system should be for the user and not for himself. It turns out as soon as you removed all the bugs from the system the following release with new bugs appears. Is it possible to preserve one systems  for 10 years as it was on CentOS?I worked with Centos 6 without problems for 10 years until Red Hat took her to his hands finally and the terms of support were cut. Freebsd turned out to have become like Linux Rolling Release as ArchLinux


----------

