Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't install Java on RaspberryPi Nextcloud (no Docker) #4106

Open
Albusoline opened this issue Dec 8, 2024 · 5 comments
Open

Can't install Java on RaspberryPi Nextcloud (no Docker) #4106

Albusoline opened this issue Dec 8, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@Albusoline
Copy link

Dear vitormattos.
Thank you for your comment and your work in #1798
However, even after a few updates of libresign, the issue seems to be still not resolved?

php 8.1
Nextcloud: 29.0.3
LibreSign: 9.7.3

I installed everything by using:
sudo -u www-data php8.1 occ libresign:uninstall --all
sudo -u www-data php8.1 occ files:scan-app-data libresign

Then I deleted the libresign folder in data, then

sudo -u www-data php8.1 occ libresign:install --all

Then I rebooted the server.

However, when using occ libresign:configure:check I get
grafik

Any ideas?
I quickly checked the version of my Raspberry pi:

Linux version 6.1.21-v8+ (dom@buildbot) (aarch64-linux-gnu-gcc-8 (Ubuntu/Linaro 8.4.0-3ubuntu1) 8.4.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023

@Albusoline Albusoline added the feature-request New feature request label Dec 8, 2024
@github-project-automation github-project-automation bot moved this to 0. Needs triage in Roadmap Dec 8, 2024
@vitormattos vitormattos added bug Something isn't working and removed feature-request New feature request labels Dec 19, 2024
@vitormattos
Copy link
Member

@Albusoline we will need to investigate together what's happening.

First, you don't need to restart your server when run the libresign:linstall because this command only download the dependencies that LibreSign need to run, save this at data folder and do some changes at database.

I want to check what's happening at your environment to get the "Invalid hash of binaries files" message. To check this you will need to add a log row and get the output of log file related to LibreSign.

Follow the suggested steps to do this:

Open the file libresign/lib/Service/Install/ConfigureCheckService.php
At method getErrorAndTipToResultOfVerify you will need to identify the last return:

'Your signature data is empty.',
"Sounds that you are running from source code of LibreSign.\nEnable debug mode by: occ config:system:set debug --value true --type boolean",
];
}
}
return [
'Invalid hash of binaries files.',
'Run occ libresign:install --all',
];

And before the last return you will add the follow row:

\OCP\Server::get(\Psr\Log\LoggerInterface::class)->error('Invalid hash of binaries files', ['result' => $result]);

The final code will be:

					'Your signature data is empty.',
					"Sounds that you are running from source code of LibreSign.\nEnable debug mode by: occ config:system:set debug --value true --type boolean",
				];
			}
		}
		\OCP\Server::get(\Psr\Log\LoggerInterface::class)->error('Invalid hash of binaries files', ['result' => $result]);
		return [
			'Invalid hash of binaries files.',
			'Run occ libresign:install --all',
		];

After this, do a tail into the file data/nextcloud.log into a separated window.

And run the command:

occ libresign:configure:check

If your scenario maintained, you will see a new entry at nextcloud.log, I wish to see what's the content of this entry.

@Albusoline
Copy link
Author

Thank you Vitor.
I hope, this makes any sense for you. For me the log-entry doesn't. Attached you'll see the new entries.
Let me know, if that's not what you've been looking for.

nextcloud (Kopie).log

Best regards,
Albusoline

@vitormattos
Copy link
Member

Thanks by your contribution.

The most quantity of itens at your report are about FILE_MISSING, sounds that the path with java files is empty.

A workaround that you can do is deleting handmade the files inside the folder data/appdata_<yourinstanceid>/libresign/<yourProcessorArchitecture>/linux/java. After this, execute the command occ files:scan-app-data and run again the setup flow of LibreSign to download the java binaries.

The correct behavior is when LibreSign do these steps but could have any issue at your environment (or at this part of the code).

@Albusoline
Copy link
Author

Albusoline commented Dec 23, 2024

Hi Vitor.

Thank you for your post.

I did the following:

  • Disabled Libresign in Nextcloud GUI as Admin

  • Removed Libresign in Nextcloud GUI as Admin

  • CLI: rm -r data/appdata_<yourinstanceid>/libresign/

  • Installed Libresign v9.7.4 via Nextcloud GUI Appstore as Admin

  • CLI: sudo -u www-data php8.1 occ files:scan-app-data
    Result (doesn't mean anything, just for reference):
    grafik

  • Quick check: data/appdata_<yourinstanceid>/libresign : Folder exists, but is empty (which make kind of sense...)

  • CLI: sudo -u www-data php8.1 occ libresign:install --all
    grafik

  • CLI: added the logging-line in ConfigureCheckService.php according your post above.

  • CLI: sudo -u www-data php8.1 occ libresign:configure:check
    grafik

Nextcloud Log:
Nextcloud.log

Unfortunately I just got the same error again. Maybe some different errors in the log, one that seem to be related with the database. However I really don't think that deleting the java-folder will do the job. I did that already from scratch.
Files do exist.
Could it be an issue with some data within the database which get not deleted when removing libresign?

Hey... btw: I wish you a merry Christmas and a happy New Year!
Best regards,
Albusoline

@vitormattos
Copy link
Member

vitormattos commented Dec 23, 2024

Is this instance that you are using a test instance? If yes, maybe would be more easy if you can give me a ssh access to be possible handle the LibreSign code putting debug points to be more quickly the way to solution.

If isn't possible, I will need to look more the code suggesting more debug points. I think that now the next file to check is the InstallService.php at the method installJava

Have a strange behavior between the download of java zip file and the extraction of this zip file.

Hey... btw: I wish you a merry Christmas and a happy New Year!

I wish the same to you too! 🎁 🎄 🥳 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: 0. Needs triage
Development

No branches or pull requests

2 participants