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

Error: PageSize configuration is wrong: configured with 4096, but got 65536 #348

Open
travisboss opened this issue Aug 21, 2023 · 19 comments

Comments

@travisboss
Copy link

[+] Running 1/1
 ⠿ Container mc-bedrock  Started                                                                                  0.4s
DEBU[0000] Using /data to match uid and gid
DEBU[0000] Resolved UID=0 from match path
DEBU[0000] Resolved GID=0 from match path
Looking up latest version...
Starting Bedrock server...
Error: PageSize configuration is wrong: configured with 4096, but got 65536
  mc-bedrock:
    image: itzg/minecraft-bedrock-server
    container_name: mc-bedrock
    environment:
      EULA: "TRUE"
      GAMEMODE: survival
      DIFFICULTY: normal
    ports:
      - 19134:19132/udp
    volumes:
      - ./minecraft-bedrock-data:/data
    stdin_open: true
    tty: true

Trying to figure out this error, I have changed the port for now since I am running mc-java with geyersmc on another container, checked server.properties but see nothing related to this issue. I am running on a ARM oracle free tier.

@itzg
Copy link
Owner

itzg commented Aug 21, 2023

It seems to be something about hugepages

https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/performance_tuning_guide/s-memory-transhuge

That's a pretty advanced topic, so you'll need to explore from there.

BTW, Mojang only provides x86 binary, so the ARM image running in a box64 emulator -- which adds to the challenge of your scenario.

@snakeeater98
Copy link

snakeeater98 commented Oct 20, 2023

Was there a solution found?
I get the same error.

Edit: its probably because im on arm and the guy originally reporting this probably as well.
Surprising that it executed something nontheless.
Edit2: It is executing something because i assume you are using box64 as emulation layer wich has a fixed pagesize at 4k.
It looks like it is possible to make it other sizes, but i guess this requires building the thing.
Also with a fixed pagesize build into the emulation layer its not really universally usable.
ptitSeb/box64#912

@itzg
Copy link
Owner

itzg commented Oct 20, 2023

Good find @snakeeater98 !

@snakeeater98
Copy link

Not exaclty a solution, but a "workaround" for this problem assuming the goal is to play with the bedrock client on a server hostet on arm.
Just set up a java server and install the Geyser mod to be able to connect with a bedrock client to a java server.

@travisboss
Copy link
Author

That is my currently workflow of just using Geyser with a Fabric server.

@itzg
Copy link
Owner

itzg commented Dec 24, 2023

Just wanted to note that using one of the other packages for the arm64 image build might help, but runs the risk of being less portable (maybe)

https://box64.debian.ryanfortner.dev/#package-list

@HankB
Copy link

HankB commented Dec 24, 2023

The Raspberry Pi 5 is configured to run with a 16K page size whereas earlier Pis were all configured with a 4K page size.

I don't know if the issue is Docker or Java VM. Java reports

hbarta@nova:~ $ java --version
openjdk 17.0.9 2023-10-17
OpenJDK Runtime Environment (build 17.0.9+9-Debian-1deb12u1)
OpenJDK 64-Bit Server VM (build 17.0.9+9-Debian-1deb12u1, mixed mode)
hbarta@nova:~ $

Copied from #380 per @itzg who further commented

...BTW, Bedrock edition doesn't run with Java. It's a native executable so the issue is with Bedrock itself most likely.

and

...wait, on ARM64 it's emulated with box64 so it's actually going to be something with that.

@HankB
Copy link

HankB commented Dec 24, 2023

I see that BOX64 recently added support for the Pi 5 ptitSeb/box64@9b7b916 and which includes

  • Split RPi5 in 16k page-size variant and not

Could this be the solution for the Pi 5? I'm not sure if this is what you are referring to with your comment above "... using one of the other packages."

@itzg
Copy link
Owner

itzg commented Dec 24, 2023

Good find @HankB but will be step one of several.

I'd really prefer you switch to Java edition with geyser like most of us have.

https://docker-minecraft-server.readthedocs.io/en/latest/misc/examples/#bedrock-compatible-server

Mojang's bedrock server software is very buggy and I'd prefer to not spend all the effort for numerous ARM variants when the provided binary is x86 to begin with.

@HankB
Copy link

HankB commented Dec 24, 2023

I'd really prefer you switch to Java edition with geyser ...

Thanks for the suggestion. I'm not wedded to any particular solution and really prefer the lowest friction (read lowest effort on my part) solution to get a minecraft server running.

I just did a search for "minecraft server Java edition with geyser raspberry pi" and first hit is https://jamesachambers.com/minecraft-java-bedrock-server-together-geyser-floodgate/. Are you familiar with that or are there better instructions you can recommend?

@itzg
Copy link
Owner

itzg commented Dec 24, 2023

I would highly recommend the example I posted. That article is somebody else's image 😀

@DuncanMillard
Copy link

DuncanMillard commented Dec 26, 2023

I'd really prefer you switch to Java edition with geyser like most of us have

Would be ideal, but as far as I can tell, no server that lets me use geyser will also let my kids play split-screen on the xbox, sadly. (Known issue in various places - player 2 just hangs).

@CrashTestDummy
Copy link

Force your Pi5 to load the common 64-bit kernel that uses 4k page size (kernel8.img)
https://www.raspberrypi.com/documentation/computers/config_txt.html#kernel

Or

Build your own flavor of the arm image and swap box64-generic-arm with box64-rpi5arm64ps16k

@DuncanMillard
Copy link

DuncanMillard commented Dec 28, 2023

Build your own flavor of the arm image and swap box64-generic-arm with box64-rpi5arm64ps16k

No need to build your own now - Ryan has kindly added precompiled versions in the last 36 hours: (ryanfortner/box64-debs#26)

I've now used the Pi 5 / 16Kb page image one to run the official bedrock server fine 👍🏻

Set up the package source with the instructions at https://github.com/ryanfortner/box64-debs then just sudo apt install box64-rpi5arm64ps16k

@BenediktHengefeld
Copy link

Maybe someone can help me with this. I'm not sure what exactly @DuncanMillard did, to get it running.

I tried to do the same as Duncan - but I'm not really familiar with debian and all this containers - so probably I did some stupid mistakes..

The error I get in my log files:

Starting Bedrock server...
Error: PageSize configuration is wrong: configured with 4096, but got 16384

What I did so far:

  1. Installed my Raspberry PI 5b with the latest Raspberry Pi Imager (v1.8.4) and selected the Raspberry Pi OS Lite 64bit(2023-12-11).

  2. Updated and upgraded all repositories and packages

  3. Installed latest Docker

  4. Installed latest Portainer (just for checking

  5. Deployed the bedrock container, with standard command for testing:
    docker run -d -it -e EULA=TRUE -p 19132:19132/udp -v mc-bedrock-data:/data itzg/minecraft-bedrock-server
    But got the page size problem as mentioned above.

  6. Tried to fix the page size problem as follows (on the Raspberry – not in the container):

sudo wget https://ryanfortner.github.io/box64-debs/box64.list -O /etc/apt/sources.list.d/box64.list
wget -qO- https://ryanfortner.github.io/box64-debs/KEY.gpg | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/box64-debs-archive-keyring.gpg 
sudo apt update && sudo apt install box64-rpi4arm64 -y

Got some security errors, so just bypassed in a dirty way the checks by:

sudo apt -o Acquire::AllowInsecureRepositories=true update
sudo apt install box64-rpi5arm64ps16k

Output from the system:

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
  box64-rpi5arm64ps16k
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 9,059 kB of archives.
After this operation, 66.0 MB of additional disk space will be used.
WARNING: The following packages cannot be authenticated!
  box64-rpi5arm64ps16k
Install these packages without verification? [y/N] y
Get:1 https://box64.debian.ryanfortner.dev/debian ./ box64-rpi5arm64ps16k 0.2.7+20240105.9b23c32-1 [9,059 kB]
Fetched 9,059 kB in 3s (2,885 kB/s)
Selecting previously unselected package box64-rpi5arm64ps16k.
(Reading database ... 56555 files and directories currently installed.)
Preparing to unpack .../box64-rpi5arm64ps16k_0.2.7+20240105.9b23c32-1_arm64.deb ...
Unpacking box64-rpi5arm64ps16k (0.2.7+20240105.9b23c32-1) ...
Setting up box64-rpi5arm64ps16k (0.2.7+20240105.9b23c32-1) ...
Restarting systemd-binfmt...

So looks like installation was successfull this time. Just double checked again:

sudo apt install box64-rpi5arm64ps16k -y
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
box64-rpi5arm64ps16k is already the newest version (0.2.7+20240105.9b23c32-1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

  1. Restarted the Pi

  2. Tried to restart the container, still the same problem.

Not sure which of the concepts I misunderstood, would be great if someone could give me a hint.
Maybe I have to add the box64 package in the container itself? But as the container crashes, I can’t connect to it via bash to install the package for testing. And no clue how to enhance the container. :(

Sorry for the long text and thanks for your help!

@itzg
Copy link
Owner

itzg commented Jan 6, 2024

@BenediktHengefeld it requires a change to the image so that the arm64 emulator running within the container is large page aware.

@itzg
Copy link
Owner

itzg commented Jan 6, 2024

@Phil-T1
Copy link

Phil-T1 commented Mar 8, 2024

This is awesome, runs much better than Bedrock, thanks!

Just to confirm, the Java version runs full 64 bit and not emulated like in Bedrock?

@itzg
Copy link
Owner

itzg commented Mar 8, 2024

@Phil-T1 thats correct

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

8 participants