Can't connect to Server via IPv6?

  • Tech Support section is for getting help with FTB related problems. If there's a repeatable issue that can be labeled as a bug, then please use the issue tracker for the pack or the app at GitHub issue trackers - If there's no repository for a pack that means that the pack is old and/or will not be updated. Bugs for older packs will not be fixed, unless they are critical.
C

cavedave

Guest
Title Can't connect to Server via IPv6?

Launcher Type Server

Modpack Sky Factory 3

Modpack version 3.0.8

Have you modified the pack? No

Link to log file

Details of the issue Hello FTB-Community! :)
Some friends and I have been running into an issue where I am running a server on my PC via the server files and none of us (or rather them) can't join via IPv6 (can't use IPv4 because of my ISP).
The weird thing though is that this issue does not occur on vanilla minecraft and everyone can join via IPv6.
Is there some kind of setting I can change in the server files so IPv6 is possible?

Thank you all in advance!
 

grandrolf

Global moderator
Team Member
Global Moderator
Trusted User
Aug 29, 2014
2,658
246
133
sweden
Can you please share your server.properties and /logs/fml-server-latest.log

Do a copy/paste and use paste.feed-the-beast.com and give the links here.
 

Quetzi

Jack of All Trades
Retired Staff
Aug 20, 2012
826
329
100
quetzi.tv
Do you use a script to start your server? Can you paste it or the arguments you use to start your server.
 
C

cavedave

Guest
I'm using the serverstart.bat that came with the server files.
Code:
    @if NOT "%FTB_VERBOSE%"=="yes" (
        @echo off
    )
    
    call settings.bat
    
    if NOT EXIST %JARFILE% (
        goto install
    )
    if NOT EXIST libraries\%LAUNCHWRAPPER% (
        goto install
    )
    goto skipinstall
    
    :install
    echo running install script!
    call FTBInstall.bat
    :skipinstall
    
    REM Check if java in path
    REM TODO: use %JAVACMD%
    where java > NUL 2>&1
    
    if %ERRORLEVEL% NEQ 0 (
        echo No java binary in path. Can't run server, exiting...
        pause
        exit /B
    )
    
    REM Test JVM
    REM e.g. 32-bit JVM does not have server\jvm.dll library
    java -server -version > java-test.log 2>&1
    
    if %ERRORLEVEL% NEQ 0 (
        echo Detected following JVM error:
        echo =======================================
        more java-test.log
        echo =======================================
        echo JVM test failed. Can't run server, Exiting...
        pause
        exit /B
    )
    
    if not exist eula.txt (
        echo Missing eula.txt. Startup will fail and eula.txt will be created
        echo Make sure to read eula.txt before playing!
        goto startserver
    )
    
    find "eula=false" eula.txt 1 > NUL 2>&1
    if %ERRORLEVEL% EQU 0 (
        echo Make sure to read eula.txt before playing! Exiting.
        pause
        exit /B
    )
    
    del /f /q autostart.stamp > nul 2>1
    
    :startserver
    echo Starting server
    java -server -Xms%MIN_RAM% -Xmx%MAX_RAM% -XX:PermSize=%PERMGEN_SIZE% %JAVA_PARAMETERS% -jar %FORGEJAR% nogui
    
    :server_loop
    if exist autostart.stamp (
        del /f /q autostart.stamp > nul 2>1
        echo If you want to completely stop the server process now, press Ctrl+C before the time is up!
        for /l %%i in (5,-1,1) do (
            echo Restarting server in %%i
            choice /t 1 /d y > nul
        )
        echo Starting server now
        java -server -Xms%MIN_RAM% -Xmx%MAX_RAM% -XX:PermSize=%PERMGEN_SIZE% %JAVA_PARAMETERS% -jar %FORGEJAR% nogui
        echo Server process finished
        goto :server_loop
    )
    echo Exiting...
    pause

the settings.bat it calls for is the following:
Code:
rem Do not touch
set MCVER=1.10.2
set JARFILE=minecraft_server.%MCVER%.jar
set LAUNCHWRAPPERVERSION=1.12
set LAUNCHWRAPPER=net\minecraft\launchwrapper\%LAUNCHWRAPPERVERSION%\launchwrapper-%LAUNCHWRAPPERVERSION%.jar
set FORGEJAR=FTBserver-1.10.2-12.18.3.2254-universal.jar

rem can be changed by user
set MIN_RAM=512M
set MAX_RAM=3072M
set PERMGEN_SIZE=256M
set JAVA_PARAMETERS=-XX:+UseParNewGC -XX:+CMSIncrementalPacing -XX:+CMSClassUnloadingEnabled -XX:ParallelGCThreads=2 -XX:MinHeapFreeRatio=5 -XX:MaxHeapFreeRatio=10

Also I didn't alter either of those. Is there some kind of Java parameter I could use that would make the connection via IPv6 work?
I just don't get, why vanilla works and the mod does not, in my unterstanding there would have to be something in the mod files that prevents the connection that way.

I used spoiler and code to circumvent the validation of links, i hope thats okay since it basically leads to the same thing...
 

Quetzi

Jack of All Trades
Retired Staff
Aug 20, 2012
826
329
100
quetzi.tv
You can try adding -Djava.net.preferIPv6Addresses=true to the JAVA_PARAMETERS line in settings.bat, you may also need to add
-Djava.net.preferIPv4Addresses=false as well, if the first setting doesn't work by itself.

Edit: Connecting clients may (probably) need to do this too
 
Last edited:
  • Like
Reactions: grandrolf
C

cavedave

Guest
Thank you so much, that did the trick! :)
Some notes:
Both parameters are necessary, but it was -Djava.net.preferIPv4Stack=false instead of -Djava.net.preferIPv4Addresses=false, I saw this one when I was researching before making this thread and gave it a shot.
I also tried leaving the parameters out on either end and oddly enough it is enough to add those parameters to the client, the server did not need them.

Have a great day everyone!
 
  • Like
Reactions: grandrolf