If your server is immediately closing, it is due to a couple things:
1. Some of the mods, if you are on a modded server, are dependent on the framework of other smaller mods. These mods help run the bigger one, make sure you have all of them installed
2. You don't have enough allocated RAM for the server to run, which is unlikely if you are on Vanilla, but very plausible if you are on modded
3. When you are trying to allocate more RAM, you are making the minimum amount of RAM higher than the maximum amount of RAM the server can run on.
Send some more information like the mods running or error messages and I could help more.