Closed davidcbbc closed 3 years ago
I've also tried to run different spring boot projects on the same ubuntu server and they work.
Can you debug through and figure out where it is getting locked? (Or add some println’s)
If I had to make a wild guess I would say look at the “ Keys.secretKey();” line first.
Something like: https://www.codesandnotes.be/2018/09/18/strong-random-number-generation-hangs-on-linux-machines/
if you can track the issue down the a specific line in your example that would help a ton!
@bdemers that's exactly the problem, good catch. The Keys.secretKey() get stuck in some linux systems , so my turn around was to create a default string to initialize the keys , like this
private Security(){
String key = "very_much_secret_key";
this.secretKey=Keys.secretKey(key.getBytes());
}
Thank you so much for your time 👍
Hello! I'm using the jpaseto maven artifact :
And when I try to run my spring boot project with mvn spring-boot:run on my Windows / Mac / Raspberry Pi machine it works beautifully , but when I try to run inside an ubuntu server it gets stuck when I try to run the singleton I made for the jpaseto. The class that has the singleton is the following:
I've tried to change the JDK to almost every version inside the ubuntu cloud server and also tried to change the cloud host , always get the same result. I'm not sure why this is happening and why it works on some machines and not on ubuntu , because it does not throw any error , it just get stuck as follows the output from my ubuntu server
And my main function is the following
Does someone knows what's happening? Thanks in advance!