Install old DietPi without auto-update? Topic is solved

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
Post Reply
User avatar
feardamhan
Posts: 47
Joined: Tue Apr 28, 2020 12:51 pm

Install old DietPi without auto-update?

Post by feardamhan »

Hi Folks

Have been troubleshooting a problem that arose in the last few days on one of my dietpi installs immediately after running apt upgrade which resulted in emby-server being unable to write files to a mounted nas share (over CIFS). Was working perfectly up to the updated

Have already trashed the system and reinstalled to rule stuff out, and still having the problem.

Would like to do back to the original dietpi image I first used to setup this machine to rule out something that changes along the way. I have the 6.28 image I used.

Is there anyway I can prevent the system from auto-updating to 6.34.3 (and any associated apt upgrades) as part of the install process? I cant find a clean way to revery to 6.28 to test my theories, as it keeps updating as part of the first boot process.

Any tips?
User avatar
Joulinar
Posts: 5620
Joined: Sat Nov 16, 2019 12:49 am

Re: Install old DietPi without auto-update?

Post by Joulinar »

Hi,

usually there is no way to downgrade to a lover version.

Maybe @MichaIng can share a way how to prevent the initial update.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
User avatar
MichaIng
Site Admin
Posts: 3231
Joined: Sat Nov 18, 2017 6:21 pm

Re: Install old DietPi without auto-update?

Post by MichaIng »

It would be much more productive when we helped to investigate the issue why Emby cannot write to the CIFS share. Sounds like a permission issue, and probably others suffer as well from it while we might be able to implement a workaround of fix right into DietPi. Blocking system and security upgrades for the whole server only because of a single issue really is not something I'm keen helping with, where other users might copy&paste the same, causing just a bunch of other issues that are fixed already with current DietPi and APT packages ;).

And did you try to reinstall Emby? Probably the newest version and refreshing group permissions solves the issue: dietpi-software reinstall 41
User avatar
feardamhan
Posts: 47
Joined: Tue Apr 28, 2020 12:51 pm

Re: Install old DietPi without auto-update?

Post by feardamhan »

Thanks for the replies

I’m all for getting to the bottom of the issue! I’m not a fan of staying on old versions either.

It’s not permissions. I’m confident I’ve proven that beyond a doubt. Can share details of tests I’ve run if you want.

I did try the upgrade of emby. Didn’t fix the issue.

I also tried a Raspberry Pi OS install with the same versions of emby (old and updated) and that has no problem.

So I feels to me like something in the dietpi update. I can reproduce easily by reinstalling dietpi in the morning (it’s 1am here at the moment).

Once setup I can post any logs and perform any trouble shooting steps you suggest.

Do you want me to go with the version of emby installed by dietpi (4.5.4 I think) or will I go with latest version? I don’t think it matters as both show same symptom and neither have the issue on raspbian.
User avatar
Joulinar
Posts: 5620
Joined: Sat Nov 16, 2019 12:49 am

Re: Install old DietPi without auto-update?

Post by Joulinar »

for testing, you could change the permission the CIFS share is mounted with.

Anyway I did a test installation with DietPi 7.0 Beta on my RPi3B+ 32bit. Emby is working without issues. I could mount my MP3 library from my Synology NAS via CIFS and was able to play music on a Android mobile phone using Emby App

BTW: Emby 4.5.4 is the latest version available according Emby blog https://emby.media/community/index.php? ... emby-blog/
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
User avatar
feardamhan
Posts: 47
Joined: Tue Apr 28, 2020 12:51 pm

Re: Install old DietPi without auto-update?

Post by feardamhan »

So I'm really confident the permissions really are not an issue
  • The nas has a user called emby.
  • The shared is mounted with a emby.
  • The file permissions are owned by emby and set to 777
  • When logged in as the emby at command prompt I can add/edit/delete files from the share.
  • emby-server is running under emby
there is no issue viewing or playing files, but if I want emby to scrape and save metadata as nfo, its failing with permission denied.

Here is the thread where I have been working with the emby folks. You can see all the permission steps I have tested there as well as the errors encountered by both emby scraping and the emby backup utility

https://emby.media/community/index.php? ... -are-fine/

4.5.4 seems to be latest installable via dietpi-software, but there is a 4.6.0.26 beta listed for Armv7 (armhf) which I have also tried.
https://emby.media/linux-server.html
User avatar
Joulinar
Posts: 5620
Joined: Sat Nov 16, 2019 12:49 am

Re: Install old DietPi without auto-update?

Post by Joulinar »

as I said, for me emby is working together with a mounted SAMBA share. I can steam music to my mobile device using emby app
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
User avatar
MichaIng
Site Admin
Posts: 3231
Joined: Sat Nov 18, 2017 6:21 pm

Re: Install old DietPi without auto-update?

Post by MichaIng »

Unless the file names change, DietPi-Software always installs the latest upstream Emby version. To update it, a simple reinstall works: dietpi-software reinstall 41

Our install btw is the official package, nearly unmodified. All we do is adding the emby user to a few more groups so that DRM and media access permissions are guaranteed, so it's most likely not an issue of Emby but of the CIFS mount options.

Can you show the service log when trying to access the CIFS mount?

Code: Select all

journalctl -u emby-server
User avatar
feardamhan
Posts: 47
Joined: Tue Apr 28, 2020 12:51 pm

Re: Install old DietPi without auto-update?

Post by feardamhan »

Oh. I mean to say, re permissions.

Setting up the exact same config ie
- mount point created / owned by same user /group
- fstab using the exact same mount user (string copied and pasted)
- same version of emby
- emby user ID /group config identical

When scraping / attempting config backup via plugin all works flawlessly

With DietPi 6.34.3, emby encounters errors similar to this (this example is from backup. scraping to nfo does the same thing)

Code: Select all

*** Error Report ***
	Version: 4.5.4.0
	Command line: /opt/emby-server/system/EmbyServer.dll -programdata /var/lib/emby -ffdetect /opt/emby-server/bin/ffdetect -ffmpeg /opt/emby-server/bin/ffmpeg -ffprobe /opt/emby-server/bin/ffprobe -restartexitcode 3 -updatepackage emby-server-deb_{version}_armhf.deb
	Operating system: Linux version 5.10.11-v7+ (dom@buildbot) (arm-linux-gnueabihf-gcc-8 (Ubuntu/Linaro 8.4.0-3ubuntu1) 8.4.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #1399
	Framework: .NET Core 3.1.8
	OS/Process: arm/arm
	Runtime: opt/emby-server/system/System.Private.CoreLib.dll
	Processor count: 4
	Data path: /var/lib/emby
	Application path: /opt/emby-server/system
	System.UnauthorizedAccessException: System.UnauthorizedAccessException: Access to the path '/mount/infrastructure/emby_config/test/Emby Backup - 2021-02-17 23.10.0 - Auto/profile.txt' is denied.
	 ---> System.IO.IOException: Permission denied
	   --- End of inner exception stack trace ---
	   at System.IO.FileStream.WriteNative(ReadOnlySpan`1 source)
	   at System.IO.FileStream.FlushWriteBuffer()
	   at System.IO.FileStream.Dispose(Boolean disposing)
	   at System.IO.Stream.Close()
	   at System.IO.StreamWriter.CloseStreamFromDispose(Boolean disposing)
	   at System.IO.StreamWriter.Dispose(Boolean disposing)
	   at System.IO.TextWriter.Dispose()
	   at System.IO.File.WriteAllText(String path, String contents)
	   at Emby.Server.Implementations.IO.ManagedFileSystem.WriteAllText(String path, String text)
	   at MBBackup.ServerEntryPoint.ExecuteBackup(BackupProfile settings, CancellationToken cancellationToken, IProgress`1 progress, Boolean isAuto)
	   at MBBackup.Entities.ScheduledBackupTask.Execute(CancellationToken cancellationToken, IProgress`1 progress)
	   at Emby.Server.Implementations.ScheduledTasks.ScheduledTaskWorker.ExecuteInternal(TaskOptions options)
	Source: System.Private.CoreLib
	TargetSite: Void WriteNative(System.ReadOnlySpan`1[System.Byte])
	InnerException: System.IO.IOException: Permission denied
	Source: 
User avatar
Joulinar
Posts: 5620
Joined: Sat Nov 16, 2019 12:49 am

Re: Install old DietPi without auto-update?

Post by Joulinar »

well it is a permission issue

Code: Select all

Access to the path '/mount/infrastructure/emby_config/test/Emby Backup - 2021-02-17 23.10.0 - Auto/profile.txt' is denied.
usually DietPi use /mnt to mount shares
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Post Reply