Merith-TK / mc-code-server

0 stars 1 forks source link

[Fabric] Server startup gets stuck after code-server loading #3

Open arvitus opened 1 month ago

arvitus commented 1 month ago

When I start my server with code-server installed, it just gets stuck after this:

[10:27:37] [main/INFO]: CodeServer Downloaded!
[10:27:37] [main/INFO]: Starting code-server
[10:27:37] [main/INFO]: All command flags map to config.yaml values. (if a value is missing, you can add it to .code-server/.config/code-server/config.yaml)
[10:27:37] [main/INFO]: Building: [.code-server/.local/bin/code-server, ./, --disable-telemetry, --disable-update-check]
[10:27:37] [main/INFO]: Running: [.code-server/.local/bin/code-server, ./, --disable-telemetry, --disable-update-check]
[10:27:37] [Thread-8/INFO]: [2024-08-02T08:27:37.745Z] info  code-server 4.91.1 1962f48b7f71772dc2c060dbaa5a6b4c0792a549
[10:27:37] [Thread-8/INFO]: [2024-08-02T08:27:37.747Z] info  Using user-data-dir /home/container/.code-server/.local/share/code-server
[10:27:37] [Thread-8/INFO]: [2024-08-02T08:27:37.793Z] info  Using config file /home/container/.code-server/.config/code-server/config.yaml
[10:27:37] [Thread-8/INFO]: [2024-08-02T08:27:37.793Z] info  HTTPS server listening on https://127.0.0.1:8102/
[10:27:37] [Thread-8/INFO]: [2024-08-02T08:27:37.793Z] info    - Authentication is enabled
[10:27:37] [Thread-8/INFO]: [2024-08-02T08:27:37.793Z] info      - Using password from /home/container/.code-server/.config/code-server/config.yaml
[10:27:37] [Thread-8/INFO]: [2024-08-02T08:27:37.793Z] info    - Using certificate for HTTPS: /home/container/.code-server/.local/share/code-server/localhost.crt
[10:27:37] [Thread-8/INFO]: [2024-08-02T08:27:37.794Z] info  Session server listening on /home/container/.code-server/.local/share/code-server/code-server-ipc.soc

The mc server doesn't start or does any further processing and the code-server is not reachable through the url (yes, I did replace 127.0.0.1 with my domainname ;))

Merith-TK commented 1 month ago

Will look into the startup issue, However you need to replace 127.0.0.1 in the config file it says it loads, and then restart it, that is also where you do your other settings for it.

If I could get the entire log that would be great. lets me pinpoint which mc and fabric version you are on so I can test if its a specific version issue

Merith-TK commented 1 month ago

okay if you want to test this without installing intellij locally click the "open in gitpod" button in the readme (new), and make sure you run sdk install java 17.0.1-tem before running ./gradlew build mergeJars

download the jar file from the new "Merged" directory and test that

That will get you a src-build, which currently has an issue where the code-server process doesn't die when the server does, meaning you will need to forcibly murder the java process, (most server panels have a KILL button) the main issue occurs when the java process exits unexpectidly, leaving a forked code-server process running independently from the server

This currently wont crash the server, just scream

arvitus commented 1 month ago

Idk if your above message is related to this...

Anyway. I got access to code-server in the browser after setting bind-addr to 0.0.0.0:8102. I could even use my domain so that's good but I noticed that I got a warning in firefox that the site is not secure even though I set cert: true and the url even begins with https, but that is actually not important right now.

Even though I can now access the server file through code-server, the mc server itself is still not starting. Code server is loading and then probably blocks the executon of everything else. Here are the server logs: https://pastebin.com/iCwFjqmt

Also, I noticed that some extensions did not work, because node.js is not installed. If it would be possible to bundle this into the mod so that those extensions do work, that would be great!

arvitus commented 1 month ago

These were the extensions that did not work because of missing node.js: https://open-vsx.org/extension/mtxr/sqltools https://open-vsx.org/extension/mtxr/sqltools-driver-sqlite (sqlite driver for the above extension)

I was just trying to connect to a sqlite db on the server.

Merith-TK commented 1 month ago

To address the issues in order 1) https doesnt work directly unless you obtain an SSL Cert for the domain you are connecting to, or reverse proxy the port through a webserver that does, documentation for this can be found on code-server's wiki

2) Did you use the build the instructions in my reply? because ./gradlew fabric:runServer does infact, run server with the latest commit (not released yet due to the outstanding issue that code-server will just keep running in the background even after server shutdown leading to an error if java is not brutally murdered)

3) I think that is a code-server issue? will need to investigate. Which mod were you using that you needed to poke its db?

arvitus commented 1 month ago

No I didn't use the build from gitpod. Tbh I don't currently have the patience to test the mod thoroughly... I just wanted to let you know the problems I encountered :)

I was using the banhammer fabric mod and it was an sqlite db, but I don't think that's where the problem is. The extension did not even want to start because of missing node.

Merith-TK commented 1 month ago

the gitpod build will solve the server start issue, just know running /stop on the server wont kill java, you will have to do that manually until I can figure out how to solve that issue in the code side.