Apps Failing to Start on boot

TallRocko

Cadet
Joined
Aug 7, 2023
Messages
5
When my server boots, the apps fail to start due to Kubernetes failing to find the network interface. Note I host Pfsense in a VM on my server, and I suspect this may be a contributing factor. After everything is booted I can fix the issue by changing the Ip V4 gateway to a different port and then back to the original. I am wondering if I can delay the startup of my apps or disable the network config check.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
Soimething like this?
 

TallRocko

Cadet
Joined
Aug 7, 2023
Messages
5
Soimething like this?
The issue is with Kubernetes being unable to start preventing my apps from getting a chance to start. When I boot, it says Applications are not running on the apps screen. When I check the notification, it says that Kubernetes was unable to bind the ipv4. I will try to get the notification to help.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
I guess my point being if you set the shutdown script as I suggest in that post to stop your apps first, then on startup, they aren't trying to start.

Then, set a post-init script to wait for your VM to be up (ping it until a response comes back), then start the apps... I guess you could (re)start k3s first if that's the real issue.
 

TallRocko

Cadet
Joined
Aug 7, 2023
Messages
5
I guess my point being if you set the shutdown script as I suggest in that post to stop your apps first, then on startup, they aren't trying to start.

Then, set a post-init script to wait for your VM to be up (ping it until a response comes back), then start the apps... I guess you could (re)start k3s first if that's the real issue.
I tried to make it restart with a post init which didn't work. I also tried with a start on post init neither worked
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
I don't think you're following what I'm suggesting, but maybe I'm missing something...

You have this situation currently (?):

On startup, the pfSense VM isn't yet running, so no working network.

Kubernetes fails to start due to the lack of network.

Later it can all be made to work by making a trivial change to network settings and reverting it.

So, how is your network setup on TrueNAS?

Are you using DHCP? (you must not do that if you want to rely on networking before pfSense is up).

Are you using a bridge (I think you must be). Is the NAS IP on that bridge rather than the NIC?
 

TallRocko

Cadet
Joined
Aug 7, 2023
Messages
5
My Server is using DHCP with netwait enabled. I have one network port on the motherboard and I pass through two ports on a nic to the VM but truenas still sees both of the ports. The first picture is of my network settings, the second is of the apps network settings, and the third is of my network interfaces.
20230809_220551.jpg
20230809_220625.jpg
20230809_220839.jpg
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703

TallRocko

Cadet
Joined
Aug 7, 2023
Messages
5
Setting the Ip to static seems to have fixed it. I didn't bother with bridging the ports for my vm because I didn't want to risk messing up my VM and breaking my network because it hosts my router. Thanks for all the help!
 
Top