Cant connect to server while running it with .bat, but can with ftbserver.jar

  • The FTB Forum is now read-only, and is here as an archive. To participate in our community discussions, please join our Discord! https://ftb.team/discord
Status
Not open for further replies.

Maydris

New Member
Jul 29, 2019
3
0
0
Hey guys, i'm having a bit of an issue while running my server and want to know if anyone might know a solution. I am running my server off my computer through port forwarding, while I run it using the basic ftbserver.jar it works fine, but the maximum ram it is giving me for it is 256mb, so I wanted to run it with more of coarse. I created a .bat with
"C:\Program Files (x86)\Java\jre7\bin\java.exe" -Xms1024M -Xmx1024M -jar ftbserver.jar
as the program for running it as well as writing it a couple other ways (it wont work with just java where the path is, my computer cant run it without the path it seems), and it does run, it runs with the memory I tell it and everything, but now for some reason I can't connect to it with my IP address anymore, only my IPV4 which would be fine if I weren't trying to set it up for me and my friends. I tried adding my IP address to the server properties folder to see if that might work and it told me "can not assign request address JVM_bin" and when instead I use my ipv4 it works for me, but again no one outside my own computer can connect, I don't know if something like hamachi would work, but I would prefer just to port forward as I have had a lot of problems with hamachi in the past.

Thanks for the help guys I really appreciate it, if you know any other methods of running the server that might work too I would be happy to hear them.
 
  • Like
Reactions: simon andersson

simon andersson

New Member
Jul 29, 2019
1
0
0
It would be nice if someone want to help us I have exactly the same problem. I tried and tried with many different things but I cant complete it.
 

Maydris

New Member
Jul 29, 2019
3
0
0
I wonder if it might not be a problem with this version of the server, I have never had this problem before
 

lavarthan

New Member
Jul 29, 2019
2,437
0
0
You could always add the IPv4 option to the end using '-Djava.net.preferIPv4Stack=true' You might also want to put the 64bit version of Java on the server as well. The max you can allocate in 32bit Java is 1GB.

Also the arguments in this thread are made for performance in minecraft and FTB. I suggest using them instead of making your own, use the server one.

Edit: IPv4? Do you mean the external versus internal (192.168.x.x) IP? That is different than what you are referring to.
 

Maydris

New Member
Jul 29, 2019
3
0
0
Thanks for the suggestions, I will check those out (I would prefer to download one then make my own, i'm no programmer) as for the IPv4 I am unsure of the difference, it is a (192.168.x.x) one that I get from my ipconfig in CMD, its the one I use to port forward in my router. also the '-Djava.net.preferIPv4Stack=true' thing do you mean at the literal end of the "C:\Program Files (x86)\Java\jre7\bin\java.exe" -Xms1024M -Xmx1024M -jar ftbserver.jar sting, just like a space?
 

lavarthan

New Member
Jul 29, 2019
2,437
0
0
That, 192.168.x.x is an internal IP and will work on computers in your network only, as in inside your house. I'm no expert on servers, but I do know that you need an external IP to allow your friends to connect if they are not in your house. For adding the IPv4 you can follow this to set it up for Java this way as well.
 
Status
Not open for further replies.