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: No IP assigned. #25

Open
mmmaxwwwell opened this issue Oct 2, 2021 · 17 comments
Open

Error: No IP assigned. #25

mmmaxwwwell opened this issue Oct 2, 2021 · 17 comments

Comments

@mmmaxwwwell
Copy link
Owner

mmmaxwwwell commented Oct 2, 2021

Sometimes when I start the container, I see a few messages in the logs, and the server fails to start.

The messages are:

space-engineers-dedicated-docker-linux | 2021-10-02 23:03:44.920: CPU Info: Intel(R) Core(TM) i7-8700K CPU @ 3.70GHz
space-engineers-dedicated-docker-linux | 2021-10-02 23:03:46.556: Bind IP : 0.0.0.0:27016
space-engineers-dedicated-docker-linux | dbus[71]: arguments to dbus_connection_send_with_reply_and_block() were incorrect, assertion "connection != NULL" failed in file ../../../dbus/dbus-connection.c line 3544.
space-engineers-dedicated-docker-linux | This is normally a bug in some application using the D-Bus library.
space-engineers-dedicated-docker-linux | 
space-engineers-dedicated-docker-linux |   D-Bus not built with -rdynamic so unable to print a backtrace
space-engineers-dedicated-docker-linux | wine: Assertion failed at address 00007FA7050F37BB (thread 006c), starting debugger...
space-engineers-dedicated-docker-linux | 2021-10-02 23:03:59.363: Error: No IP assigned.

Just restarting the server doesn't seem to help.

sudo docker-compose down && sudo service containerd restart && ./start seems to resolve it most of the time, however sometimes it doesn't. Changing the container to/from host networking mode seems to resolve it sometimes also.

I'm not sure whats going on here, but I suspect it has to do with docker.

@whodat
Copy link

whodat commented Oct 10, 2021

Yeah I have been getting this randomly as well for ..hmm...the last few months?.... Posted about it here: Devidian/docker-spaceengineers#19 (which appears to be a fork of this one?)

I just keep restarting the docker until it works. Sometimes takes a couple restarts, sometimes more. The fact that I restart the server every day at 4am componds the issue. Considering changing the cron job script so that it re-tries about 10 times until the docker is successfully running.

@mmmaxwwwell
Copy link
Owner Author

I can't really say the container is mine persay, but I've been the driving force of why this exists currently. This could change in the future, I found lots of abandoned, once working but now broken docker containers on my way here. I started off based on others work, got it most of the way, and then devidian jumped in and connected the last piece I was missing. Since then I redid the entire thing to use wine6 so we didn't need devidian's workaround for the winetricks stuff, which was great when we needed it but added complexity. Just like the people that are 'self taught' are really just learning from others and riding the coat tails of those that came before them. I'm super thankful and grateful for devidian's and everyone else's contribution to this project.

I'd really like to get a fix for this, this docker container is step 1 of this far fetched idea I have that involves multiple worlds that are networked together. I know torch can do some of this stuff, but I've had some bad experiences with torch servers in the past, and I really want to limit the number of vendors I depend on here.

Imagine you and some friends join my world, get bases set up and then everyone brings a grid to some NPC or admin station, then presses a button. A new docker container with a prebuilt scenario is spun up, and the players and grids in the area are moved to the new docker instance where they will work to complete an objective and their performance could be evaluated and quantified.

This isn't just a moonshoot, I've actually implemented a POC plugin, webserver and single page application that let users control the functional block's control panel settings. It was terribly coded and probably full of security holes, but it worked great. I'm just now embarking on the journey to make this next step toward my vision a reality.

That being said, if I want to spin up a new networked world and it doesn't go for a minute or so, that's a problem for the users. Its going to ruin the experience. It needs to be rock solid if I'm going to depend on it.

I'm at a loss for what to do, maybe we can try stepping through the docker container with a disassembler somehow and see what the DS is evaluating before it emits that no IP error.

@Devidian
Copy link

I write it down here too, seems that keen has implemented some magic "find my external ip" into the dedicated server that is causing this error sometimes. So in this case we can do nothing to fix this.

https://support.keenswh.com/spaceengineers/pc/topic/error-no-ip-assigned

Also this topic seems to be abandoned and not yet fixed.

@mmmaxwwwell your multi-server idea sounds like my idea i had for years for several games (including se). In my case i had the idea to connect servers through a modified stargate-mod, but with servers already up - because spin up time is long enougth even without this damn bug.

@Devidian
Copy link

I've opened an issue in the official github

KeenSoftwareHouse/SpaceEngineers#611

i know they dont update the code there but maybe if we get enough loudness on this issue, they may fix it for the current code!

@msansen
Copy link

msansen commented Jan 1, 2022

As a workaround, setting the actual public ip in SpaceEngineers-Dedicated.cfg + setting the se-server network to host mode did the trick for me, only thing i'm still haven't figured out was the remote api. Great job to (all of) you :)

services:
  se-server:
    image: mmmaxwwwell/space-engineers-dedicated-docker-linux:latest
    container_name: space-engineers-dedicated-docker-linux
    restart: unless-stopped
    network_mode: "host"

@mmmaxwwwell
Copy link
Owner Author

mmmaxwwwell commented Jan 1, 2022

When i'm developing using this container, switching between host and a few forwarded ports fixes it most times for a bit. Then it breaks again in a few mins, but I wasn't setting the external IP in the config file.

Restarting containerd and docker help sometimes too, but every fix seems to encounter the same error after a few restarts, in my experience.

I expect you to run into the same problrm again soon. Please report back if you do, and if you run it for a few days and its fine, please report that back too!

@whodat
Copy link

whodat commented Jan 1, 2022

Yeah great work on keeping this going! I did end up disabling my SE container and running it under a VM for now. Were too many minor issues (No remote admin, this "No IP assigned" error, and then started getting "given key was not present in the directionary" errors).

With that last error, my world would not load, but I can load new worlds. It seems to happen when the world gets more complex as we play on it for a few weeks. (I clean a bunch of stuff up, removing entities, etc, and still no go).

The same exact world on a Wndows VM SE server works great. So yeah am back with running it on a Windows VM for now (sigh). I do like having my remote admin back though! Will definately keep an eye on this docker container though, great work! And your idea with the dynamically spawned instances on seperate containers sounds pretty durn cool!

@Devidian
Copy link

Hey Guys, they have closed the issue on their forum but said it should be re-opened when someone else encounters it, ... so i did: https://support.keenswh.com/spaceengineers/pc/topic/23166-error-no-ip-assigned

Would need some votes of course, so feel free to support that ticket

@Merith-TK
Copy link

having the issue myself lol

@mmmaxwwwell
Copy link
Owner Author

Go vote and leave a comment on the keen site above if you have some time! Would really appreciate it!

@Merith-TK
Copy link

image

cant, sadly, I get a 401 error

@Devidian
Copy link

You have to be logged in on their site to see the forum. Anyway ticket seems to be opened now, maybe it finally gets fixed

@Devidian
Copy link

@pyro000
Copy link

pyro000 commented Apr 19, 2022

In this old source code of SE

            UInt32 ip = 0;
            UInt64 id = 0;

            int timeout = 100;
            while (ip == 0 && timeout > 0)
            {
                SteamSDK.SteamServerAPI.Instance.GameServer.RunCallbacks();

                Thread.Sleep(100);
                timeout--;

                ip = SteamSDK.SteamServerAPI.Instance.GameServer.GetPublicIP();
                id = SteamSDK.SteamServerAPI.Instance.GameServer.GetSteamID();
            }

            MySandboxGame.Services.SteamService.UserId = id;

            if (ip == 0)
            {
                MyLog.Default.WriteLineAndConsole("Error: No IP assigned.");
                return;
            }

            var ipAddress = IPAddressExtensions.FromIPv4NetworkOrder(ip);

It seems like Steam is handling the Public IP recognition, which is unnecesary when we define the ip in SpaceEngineersDedicated.cfg.

@RandomExplosion
Copy link

Has anyone found a way to fix this? Or is the only reliable way to delete the server and start over?

@xyadelaide
Copy link

xyadelaide commented Nov 28, 2023

Has anyone found a way to fix this? Or is the only reliable way to delete the server and start over?

I think that the best way to do this is to just use a Windows VM unfortunately. I can't get this to work after trying a few fixes.

@Merith-TK
Copy link

Merith-TK commented Nov 28, 2023 via email

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