SOLVED unable to add new catalog "unable to write file " error message

abraham_v

Dabbler
Joined
May 15, 2021
Messages
16
I just installed (re-installed?) TrueNAS scale on a laptop and am trying to add TrueCharts as a new catalog, but am getting the following error,

Code:
Error:
[EINVAL] catalog_create.label: Failed to validate catalog:
[EFAULT] Failed to clone 'https://github.com/truecharts/catalog' repository at '/var/run/middleware/ix-applications/validate_catalogs/github_com_truecharts_catalog_main' destination:
[EFAULT] Failed to clone 'https://github.com/truecharts/catalog' repository at '/var/run/middleware/ix-applications/validate_catalogs/github_com_truecharts_catalog_main' destination:
Cloning into '/var/run/middleware/ix-applications/validate_catalogs/github_com_truecharts_catalog_main'...
error: unable to write file stable/shiori/app_versions.json
error: unable to write file stable/shiori/item.yaml
error: unable to write file stable/shlink-web-client/9.1.0/CHANGELOG.md
error: unable to write file stable/shlink-web-client/9.1.0/Chart.yaml
...
<SIMILAR ERROR LINES REMOVED>
...
error: unable to write file stable/zwavejs2mqtt/18.1.0/templates/NOTES.txt
error: unable to write file stable/zwavejs2mqtt/18.1.0/templates/common.yaml
error: unable to write file stable/zwavejs2mqtt/app_versions.json
error: unable to write file stable/zwavejs2mqtt/item.yaml
Updating files: 100% (15974/15974)
Updating files: 100% (15974/15974),
done.
fatal: unable to checkout working tree
warning: Clone succeeded, but checkout failed. You can inspect what was checked out with 'git status' and retry with 'git restore --source=HEAD :/'


This is the version of TrueNAS scale that I have =
Code:
TrueNAS-SCALE-23.10.1



According to the error message, it looks like write permissions are missing. It *is* possible that I made a configuration mistake somewhere, but before I completely nuke the system and re-install, is there any simple way to fix this issue?


At the moment, my assumption is that since the error message indicates an "unable to write" issue, the problem has nothing to do with TrueCharts.

-Abraham V.
 
Last edited:

abraham_v

Dabbler
Joined
May 15, 2021
Messages
16
Some good news. I was able to solve my problem ... the bad news is that the solution is very hacky and very, VERY custom.

A bit of background first - my primary need was to install and experiment with a few Apps that are not present in the default TrueNAS Scale catalogue. Notably - Plex, Kavita, Calibre ... etc. Basically, I do not need all the apps that TrueCharts bundles itself with.

The error message was really really weird. It initially gave me the impression that I screwed up permissions on either my Pool or Dataset. But after a bit of investigation, I was able to conclude that this was not the case.

What I did was clone the TrueNAS repo on my personal computer - it worked; proving that my network was fine. And then I logged into TrueNAS and attempted to clone into the folder indicated in the error message.

The Exact Same Error showed up. The biggest difference, is that TrueNAS did not clean up the folder after the error so I could explore a bit. And I came to the conclusion that I ran out of disc space.

Ran. Out. Of. Disc. Space.

:facepalm:

Granted, the TrueCharts repo is very big - about 1.2 GB on my personal comptuer when I clone it, but the boot disc that I installed TrueNAS on has a size of 32GB. Which should be more than enough!

What appears to be happening, is that TrueNAS is creating some kind of `tmpfs` filesystem and cloning new cataloges into it. Did a quick search of the official documentation, but could not find any way to increase the size of this `tmpfs` system.

So I tackled the problem from the other direction - if the git repository is too big, why not fork it, delete apps that I do not care about and attempt to import that instead? Here is the repo I made,


There was a LOT of git-level surgery involved to shrink it's size; deleting the original `.git` folder to purge history, deleting folders of trains that I did not care about ... etc.

Am happy to report that it solved MY problem. It's not really a long-term solution and I cannot recommend this for anyone needing stability.

For now, I'm going to mark this thread as "solved" ... but if anyone knows how to increase the size of the `tmpfs` filesystem that TrueNAS scale creates, I'd love to know.

-Abraham V.
 

stshalson

Cadet
Joined
Jan 13, 2024
Messages
1
This tmpfs which system creates is a ramdisc with 10% of total system memory. Its nothing we can complain to trucharts about because the minimum system requirements say you need at least 16GiB of RAM.
I have 8GiB and tmpfs created was around 780M which wasn't sufficient for trucharts repo.

What fixed the problem was changing ramdisc size as you mentioned:
Code:
sudo mount -o remount,size=2048m /run

after that `df -h` should say /run has 2G of space.

Hope it solved the issue
 

jayj

Cadet
Joined
Jan 13, 2024
Messages
1
Wow, I just needed this today, thanks for the post. I indeed only have 8G of RAM, and this seems to have fixed my issue adding truecharts, at least the catalog is still “validating” but at least not throwing that error. Thank you!
 
Top