What would prevent cardano-node 1.29 from creating it's node.socket file on startup?

Setup a new cardano-node 1.29 relay.

Sometimes it creates node.socket when the process starts, most of the time it doesn’t.

What would prevent cardano-node from creating node.socket?
Is there a delay in creating it when the process first starts?
Could there be an issue with the configuration of cardano-node that is causing this, if so what could it be?
Or could it be something else? Bug? Poorly designed software? Administrator of this relay is an idiot?

I haven’t found much documentation describing expected behavior so looking to know what other experiences have been with this situation.

the socket file will be created when the node start… if it was issues then will not start and it will not create the file…

You can check the logs with:
journalctl -e -f -u cardano-node
sudo systemctl status cardano-node

Thanks for the suggestions.
My cardano-node process runs and I don’t see any errors or anything with it during run time that would make me suspect that there is a configuration issue, etc…

What it seems like is that sometimes it takes awhile for cardano-node to create the socket file.
I guess my assumption is someone writing code for a network service would have it create it’s socket file immediately before it does any other work. I suspect that is not the case with cardano-node. Maybe cardano-node does some sort of data integrity check before it starts it’s network services?..but not sure I’m convinced about that because I do see it logging network related messages even though the socket file isn’t created upon startup, don’t remember exactly what those messages were. I had to back off on the default logging verbose because it was making giant syslog files.

I’ll have to do a restart and time how long it takes a few times to see if it’s consistent or has something to do with the amount of data cardano-node is processing at start up. I’m going to make a guestimate that it takes longer to create the socket file every time I restart the service because the process is still syncing since it’s a new server.

Either that or I am doing something wrong and the node.socket file should get created immediately upon startup every time.

Remember that

sudo systemctl restart cardano-node will force the node to close the DB not properlly

You must use sudo systemctl stop/start cardano-node

Also the hardware configuration is very important

I didn’t realize that. Are you suggesting that the node.socket file creation may be delayed due to improper closing of the DB? I assume you are.

So if the DB is not closed properly is there a maintenance step that needs to/could be done to improve the situation?

use stop/start instead restart… u can test and check for the differences

So if the DB is not closed properly, does cardano-node recover from that automatically upon start?

Yes, but will start harder

Ok, I checked my relay, it had a node.socket file.
I did a systemctl stop and then start on it, and the node.socket file did not get created.
Waited a few more minutes, no node.socket file.

I suspect it will eventually get created at some point, although I have no idea when.

So is this delay due to previous improper systemclt restart’s and maybe “corruption” or whatever wrong happens to the DB?

Is there a way to fix the DB? Is the DB broken/corrupt?

Nope but the node.socket file will be created only when the node will start

Ok…well…per your comment earlier about restart versus stop/start…I see no behavior difference with either method of restarting cardano-node. Creation of the node.socket file is delayed either way.

So should I always expect it to take time to create the node.socket file after starting cardano-node or should it be created immediately on start with no delay?

I guess I’m just trying to understand what to expect from cardano-node.

Resources are not an issue.

Ohh no, it always be a delay, for example my node are starting in ~2 min but have 32G RAM AND 6/8 vCPU

But I saw other nodes starting in ~8 min, so always it will be a delay

Ok, now I feel better about it. Non issue then. Thanks for the insights Alex.

1 Like

IIRC the socket file will not be created until fully synced.

Regarding service start and corrupted database.

Look for TimeoutStopSec in your systemd cardano config file and make sure it’s set to something like 30sec or higher. This will give the process enough time to shutdown properly before being killed as the default time to stop is sub 1sec IIRC.

1 Like

Good point and a safe thing to do

Was looking at it sounds like systemd DefaultTimeoutStopSec is 90 seconds by default.

So is a minute and a half not long enough?