AdguardTeam / AdguardTeam/AdGuardHome

Bug leases.json decoding db: invalid character '\x00'

Abierto
#7,196 1 comentario 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
TypeScript
Estrellas
36.9k
Forks
2.5k
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

### Prerequisites

- [X] I have checked the [Wiki](https://github.com/AdguardTeam/AdGuardHome/wiki) and [Discussions](https://github.com/AdguardTeam/AdGuardHome/discussions/categories/q-a) and found no answer

- [X] I have searched other issues and found no duplicates

- [X] I want to report a bug and not [ask a question or ask for help](https://github.com/AdguardTeam/AdGuardHome/discussions/categories/q-a)

- [X] I have set up AdGuard Home correctly and [configured clients to use it](https://github.com/AdguardTeam/AdGuardHome/wiki/Clients). (Use the [Discussions](https://github.com/AdguardTeam/AdGuardHome/discussions/categories/q-a) for help with installing and configuring clients.)

### Platform (OS and CPU architecture)

Linux, ARMv7

### Installation

Docker

### Setup

On a router, DHCP is handled by AdGuard Home

### AdGuard Home version

last

### Action

leases.json with caracter invalide after reboot
decoding db: invalid character '\x00'

### Expected result

keep date

### Actual result

keep date

### Additional information and/or screenshots

Good afternoon,

I'm having issues with my AdGuard container. Whenever there's a power outage or a restart of the Orange Pi, this container fails to start and shows the following log errors:

2024/08/14 11:00:17.129663 [info] AdGuard Home, version v0.108.0-a.950+cdf970fc
2024/08/14 11:00:17.139801 [info] tls: using default ciphers
2024/08/14 11:00:17.143607 [info] safesearch default: disabled
2024/08/14 11:00:17.144303 [fatal] initing dhcp: loading db: decoding db: invalid character '\x00' looking for beginning of value

The container keeps restarting and doesn't fully start.
A clean installation is needed for it to start properly.

-----------------------------

I found the problem but I don't know how to fix it.
I found that the leases.json list is buggy after you set a forced container shutdown problem.
When I entered the list I found that it has invalid characters @@@@@@@@@@@@@@@@

My CLI

docker run -d
--name=adguard
--hostname=adguard
-e TZ=America/Maceio
-v adguard:/opt/adguardhome/work
-v adguard:/opt/adguardhome/conf
-p 67:67/udp -p 68:68/udp
-p 53:53/tcp -p 53:53/udp
-p 80:80/tcp
-p 443:443/tcp -p 443:443/udp
-p 3000:3000/tcp
--cap-add=NET_ADMIN
--cap-add=SYS_NICE
--ulimit rtprio=99
--network=host
--restart always
adguard/adguardhome

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.