My task is to change the Timeout time from 1 min 15 s to 3 min When I run the script: sudo /bin/systemctl start elasticsearch.service
it shows Timeout. So my next steps are:
(1) $ sudo systemctl show elasticsearch | grep ^Timeout
$ sudo systemctl show elasticsearch | grep ^Timeout
which returns: TimeoutStartUSec=1min 15s TimeoutStopUSec=infinity
(2) Create a service drop-in configuration directory. $ sudo mkdir /etc/systemd/system/elasticsearch.service.d
(3) With this query now I`m trying to change the Timeout time: $ echo -e "[Service]\nTimeoutStartSec=180" | sudo tee
$ echo -e "[Service]\nTimeoutStartSec=180" | sudo tee
(4) Reload the system: $ sudo systemctl daemon-reload
(5) And when I check the new Timeout it returns the same TimeoutStartUSec=1min 15s TimeoutStopUSec=infinity
Why the system still returns the same Timeout time?
Thank you!
You want to provide tee
an output file. Try running man tee
, it'll be of more detail.
Maybe do .... | sudo tee /etc/systemd/system/elasticsearch.service.d/someconfigfile
.... | sudo tee /etc/systemd/system/elasticsearch.service.d/someconfigfile
instead
I am writing an answer for my question. To change the TimeOut time all I did was: sudo su
and then did all the steps (from 1 to 5 from my question).
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.