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

V1.31 - Libsodium error #19

Closed
Jordo-o opened this issue Jan 12, 2021 · 17 comments
Closed

V1.31 - Libsodium error #19

Jordo-o opened this issue Jan 12, 2021 · 17 comments

Comments

@Jordo-o
Copy link

Jordo-o commented Jan 12, 2021

When running the server from the precompiled jar in a Debian server, the following error occures on the server, when a users want to make a new account.

Netty error occurred: 
java.lang.UnsatisfiedLinkError: Unable to load library '/tmp/nativeutils1203363710640636/libsodium.so': Native library (tmp/nativeutils1203363710640636/libsodium.so) not found in resource path (kepler.jar).

Also a manual install of libsodium does not solve the problem.
When a user wants to login, also an error will be raised:

Netty error occurred: 
java.lang.NoClassDefFoundError: Could not initialize class org.alexdev.kepler.dao.mysql.PlayerDao
@Quackster
Copy link
Owner

The problem is the mismatch somewhere on your install between 32-bit and 64-bit installation. I'm not sure where exactly, as it is your installation.

I've had this problem years ago, I just tried compiling it on a fresh VPS running Ubuntu 18.04 without trouble.

I used:

  • Gradle 4.1
  • Java 12 OpenJDK
  • "gradle fatJar" command inside /Kepler/Kepler-Server/ and it will produce a runnable jar in /Kepler/Kepler-Server/build/libs

I'm sorry, you might have better luck recompiling it.

@Jordo-o
Copy link
Author

Jordo-o commented Jan 12, 2021

Thanks for the reply!
I rebuild the server with

  • Gradle 5.2
  • Java (zulu) 13
  • Arm v71

Unfortunately, still the same error on register :(
I hope that you can help me with the problem.

@Quackster
Copy link
Owner

Quackster commented Jan 12, 2021

Well I'm dumbfounded, there was a way to solve this but I literally cannot remember.

If you can wait, I can add an option to use a different type of password hashing.

@Jordo-o
Copy link
Author

Jordo-o commented Jan 13, 2021

No hurry, I have the time!
It's already very nice that want to look for a solution! :D

@Quackster
Copy link
Owner

Hello,

Can you check out v1.32 release? Delete your server.ini and then after its recreated, edit password.hashing.library from argon2 to bcrypt

https://github.com/Quackster/Kepler/releases/tag/v1.32

Please don't change it back to argon2 in future, otherwise no one will be able to login.

@Jordo-o
Copy link
Author

Jordo-o commented Jan 23, 2021

I downloaded the pre-build version, and I rebuild the source again myself, but both give the same issue:

Error: Could not find or load main class org.alexdev.kepler.Kepler
Caused by: java.lang.ClassNotFoundException: org.alexdev.kepler.Kepler

Build using:
Gradle 5.2.1
Kotlin DSL: 1.1.3
Kotlin: 1.3.20
Groovy: 2.5.4
Ant: Apache Ant(TM) version 1.9.13 compiled on July 10 2018
JVM: 13.0.4 (Azul Systems, Inc. 13.0.4+8-MTS)
OS: Linux 5.4.83-v8+ arm

@Quackster
Copy link
Owner

Quackster commented Jan 23, 2021

My apologies, can you try and build from source again? Also remember what I said about server.ini

I'll fix the compiled version soon.

@Jordo-o
Copy link
Author

Jordo-o commented Jan 23, 2021

I cloned the master after your latest update and manage to compile it.
But still the same error:

Error: Could not find or load main class org.alexdev.kepler.Kepler
Caused by: java.lang.ClassNotFoundException: org.alexdev.kepler.Kepler

@emansom
Copy link

emansom commented Jan 23, 2021

How are you running Kepler specifically? In a container? What distro?

Unable to load library '/tmp/nativeutils1203363710640636/libsodium.so'
That error compels me to think it's related to how that directory is mounted. It might not be allowed to execute programs from or open/write said directory.

@Jordo-o
Copy link
Author

Jordo-o commented Jan 23, 2021

I am running Kepler on my raspberry pi 4B+
Linux raspberrypi 5.4.83-v8+ #1379 aarch64.

I cloned the repo into my etc folder with:
git clone https://github.com/Quackster/Kepler.git

And run the command 'gradle fatJar' with the settings mentioned above.
But the /tmp folder should be writable for every user.

@emansom
Copy link

emansom commented Jan 23, 2021

What's the output of mount | grep '/tmp' and lsb_release -a?

@Jordo-o
Copy link
Author

Jordo-o commented Jan 23, 2021

The output of mount | grep '/tmp', is nothing

the output of lsb_release -a, is

No LSB modules are available.
Distributor ID:	Raspbian
Description:	Raspbian GNU/Linux 10 (buster)
Release:	10
Codename:	buster

@emansom
Copy link

emansom commented Jan 23, 2021

Try configuring a tmpfs in RAM and see if that changes things.
Add following line to /etc/fstab:
tmpfs /tmp tmpfs defaults,size=10M 0 0

Then execute
sudo systemctl daemon-reload
sudo systemctl restart local-fs.target

@Jordo-o
Copy link
Author

Jordo-o commented Jan 24, 2021

I changed the settings according to @emansom his comment, and tested with the prebuild version 1.31 (because I could not build 1.32).

Unfortunately, I still have the same error:

ERROR [ErrorLogger] - Netty error occurred: 
java.lang.UnsatisfiedLinkError: Unable to load library '/tmp/nativeutils42354009545945/libsodium.so': Native library (tmp/nativeutils42354009545945/libsodium.so) not found in resource path (kepler.jar)

And an other question:

My apologies, can you try and build from source again? Also remember what I said about server.ini

I'll fix the compiled version soon.

@Quackster, did you already manage to fix the compiled version of V1.32?
Maybe I can test that one with the changes I've made according to above information.

@Quackster
Copy link
Owner

The compiled version was fixed the same day as release. Anyways, as far as I'm concerned, there will have to be a special build for you to remove libsodium, but I am not going to do that.

@Quackster
Copy link
Owner

Add me on Discord my name is Quack#1337 and we can probably work something out.

@Quackster Quackster reopened this Feb 2, 2021
@Jordo-o
Copy link
Author

Jordo-o commented Feb 2, 2021

Add me on Discord my name is Quack#1337 and we can probably work something out.

Thank you! I'll search for you on discord!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants