No apps offered to install on the webadmin page

Hello all,
I have just installed YunoHost and have added a few apps to test. After successfully resolving an accessibility issue ("foo.noho.st" NOT accessible in local Wi-Fi -- but IS accessible externally) now all installed apps have disappeared on the webadmin page.

My YunoHost server

Hardware: Raspberry Pi 4 8GB
YunoHost version: 4.3.6.2
I have access to my server : Through SSH and through the webadmin
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : no

Description of my issue

  • On the webadmin page, it says ā€œThere are no installed appsā€, although I had installed several apps
  • On the userā€™s portal, however, these apps are still available and are also functioning normally

When I try to install a new app on the webadmin page, I get this error:

What did I do wrong?

Hi Avenor,

Welcome to the forums!

Pity your introduction to Yunohost is troubled by these problems.

I would try to remove the file mentioned in your screenshot, and see if that resolves (pant of) the matter:

$ sudo rm /var/cache/yunohost/repo/default.json

The file should not become corrupted of course. Seeing you run off a Raspberry Pi, is Yunohost installed on the embedded storage or on a uSD-card?

Hello wbk,
thank you for the welcome, and the newb-friendly command :slight_smile:

I executed the command you gave me and the apps are back on the webadmin page.

But my enthusiasm was premature: When I click the +Install button, the page with the apps offered for installing didnā€™t load (I did reboot the server, but that didnā€™t help).

Iā€™m running YunoHost off an SD card.

I love the YunoHost concept, and itā€™s actually really interesting to learn all this hands-on stuff ā€¦ so no worries about some difficulties along the way.

I think you can just open the ā€œUpgrade the systemā€ section just so that it refreshes the app catalog, then go back to the App install section

Thanks. Unfortunately that didnā€™t work. I opened ā€œSystem updateā€ and Yunohost did some things, but finished with an error (see screenshot) and also with ā€œNothing to do, all is up-to-dateā€.
After clicking +Install, there are still no apps offered for installation.

BTW, in case this is important, the issues started when suddenly Rainloop had lost its incoming emails after I deleted just a few of them. So I thought Iā€™d simply reinstall it - and then noticed all the above described problems.

Hereā€™s the screenshot of what happened after I opened ā€œSystem updateā€

Just tried to uninstall apps, that still works. But Iā€™m getting a strange error in the log about ā€œNo space left on deviceā€ :thinking:
Something seems broken. Should I perhaps reinstall the whole thing?
image

Great attitude :slight_smile:

There are three things that attract my attention:

  • No space left on device, as you already noticed;
  • Running off the SD-card;
  • Failed signatures during update of repository

If the SD card is too big to be full already, combined with other errors, it could be the SD card is (on the way to be) broken. You might shut down the Yunohost and have it fsckā€™d on another computer (preferably Linux, I donā€™t know how well Windows and Mac handle ext4 these days).

The signatures could have to do with the Debian having a new stable version a couple of months back. I donā€™t remember it giving a signature error, but you could have a look at Updates may fail because "Repository [...] changed its 'Suite' value from 'stable' to 'oldstable'"

My suspicion is that an incomplete shutdown happened somewhere along the way. At some point I noticed that ā€œrebootā€ or ā€œshutdown -rā€ didnā€™t seem to work any more, so I just had to assume the shutdown had happened before unplugging and replugging the Raspberry Pi. I guess that something important got broken that way.

Since Iā€™m at the beginning of setting this up, and nothing significant was installed yet, I just decided to start over with a new installation, which works fine for now.

I do have a Linux machine at hand: Can you tell me how I check the SD card there, just in case? (Iā€™m a bit of a beginner ā€¦)?

Thanks!

Good that it works fine now.

That would be sudo fsck.ext4 /dev/sd.... for the device that has your SD card. In my computer it shows up as /dev/sdg1, and on my laptop as /dev/sdb1. It depends a bit on how many harddisks are in your system.

Four commands help to find the right device,

  • lsblk lists all block devices (harddisk-like devices)
  • df -h lists filesystems, their size and free space. If your harddisk is > 100 GB, and your SD card 16 or 32 GB, it is easy to recognize which is which
  • fdisk -l also lists devices and their sizes, and gives the name/model as well
  • start tail -f /var/log/messages before inserting the SD card; it will give some (ā€˜liveā€™) messages about what the computer recognizes while you insert the card, among which the location of the device

If you come to a dead end with that, start a new thread to ask about it!

For now, have a nice time with your Yunohost :slight_smile:

Thanks a lot, wbk, and others who helped!

1 Like

Hi @wbk, I have another question: The same error occurred again a few days after reinstalling. Now I want to check my SD card.

I identified it to be:
image

But running sudo fsck.ext4 /dev/mmcblk0 (or ā€¦1, or ā€¦2) gave me an ā€œā€¦ is in useā€ error.

I read somewhere that I need to unmount first. But unmounting didnā€™t work either:

image

Do you have another tip how I can make fsck work on this SD card? (I think the problem has to do with this beeing a bootable SD card)

Thanks!

Yes, it has to do with that; more specific, the system is running on the card. It can not be unmounted while the system is running.

There are two options, for each of them you have to power down your Yunohost:

  1. Let the RPi/Yunohost do the filesystem check by itself: sudo touch /forcefsck will create an empty file ā€˜forefsckā€™ in the root directory, Linux will recognize it while booting and do the check;
  2. Let you laptop/desktop do the filesystem check; power down your Yunohost, put the SD-card in your (Linux) computer, and have it checked.

The SD-card will have some markings that give a general impression of the performance. Preferably one of the markings is ā€œA1ā€ or ā€œA2ā€ (ā€œApplication performance classā€, link does not hit the right sub-chapter), those cards are sold especially for running programs (as opposed to storing photos/music/videos).

I think this is a misunderstanding here, wbk. I should have specified that I have not tried to run fsck while the SD card is in the running YunoHost.

Rather, I had removed the SD card and put it into a laptop that runs Ubuntu. So the Linux system from which I wanted to test the SD card is definitely not running from the SD card. Thatā€™s why I was so surprised that it would not let me run fsck on the SD card.

Essentially I have tried exactly your suggestion #2 above, and I got the errors I screenshotted in the previous post.

Was I doing something wrong on my laptop?

P.S.: The SD card is a SanDisk ultra 32 GB and it says ā€œA1ā€ on it.

Ah, now I pay attention to the screenshots, I think I know what the issue is.

The filesystem resides on the partition (/dev/mmcblk0p1), not on the disk (/dev/mmcblk0). Maybe Ubuntu automounts removable media, in that case unmounting is needed as you tried (but for the partition instead of the disk):

$ sudo umount /dev/mmcblk0p1/ 
$ sudo fsck.ext4 /dev/mmcblk0p1/

And then the same for mmcblk0p2.

Hm, actually I did try also those umount commands with partitions mmcblk1 and mmcblk2:

I just cut off those two commands from the screenshot because they showed the same result.

Hence my confusion: My Ubuntu Linux claims that the card as such, as well as its partitions, canā€™t be unmounted because they are ā€œin useā€ - but how can they be ā€œin useā€ if I just put the card in the slot after Ubuntu was already up and running?

Sorry this is so vexing ā€¦

Should I simply reformat the SD and then check it? Iā€™ll probably have to reinstall YunoHost anyway because of a litany of errors already showing up in the webadmin Diagnosis.

For the record, note the exact spelling: mmcblk0p1

When the card is automounted, it could be that some process keeps the partition busy. Before issuing umount, which lines does mount|grep mmc return?

After unmounting, opened files can be viewed with lsof. If the card got mounted at /media/ :

$ lsof | grep media

to get a list of all files that are opened that have something of ā€˜mediaā€™ in the name or in the path.

I really appreciate your patience, wbk! I did everything over from scratch and now got this to work as follows:

When I put in the SD card to the Ubuntu laptop and say mount | grep mmc then I get this:

Then I umount and fsck the first partition and get:

Not sure how to interpret the output, but it looks like an error to me. Does that mean the SD card is corrupted?

The second partition looks better, it says ā€œcleanā€
image

If I run lsof | grep mediaI get a huge list of output, but I guess that command is no longer necessary, because the fsck now did run?

The only ā€œunusualā€ thing I ever did is that I once triggered a YunoHost reboot from the terminal with reboot instead of using the webadmin to reboot. Could that have wrecked the SD card? Or do you think itā€™s a physical damage in the SD card?

Thanks!

Hi, nice that you got progress!

Not in this case. When you have a look at your first screenshot, with mount|grep mmc, you see that the first line has type vfat. To check the partition, use fsck.vfat instead of fsck.ext4 :
sudo fsck.vfat /dev/mmcblk0p1

Seeing the names of the partitions, I suspect that p1 only got /boot for your RPi. No Yunohost-specific data is stored there; even if the partition were corrupted, it would not interfere with the app catalog.

The second partition should be fine, as far as file structure is concerned.

Correct. It will list all files that are in use and got something with media in the name. If you have a problem unmounting a partition, you can grep for something more specific, in this case for example lsof | grep '/media/peter/rootfs'.

It is not unusual and perfectly valid. The webadmin will call, via via, the same command.

It could be, but I would expect the integrity of the filesystem to suffer as well in that case.

I used the same cards in Orange Pi Zeroā€™s, mostly with no problems but sometimes it would get corrupted. I donā€™t know which (usage) factors contribute to failure; the usage patterns were similar for cards that would keep running and those that failed. The failed cards could afterwards be used in cameraā€™s with no problem (apart from being on the slow side, no matter the A1 etc. class).

Just a thought: when reading and writing to the card, it hits two locations, so to speak, the index and the actual data area. The index will see heaviest usage, the data area less so. Either could go bad.
Now imagine index location ā€˜aā€™ for got bad, and it points to data location ā€˜bā€™. If you removed the files in the areas related to ā€˜aā€™ and ā€˜bā€™, and recreated them, it could be (depending algoritms) that they are in the same area.
Maybe if you were to rename them instead of deleting, it would occupy the bad area. New files would be created in another (perhaps good) area.

Itā€™s a bit of speculation. If the error is again about /var/cache, you could try renaming /var/cache to /var/cache_bad, and make a new /var/cache directory.
Another thing could be that the RPi is writing too fast for the SD card to keep up, triggering ā€˜card fullā€™ in one way or another.

1 Like

Here is what I got for checking fsck.vfat for the first partition:


So the ā€œdirty bitā€ is cleaned up :slight_smile:

I wonder how that ā€œdirty bitā€ happened, though :thinking:

Iā€™ll now put the card back into the Raspberry and see if things work, maybe using your suggestion about /var/cache ā€“ and if not, I think Iā€™ll have to reinstall everything. Thatā€™s not (yet) a big problem, as Iā€™m just playing around. But if I eventually want to use and rely on YunoHost, yet get a crash every other week, then it wouldnā€™t be a viable solution.

So before I get serious with it, Iā€™ll have to experiment with another SD card, to exclude the possibility that this one is corrupted. I am really not aware that I knowingly destroyed anything, I was very cautious.

Thank you so much, wbk, for your extraordinary patience walking me through so many details. I really learnd a lot, youā€™re a great teacher to the YunoHost (and Linux) newbies!

1 Like

Update: The ā€œcleaned upā€ card boots normally in the Raspberry. But still no installed apps show up, and I cannot go to the ā€œ+Installā€ page either. I get the exact same error as in the very first post in this thread.

I followed your advice and renamed /var/cache to /var/cache_bad.

Aaaand ā€¦ it worked! Now the installed apps are all showing, and I can also access the ā€œ+Installā€ page where apps are offered to install.

If I undestood you correctly, I should just leave the cache_bad directory as is, so that in case there are errors in that area, the space counts as occupied and the error shouldnā€™t have any practical relevance ā€“ unless more errors appear elsewhere.

Bravo, thanks, wbk, for helping againg!