pterodactyl / panel

Pterodactyl® is a free, open-source game server management panel built with PHP, React, and Go. Designed with security in mind, Pterodactyl runs all game servers in isolated Docker containers while exposing a beautiful and intuitive UI to end users.
https://pterodactyl.io
Other
6.7k stars 1.7k forks source link

Can´t read machine-id from normal Java container for Java 17 #4043

Closed BolverBlitz closed 2 years ago

BolverBlitz commented 2 years ago

Current Behavior

One of my Eggs requires a way to get a unique id, for this it reads a file thats pressent on most OSs and diffrent locations. However it cant find the file in the normal Java Yolk for java 17: open /etc/machine-id: no such file or directory it works as expected with the J9 version.

Java 8,11 and 16 Yolks have this file aswell, only Java 17 is not working.

Expected Behavior

Should be able to read /etc/machine-id from Java 17 Yolk like on most distros and the J9 yolks and older normal Java Yolks.

Steps to Reproduce

Try to read /etc/machine-id file with the Java Yolk Or use the egg thats not working.

Panel Version

1.7.0

Wings Version

1.6.1

Games and/or Eggs Affected

https://github.com/gekware/minecraft-server-hibernation-pterodactyl-egg/blob/main/egg-paper-on-demand.json

Docker Image

ghcr.io\/pterodactyl\/yolks:java_17

Error Logs

2022/04/09 18:42:14 [error *   ] main: LoadConfig: loadDefault: machineid: machineid: open /etc/machine-id: no such file or directory

Is there an existing issue for this?

parkervcp commented 2 years ago

This would be an issue for any docker container. It's even an issue on the machineid git repo.

https://github.com/denisbrodbeck/machineid/issues/5

BolverBlitz commented 2 years ago

Hm, but why is it specific the Java 17 yolk then.

Yolks 8,11,16 and 8J9,11J9,16J9 and 17J9 all work fine. Any other solution to get a unique inside a container managed by pterodactyl maybe?

parkervcp commented 2 years ago

Every server has a uuid attached to it and is part of the env vars.

If you passed in a machine id file they would all get the same id every time.

BolverBlitz commented 2 years ago

Could i not just use that env var to put into the file thats missing in the eggs install script?

parkervcp commented 2 years ago

No. The only files that are saved are the ones in /mnt/server/.

DaneEveritt commented 2 years ago

Closing this out, doesn't appear to be software specific.