Server crashed? help for best steps now please

Getting "Preparing your TV" on screen for ages on all my clients so checked the Server WebOS and that is not responding fully either. It runs on a Raspi4 using the OEM image with a Western Digital USB drive. I have rebooted the Raspi as a first option and there is obviously stuff happening from the logs but no Clients can connect, there is no Guide info there are these lines in the logs

2024/06/20 13:04:08.950405 [DVR] Recording engine started in /media/DVR
2024/06/20 13:04:08.996373 [SYS] Bonjour service running for dvr-server.local. [192.168.1.8]
2024/06/20 13:04:10.263800 [ERR] Could not create backup: stat /media/DVR: no such file or directory

media/DVR is my main storage location.

Thankfully I can still see all my files over the network from my PC so the hard drive is still working.

Any suggestions as to my best next steps please?

Full logs since restart below

2024/06/20 13:03:05 [Recovery] 2024/06/20 - 13:03:05 panic recovered:
runtime error: invalid memory address or nil pointer dereference
runtime/panic.go:261 (0x4552db)
runtime/signal_unix.go:861 (0x4552a8)
github.com/fancybits/channels-server/dvr/db_jobs.go:158 (0x1493180)
github.com/fancybits/channels-server/http_api_utils.go:159 (0x1a6974b)
github.com/fancybits/channels-server/http_api_job.go:14 (0x1ae5d77)
github.com/gin-gonic/[email protected]/context.go:169 (0x1a62627)
github.com/fancybits/channels-server/http.go:411 (0x1a62364)
github.com/gin-gonic/[email protected]/context.go:169 (0x1a622c3)
github.com/fancybits/channels-server/http.go:388 (0x1a622a8)
github.com/gin-gonic/[email protected]/context.go:169 (0xafb2eb)
github.com/fancybits/channels-server/http.go:363 (0x1a61f73)
github.com/gin-gonic/[email protected]/context.go:169 (0x1a61b7b)
github.com/fancybits/channels-server/http.go:325 (0x1a61358)
github.com/gin-gonic/[email protected]/context.go:169 (0xb0689f)
github.com/gin-gonic/[email protected]/recovery.go:107 (0xb06884)
github.com/gin-gonic/[email protected]/context.go:169 (0xb05c7f)
github.com/gin-gonic/[email protected]/logger.go:240 (0xb05c48)
github.com/gin-gonic/[email protected]/context.go:169 (0xafb2eb)
github.com/gin-contrib/[email protected]/sessions.go:54 (0x1a64caf)
github.com/gin-gonic/[email protected]/context.go:169 (0x1ae878f)
github.com/fancybits/channels-server/http.go:587 (0x1ae8774)
github.com/gin-gonic/[email protected]/context.go:169 (0xb04e23)
github.com/gin-gonic/[email protected]/gin.go:598 (0xb04b4c)
github.com/gin-gonic/[email protected]/gin.go:554 (0xb0476b)
net/http/server.go:2938 (0x6e39fb)
net/http/server.go:2009 (0x6df997)
runtime/asm_arm64.s:1197 (0x474973)

2024/06/20 13:03:55 [Recovery] 2024/06/20 - 13:03:55 panic recovered:
runtime error: invalid memory address or nil pointer dereference
runtime/panic.go:261 (0x4552db)
runtime/signal_unix.go:861 (0x4552a8)
github.com/fancybits/channels-server/dvr/db_jobs.go:158 (0x1493180)
github.com/fancybits/channels-server/http_api_utils.go:159 (0x1a6974b)
github.com/fancybits/channels-server/http_api_job.go:14 (0x1ae5d77)
github.com/gin-gonic/[email protected]/context.go:169 (0x1a62627)
github.com/fancybits/channels-server/http.go:411 (0x1a62364)
github.com/gin-gonic/[email protected]/context.go:169 (0x1a622c3)
github.com/fancybits/channels-server/http.go:388 (0x1a622a8)
github.com/gin-gonic/[email protected]/context.go:169 (0xafb2eb)
github.com/fancybits/channels-server/http.go:363 (0x1a61f73)
github.com/gin-gonic/[email protected]/context.go:169 (0x1a61b7b)
github.com/fancybits/channels-server/http.go:325 (0x1a61358)
github.com/gin-gonic/[email protected]/context.go:169 (0xb0689f)
github.com/gin-gonic/[email protected]/recovery.go:107 (0xb06884)
github.com/gin-gonic/[email protected]/context.go:169 (0xb05c7f)
github.com/gin-gonic/[email protected]/logger.go:240 (0xb05c48)
github.com/gin-gonic/[email protected]/context.go:169 (0xafb2eb)
github.com/gin-contrib/[email protected]/sessions.go:54 (0x1a64caf)
github.com/gin-gonic/[email protected]/context.go:169 (0x1ae878f)
github.com/fancybits/channels-server/http.go:587 (0x1ae8774)
github.com/gin-gonic/[email protected]/context.go:169 (0xb04e23)
github.com/gin-gonic/[email protected]/gin.go:598 (0xb04b4c)
github.com/gin-gonic/[email protected]/gin.go:554 (0xb0476b)
net/http/server.go:2938 (0x6e39fb)
net/http/server.go:2009 (0x6df997)
runtime/asm_arm64.s:1197 (0x474973)

2024/06/20 13:03:55.701958 [SYS] Done waiting on dependencies

2024/06/20 13:03:57 [Recovery] 2024/06/20 - 13:03:57 panic recovered:
runtime error: invalid memory address or nil pointer dereference
runtime/panic.go:261 (0x4552db)
runtime/signal_unix.go:861 (0x4552a8)
github.com/fancybits/channels-server/dvr/db_jobs.go:158 (0x1493180)
github.com/fancybits/channels-server/http_api_utils.go:159 (0x1a6974b)
github.com/fancybits/channels-server/http_api_job.go:14 (0x1ae5d77)
github.com/gin-gonic/[email protected]/context.go:169 (0x1a62627)
github.com/fancybits/channels-server/http.go:411 (0x1a62364)
github.com/gin-gonic/[email protected]/context.go:169 (0x1a622c3)
github.com/fancybits/channels-server/http.go:388 (0x1a622a8)
github.com/gin-gonic/[email protected]/context.go:169 (0xafb2eb)
github.com/fancybits/channels-server/http.go:363 (0x1a61f73)
github.com/gin-gonic/[email protected]/context.go:169 (0x1a61b7b)
github.com/fancybits/channels-server/http.go:325 (0x1a61358)
github.com/gin-gonic/[email protected]/context.go:169 (0xb0689f)
github.com/gin-gonic/[email protected]/recovery.go:107 (0xb06884)
github.com/gin-gonic/[email protected]/context.go:169 (0xb05c7f)
github.com/gin-gonic/[email protected]/logger.go:240 (0xb05c48)
github.com/gin-gonic/[email protected]/context.go:169 (0xafb2eb)
github.com/gin-contrib/[email protected]/sessions.go:54 (0x1a64caf)
github.com/gin-gonic/[email protected]/context.go:169 (0x1ae878f)
github.com/fancybits/channels-server/http.go:587 (0x1ae8774)
github.com/gin-gonic/[email protected]/context.go:169 (0xb04e23)
github.com/gin-gonic/[email protected]/gin.go:598 (0xb04b4c)
github.com/gin-gonic/[email protected]/gin.go:554 (0xb0476b)
net/http/server.go:2938 (0x6e39fb)
net/http/server.go:2009 (0x6df997)
runtime/asm_arm64.s:1197 (0x474973)

2024/06/20 13:04:08.950405 [DVR] Recording engine started in /media/DVR
2024/06/20 13:04:08.996373 [SYS] Bonjour service running for dvr-server.local. [192.168.1.8]
2024/06/20 13:04:10.263800 [ERR] Could not create backup: stat /media/DVR: no such file or directory
2024/06/20 13:04:21.502544 [IDX] Pruned 192 expired airings from XMLTV-IPTVRS6 in 86ms.
2024/06/20 13:04:21.940472 [IDX] Pruned 309 expired airings from X-VIRTUAL in 437ms.
2024/06/20 13:04:22.254593 [IDX] Pruned 378 expired airings from X-M3U in 313ms.
2024/06/20 13:09:05.059270 [SYS] Created database snapshot: backup-20240620.120904
2024/06/20 13:09:05.059691 [SYS] Removing old backup backup-20240522.012838
2022/12/20 18:17:07.815097 [SYS] Starting Channels DVR v2024.05.07.1442 (linux-arm64 pid:367) in /mnt/data/channels-dvr/data
2022/12/20 18:17:08.022308 [SYS] Started HTTP Server on 8089
2022/12/20 18:17:08.093196 [SYS] Waiting on dependencies network-online.target time-sync.target
2022/12/20 18:17:11.876498 [SYS] Waiting on dependencies time-sync.target
2024/06/20 13:12:03.946888 [SYS] Done waiting on dependencies

2024/06/20 13:12:10 [Recovery] 2024/06/20 - 13:12:10 panic recovered:
runtime error: invalid memory address or nil pointer dereference
runtime/panic.go:261 (0x4552db)
runtime/signal_unix.go:861 (0x4552a8)
github.com/fancybits/channels-server/dvr/db_jobs.go:158 (0x1493180)
github.com/fancybits/channels-server/http_api_utils.go:159 (0x1a6974b)
github.com/fancybits/channels-server/http_api_job.go:14 (0x1ae5d77)
github.com/gin-gonic/[email protected]/context.go:169 (0x1a62627)
github.com/fancybits/channels-server/http.go:411 (0x1a62364)
github.com/gin-gonic/[email protected]/context.go:169 (0x1a622c3)
github.com/fancybits/channels-server/http.go:388 (0x1a622a8)
github.com/gin-gonic/[email protected]/context.go:169 (0xafb2eb)
github.com/fancybits/channels-server/http.go:363 (0x1a61f73)
github.com/gin-gonic/[email protected]/context.go:169 (0x1a61b7b)
github.com/fancybits/channels-server/http.go:325 (0x1a61358)
github.com/gin-gonic/[email protected]/context.go:169 (0xb0689f)
github.com/gin-gonic/[email protected]/recovery.go:107 (0xb06884)
github.com/gin-gonic/[email protected]/context.go:169 (0xb05c7f)
github.com/gin-gonic/[email protected]/logger.go:240 (0xb05c48)
github.com/gin-gonic/[email protected]/context.go:169 (0xafb2eb)
github.com/gin-contrib/[email protected]/sessions.go:54 (0x1a64caf)
github.com/gin-gonic/[email protected]/context.go:169 (0x1ae878f)
github.com/fancybits/channels-server/http.go:587 (0x1ae8774)
github.com/gin-gonic/[email protected]/context.go:169 (0xb04e23)
github.com/gin-gonic/[email protected]/gin.go:598 (0xb04b4c)
github.com/gin-gonic/[email protected]/gin.go:554 (0xb0476b)
net/http/server.go:2938 (0x6e39fb)
net/http/server.go:2009 (0x6df997)
runtime/asm_arm64.s:1197 (0x474973)




2024/06/20 13:12:10 [Recovery] 2024/06/20 - 13:12:10 panic recovered:
runtime error: invalid memory address or nil pointer dereference
runtime/panic.go:261 (0x4552db)
runtime/signal_unix.go:861 (0x4552a8)
github.com/fancybits/channels-server/dvr/db_files.go:275 (0x1490e3c)
github.com/fancybits/channels-server/dvr/db_files.go:263 (0x149142b)
github.com/fancybits/channels-server/dvr/db_files.go:332 (0x14913f0)
github.com/fancybits/channels-server/http_api_utils.go:172 (0x1a698c7)
github.com/fancybits/channels-server/http_api.go:23 (0x1ae742f)
github.com/gin-gonic/[email protected]/context.go:169 (0x1a69673)
github.com/fancybits/channels-server/http_api_utils.go:154 (0x1a695c0)
github.com/gin-gonic/[email protected]/context.go:169 (0x1a62627)
github.com/fancybits/channels-server/http.go:411 (0x1a62364)
github.com/gin-gonic/[email protected]/context.go:169 (0x1a622c3)
github.com/fancybits/channels-server/http.go:388 (0x1a622a8)
github.com/gin-gonic/[email protected]/context.go:169 (0xafb2eb)
github.com/fancybits/channels-server/http.go:363 (0x1a61f73)
github.com/gin-gonic/[email protected]/context.go:169 (0x1a61b7b)
github.com/fancybits/channels-server/http.go:325 (0x1a61358)
github.com/gin-gonic/[email protected]/context.go:169 (0xb0689f)
github.com/gin-gonic/[email protected]/recovery.go:107 (0xb06884)
github.com/gin-gonic/[email protected]/context.go:169 (0xb05c7f)
github.com/gin-gonic/[email protected]/logger.go:240 (0xb05c48)
github.com/gin-gonic/[email protected]/context.go:169 (0xafb2eb)
github.com/gin-contrib/[email protected]/sessions.go:54 (0x1a64caf)
github.com/gin-gonic/[email protected]/context.go:169 (0x1ae878f)
github.com/fancybits/channels-server/http.go:587 (0x1ae8774)
github.com/gin-gonic/[email protected]/context.go:169 (0xb04e23)
github.com/gin-gonic/[email protected]/gin.go:598 (0xb04b4c)
github.com/gin-gonic/[email protected]/gin.go:554 (0xb0476b)
net/http/server.go:2938 (0x6e39fb)
net/http/server.go:2009 (0x6df997)
runtime/asm_arm64.s:1197 (0x474973)

2024/06/20 13:12:15.928315 [DVR] Recording engine started in /media/DVR
2024/06/20 13:12:15.941317 [SYS] Bonjour service running for dvr-server.local. [192.168.1.8]
2024/06/20 13:12:17.398680 [ERR] Could not create backup: stat /media/DVR: no such file or directory
2024/06/20 13:12:28.674192 [IDX] Pruned 13 expired airings from X-VIRTUAL in 601ms.
2024/06/20 13:12:28.878826 [IDX] Pruned 8 expired airings from X-M3U in 204ms.

Update. The server seems to be running OK again now. I had to re-download the guide data, but clients can now connect again and everything seems to be OK.

I'd like to work out was the issue was though.

The panics are just offshoots from the fact that it could not not read/write from the drive, which was a Raspberry Pi issue.

You seem pretty invested in Channels. I would highly suggest purchasing a simple cheap Intel n95 mini pc from Amazon and ditching the Raspberry Pi.

The Pi is great for light single person usage that doesn't have a lot of demands. And a great platform to try Channels DVR Server out if that's all you have. But Pis just are not reliable enough for things like this and with Intel n95/n100 mini PCs being about $120 when you catch them on sale, it's just not worth it at all if you're relying highly on Channels.

Yes, I must admit I have been thinking about if I should upgrade from the Pi and have already been looking at other possible hardware. Ironically the main thing that stopped me is that Channels on the Pi has been running absolutely flawlessly until now.

As you say, I am fully invested in Channels, so maybe this glitch is the impetus I need to bite the bullet and upgrade.

If I do switch to say an n95 and plug my existing hard drive in to that will there be any issue in that the HDD has the boot info for the raspi on it?

If you’re using the Raspberry Pi image, the. You won’t be able to just boot off of it on something else.

But you should be able to preserve the storage.

The proper setup on a mini pc would be a small SSD for the operating system and Channels running on, with a large USB drive attached for storage.

No, I didn't expect the new system to boot off the old drive, I just didn't know if it having a boot sector on there for a Pi would cause an issue when just using it as storage on something else.

I actually have a 1TB Crucial SSD lying around that was in my old Enigma2 satellite PVR, so if I set up a new mini pc with that SSD for the operating system and plug my existing HDD into USB 3, it should preserve all my existing stuff and I'd be good to go?