Problem to set parameters on opensearch.service

Hi,

I’m having trouble setting a parameter on opensearch.service.

I need to set TimeoutStartSec=120s, but using the command sudo systemctl edit opensearch.service fails to save the new value.

There are no errors when editing or saving, but the parameter isn’t actually saved. Rechecking the value, it remains the default. I also tried changing the editor, replacing nano with vim, but to no avail.

I also tried using sudo bash, but that didn’t work.

This is the procedure I followed

sudo systemctl edit opensearch.service

add

[Service]
TimeoutStartSec=120s # Adjust this to whatever you need

save

sudo systemctl daemon-reload
sudo systemctl restart opensearch.service

restart machine

Can you give me a suggestion to fix the problem? Thank you all for your time.

Hey @alessio.dapelo,

Could you try editing the TimeoutStartSec value via sudo vim /lib/systemd/system/opensearch.service and then run sudo systemctl daemon-reexec and sudo systemctl daemon-reload.

Grep TimeoutStartSec with systemctl show to see if it sticks.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.