PX4 restart error Ubuntu

Most of the times when I restart PX4, I get this error. How to solve?
version 1.14.2dev

[0/1] cd /home/faps/PX4-Autopilot/buil...topilot/build/px4_sitl_default/bin/px4

______  __   __    ___ 
| ___ \ \ \ / /   /   |
| |_/ /  \ V /   / /| |
|  __/   /   \  / /_| |
| |     / /^\ \ \___  |
\_|     \/   \/     |_/

px4 starting.

INFO  [px4] startup script: /bin/sh etc/init.d-posix/rcS 0
INFO  [init] found model autostart file as SYS_AUTOSTART=22001
INFO  [param] selected parameter default file parameters.bson
INFO  [param] importing from 'parameters.bson'
INFO  [parameters] BSON document size 359 bytes, decoded 359 bytes (INT32:15, FLOAT:3)
INFO  [param] selected parameter backup file parameters_backup.bson
INFO  [dataman] data manager file './dataman' size is 7866640 bytes
INFO  [init] gazebo already running world: default
WARN  [init] PX4_GZ_MODEL_NAME or PX4_GZ_MODEL not set using PX4_SIM_MODEL.
INFO  [gz_bridge] world: default, model name: hxcop_0, simulation model: hxcop
INFO  [lockstep_scheduler] setting initial absolute time to 1306208000 us
INFO  [commander] LED: open /dev/led0 failed (22)
WARN  [health_and_arming_checks] Preflight Fail: ekf2 missing data
INFO  [tone_alarm] home set
INFO  [mavlink] mode: Normal, data rate: 4000000 B/s on udp port 18570 remote port 14550
INFO  [mavlink] mode: Onboard, data rate: 4000000 B/s on udp port 14580 remote port 14540
INFO  [mavlink] mode: Onboard, data rate: 4000 B/s on udp port 14280 remote port 14030
INFO  [mavlink] mode: Gimbal, data rate: 400000 B/s on udp port 13030 remote port 13280
INFO  [logger] logger started (mode=all)
INFO  [logger] Start file log (type: full)
INFO  [logger] [logger] ./log/2024-07-31/21_02_26.ulg	
INFO  [logger] Opened full log file: ./log/2024-07-31/21_02_26.ulg
INFO  [mavlink] MAVLink only on localhost (set param MAV_{i}_BROADCAST = 1 to enable network)
INFO  [mavlink] MAVLink only on localhost (set param MAV_{i}_BROADCAST = 1 to enable network)
INFO  [px4] Startup script returned successfully
pxh> INFO  [mavlink] partner IP: 127.0.0.1
INFO  [tone_alarm] notify negative
WARN  [health_and_arming_checks] Preflight Fail: Attitude failure (roll)
INFO  [tone_alarm] notify negative
WARN  [health_and_arming_checks] Preflight Fail: Attitude failure (roll)
WARN  [health_and_arming_checks] Preflight Fail: Attitude failure (roll)

If you encounter with different movements in QGroundControl like vehicle moving and rolling and errors like Horizontal Position,Altitude estimate etc. I guess it’s about ekf estimation. Probably you don’t reset the simulation completely. If you working in Linux try to check active processes (top command ) and if gazebo still running(it’s name look like gz orda gazebo) try to kill it. Also you can try to restart ekf from console screen in Qground (ekf2 stop and ekf2 start). I might have misunderstood the problem if so please share a few screenshots.

I am doing offboard control. I have script which kills all processes related to it and restart, but somehow, after one or few restarts this happens