pelican-eggs / eggs

Service eggs for the pterodactyl panel
MIT License
2.81k stars 2.32k forks source link

Request: BeamMP Egg #1014

Closed danbracey closed 3 years ago

danbracey commented 3 years ago

Service: BeamMP (Beam.NG Drive Multiplayer)

Does this expand an already existing service: N

Link to game: https://github.com/BeamMP/BeamMP-Server

Links for server downloads: https://beammp.com/

Links for install steps/docs: https://github.com/BeamMP/BeamMP-Server/releases/

M1DN1GHT01 commented 3 years ago

Should not be too hard for this to be made, I'll work on it a bit and keep you updated.

M1DN1GHT01 commented 3 years ago

Turns out someone already made a working version. There docker setup is a bit weird but Im hoping if I fix it then pr into there current egg, then they will pr it into parkers repo.

DatMayo commented 3 years ago

@PenguinNexus @M1DN1GHT01 Are you able to test the egg, if I'd create one? (Because I don't own the game, so I can't test)

danbracey commented 3 years ago

Yes, would be very happy to test this

DatMayo commented 3 years ago

Perfect :) But you have to be aware that installing this egg will take some time. Its building the server from scratch (pulling source from github and compiling it afterwards), so it will take some time :/

DatMayo commented 3 years ago

Ok, I've finished the egg. But I'm getting the error ./BeamMP-Server: error while loading shared libraries: liblua5.3.so.0: cannot open shared object file: No such file or directory. I think its because by default there is no lua module bundled with the base_debian image. Maybe if someone else could create it, the egg will work. egg-beam-m-p.zip

M1DN1GHT01 commented 3 years ago

I can probably make a custom docker file for the time being with that package. Keep in mind that there is already a egg made Non Pr'd Egg for BeamMP so you really could've just used this until the creator Pr'd It.

DatMayo commented 3 years ago

I can probably make a custom docker file for the time being with that package.

Sounds great!

Keep in mind that there is already a egg made Non Pr'd Egg for BeamMP so you really could've just used this until the creator Pr'd It.

Yep, I saw that. But he's using an allready compilled version without any option to change the used tag. I know, mine isn't perfect either, but it builds it from scratch ;)

M1DN1GHT01 commented 3 years ago

Alright everything seems to work fine now, re did one thing for the server token. The egg provided below is the working version. egg-beam-m-p.zip

DatMayo commented 3 years ago

Thx for your help, I'll add some more variables and create a PR for that :)

DatMayo commented 3 years ago

Added some variables, @PenguinNexus please report back any issues egg-beam-m-p.zip

danbracey commented 3 years ago

Thank you all for the help first of all!

So I was able to get the server installed and running OK container@pterodactyl~ Server marked as starting... :/home/container$ ./BeamMP-Server [21/3/2021 17:17:23] [INFO] BeamMP Server Running version 1.20 [21/3/2021 17:17:23] [INFO] Config found updating values [21/3/2021 17:17:23] [INFO] Lua system online [21/3/2021 17:17:23] [INFO] Vehicle data network online on port 30814 with a Max of 12 Clients [21/3/2021 17:17:23] [INFO] Vehicle event network online [21/3/2021 17:17:27] [INFO] Resumed authenticated session! [21/3/2021 17:18:40] [WARN] Backend system refused server! Server might not show in the public list

However, I'm unable to connect to it with the error Disconnected: Socket Closed Code 3

This seems related to https://github.com/BeamMP/BeamMP-Server/issues/8 - Is libboost-dev and libssl-dev packaged in with the install?

M1DN1GHT01 commented 3 years ago

Is your server port 30814? I can't remember if anyone added a port variable or not

danbracey commented 3 years ago

It is, I also have a valid server key in my startup settings

DatMayo commented 3 years ago

Do you use it locally (at home) or on a vps?

danbracey commented 3 years ago

Locally, but the IP (for the wings it's on) is dynamic, so this may change the scenario. I'm happy if you wish to add me on Discord at Penguin#2000 to walk you through my setup

DatMayo commented 3 years ago

Please try it on a vps/root, neither @M1DN1GHT01 or myself had this issue when testing on our hardware/server. (imho, the issue is on your side #noOffense)

M1DN1GHT01 commented 3 years ago

Another way you could try it to port forward the port on your router, but usually ISP's block port forwarding for security. If you have a netgear router or access to your modem/firewall I might be able to assist.

danbracey commented 3 years ago

It's already port forwarded with DMZ set up for it, so I'll take a further look - Leave this one with me :)

danbracey commented 3 years ago

So I'm now testing this on my main node w/ a static IP and which I know works without issue. Whenever I connect to the server I get the following and the server then closes...

[21/3/2021 18:13:52] [INFO] Identifying new client... [21/3/2021 18:13:55] [WARN] Backend system refused server! Server might not show in the public list

/entrypoint.sh: line 3: 10 Segmentation fault (core dumped) ${MODIFIED_STARTUP} container@pterodactyl~ Server marked as offline...

[Pterodactyl Daemon]: ---------- Detected server process in a crashed state! ---------- [Pterodactyl Daemon]: Exit code: 139 [Pterodactyl Daemon]: Out of memory: false [Pterodactyl Daemon]: Updating process configuration files... [Pterodactyl Daemon]: Ensuring file permissions are set correctly, this could take a few seconds... container@pterodactyl~ Server marked as starting... [Pterodactyl Daemon]: Pulling Docker container image, this could take a few minutes to complete... Pulling from m1dn1ght/beammp Digest: sha256:18ba9152eb88c9b3bf696799817cda70489479c75dfd39a254a1c7afec6aa56d Status: Image is up to date for quay.io/m1dn1ght/beammp:Main-BeamMP-Debain [Pterodactyl Daemon]: Finished pulling Docker container image :/home/container$ ./BeamMP-Server [21/3/2021 18:13:59] [INFO] BeamMP Server Running version 1.20 [21/3/2021 18:13:59] [INFO] Config found updating values [21/3/2021 18:13:59] [INFO] Lua system online [21/3/2021 18:13:59] [INFO] Vehicle data network online on port 30814 with a Max of 12 Clients [21/3/2021 18:13:59] [INFO] Vehicle event network online [21/3/2021 18:13:59] [INFO] Resumed authenticated session!

M1DN1GHT01 commented 3 years ago

Turned out it was a docker issue, ill push a new version real quick.

DatMayo commented 3 years ago

Not only, looks like the source code build was messed up. Please try again with this build egg-beam-m-p.zip

danbracey commented 3 years ago

OK so this runs great as-is, but variables such as the map and the servername aren't carried over to the config file.

I have attempted to fix this by changing the Egg to the one attached, however I get the following error - Any advice please? This contains more variables to mirror Server.cfg egg-beam-m-p-penguin.zip

No appid set. Starting Server :/home/container$ ./BeamMP-Server terminate called after throwing an instance of 'std::out_of_range' what(): basic_string::substr: __pos (which is 1) > this->size() (which is 0) /entrypoint.sh: line 36: 14 Aborted (core dumped) ./BeamMP-Server container@pterodactyl~ Server marked as offline...

M1DN1GHT01 commented 3 years ago

Does this occur after you modified the egg?

danbracey commented 3 years ago

Yes, but I re-installed the server after every change to ensure it's on the new configuration

M1DN1GHT01 commented 3 years ago

I'll take a look, doesn't seem to happen with the default egg so it most likely is something you changed. If need be I can fix the variable parsers. I haven't tested them to see if they worked or not after it was updated and fixed.

M1DN1GHT01 commented 3 years ago

Sorta forgot about this, gonna finish up everything today then pr it by tonight.

M1DN1GHT01 commented 3 years ago

Add BeamMP #1103

DatMayo commented 3 years ago

@M1DN1GHT01 Add "closes #1014" in your PR, so this issue will be automaticly resolved after your PR is merged

parkervcp commented 3 years ago

@PenguinNexus does this work?

M1DN1GHT01 commented 3 years ago

@PenguinNexus If you want to test it, make sure to use quay.io/m1dn1ght/beammp:Main-BeamMP-Debain since the default one is set to Parkers Base Debian for merging.

M1DN1GHT01 commented 3 years ago

@M1DN1GHT01 Add "closes #1014" in your PR, so this issue will be automaticly resolved after your PR is merged

Will do, thanks for reminding me.