<!DOCTYPE html><html><head><title></title><style type="text/css">p.MsoNormal,p.MsoNoSpacing{margin:0}</style></head><body><div>On Sun, Mar 10, 2024, at 16:14, Ricardo wrote:<br></div><blockquote type="cite" id="qt" style=""><div dir="ltr"><p lang="en-US" style="font-variant-numeric:normal;font-variant-east-asian:normal;font-variant-alternates:normal;margin-bottom:0.1in;line-height:115%;background-color:transparent;background-position-x:0%;background-position-y:0%;background-repeat:repeat;background-attachment:scroll;background-image:none;background-size:auto;background-origin:padding-box;background-clip:border-box;"><span class="color" style="color:#222222;"><span class="font" style="font-family:Arial, Helvetica, sans-serif;"><span>On
a custom systemctl service, when start service it seems starting
without any message, but when it check by journalctl command it
reporter as Failure.</span></span></span><br></p><p lang="en-US" style="font-variant-numeric:normal;font-variant-east-asian:normal;font-variant-alternates:normal;margin-bottom:0.1in;line-height:115%;background-color:transparent;background-position-x:0%;background-position-y:0%;background-repeat:repeat;background-attachment:scroll;background-image:none;background-size:auto;background-origin:padding-box;background-clip:border-box;"><span class="color" style="color:#222222;"><span class="font" style="font-family:Arial, Helvetica, sans-serif;"><span>But
if manually run service program it starts without any problem and
message.</span></span></span><br></p><p lang="en-US" style="font-variant-numeric:normal;font-variant-east-asian:normal;font-variant-alternates:normal;margin-bottom:0.1in;line-height:115%;background-color:transparent;background-position-x:0%;background-position-y:0%;background-repeat:repeat;background-attachment:scroll;background-image:none;background-size:auto;background-origin:padding-box;background-clip:border-box;"><span class="color" style="color:#222222;"><span class="font" style="font-family:Arial, Helvetica, sans-serif;"><span>The
bellow is program to execute as service, which have work without any
problems on previous linux service.</span></span></span><br></p><p lang="en-US" style="font-variant-numeric:normal;font-variant-east-asian:normal;font-variant-alternates:normal;margin-bottom:0.1in;line-height:115%;background-color:transparent;background-position-x:0%;background-position-y:0%;background-repeat:repeat;background-attachment:scroll;background-image:none;background-size:auto;background-origin:padding-box;background-clip:border-box;"><span class="color" style="color:#222222;"><span class="font" style="font-family:Arial, Helvetica, sans-serif;"><span>#
asterisk</span></span></span><br></p><p lang="en-US" style="font-variant-numeric:normal;font-variant-east-asian:normal;font-variant-alternates:normal;margin-bottom:0.1in;line-height:115%;background-color:transparent;background-position-x:0%;background-position-y:0%;background-repeat:repeat;background-attachment:scroll;background-image:none;background-size:auto;background-origin:padding-box;background-clip:border-box;"><span class="color" style="color:#222222;"><span class="font" style="font-family:Arial, Helvetica, sans-serif;"><span>#
asterisk -rx "core stop now"</span></span></span><br></p><p style="margin-bottom:0.1in;line-height:115%;background-color:transparent;background-position-x:0%;background-position-y:0%;background-repeat:repeat;background-attachment:scroll;background-image:none;background-size:auto;background-origin:padding-box;background-clip:border-box;"></p><div><br></div><p></p><p lang="en-US" style="font-variant-numeric:normal;font-variant-east-asian:normal;font-variant-alternates:normal;margin-bottom:0.1in;line-height:115%;background-color:transparent;background-position-x:0%;background-position-y:0%;background-repeat:repeat;background-attachment:scroll;background-image:none;background-size:auto;background-origin:padding-box;background-clip:border-box;"><span class="color" style="color:#222222;"><span class="font" style="font-family:Arial, Helvetica, sans-serif;"><span>#
systemctl start asterisk.service</span></span></span><br></p></div></blockquote><div><br></div><div>This only issues a request to start the service; it does not actually wait for the service to start, or report on the results of the start request.<br></div><div><br></div><blockquote type="cite" id="qt" style=""><div dir="ltr"><p lang="en-US" style="font-variant-numeric:normal;font-variant-east-asian:normal;font-variant-alternates:normal;margin-bottom:0.1in;line-height:115%;background-color:transparent;background-position-x:0%;background-position-y:0%;background-repeat:repeat;background-attachment:scroll;background-image:none;background-size:auto;background-origin:padding-box;background-clip:border-box;"><span class="color" style="color:#222222;"><span class="font" style="font-family:Arial, Helvetica, sans-serif;"><span>#</span></span></span><br></p><p lang="en-US" style="font-variant-numeric:normal;font-variant-east-asian:normal;font-variant-alternates:normal;margin-bottom:0.1in;line-height:115%;background-color:transparent;background-position-x:0%;background-position-y:0%;background-repeat:repeat;background-attachment:scroll;background-image:none;background-size:auto;background-origin:padding-box;background-clip:border-box;"><span class="color" style="color:#222222;"><span class="font" style="font-family:Arial, Helvetica, sans-serif;"><span>#
journalctl -xe |grep asterisk</span></span></span><br></p><p lang="en-US" style="font-variant-numeric:normal;font-variant-east-asian:normal;font-variant-alternates:normal;margin-bottom:0.1in;line-height:115%;background-color:transparent;background-position-x:0%;background-position-y:0%;background-repeat:repeat;background-attachment:scroll;background-image:none;background-size:auto;background-origin:padding-box;background-clip:border-box;"><span class="color" style="color:#222222;"><span class="font" style="font-family:Arial, Helvetica, sans-serif;"><span>--
Subject: Unit asterisk.service has finished start-up</span></span></span><br></p><p lang="en-US" style="font-variant-numeric:normal;font-variant-east-asian:normal;font-variant-alternates:normal;margin-bottom:0.1in;line-height:115%;background-color:transparent;background-position-x:0%;background-position-y:0%;background-repeat:repeat;background-attachment:scroll;background-image:none;background-size:auto;background-origin:padding-box;background-clip:border-box;"><span class="color" style="color:#222222;"><span class="font" style="font-family:Arial, Helvetica, sans-serif;"><span>--
Unit asterisk.service has finished starting up.</span></span></span><br></p><p lang="en-US" style="font-variant-numeric:normal;font-variant-east-asian:normal;font-variant-alternates:normal;margin-bottom:0.1in;line-height:115%;background-color:transparent;background-position-x:0%;background-position-y:0%;background-repeat:repeat;background-attachment:scroll;background-image:none;background-size:auto;background-origin:padding-box;background-clip:border-box;"><span class="color" style="color:#222222;"><span class="font" style="font-family:Arial, Helvetica, sans-serif;"><span>Mar
10 10:20:15 localhost.localdomain asterisk[1536]: ASTdb
initialization failed. ASTERISK EXITING!</span></span></span><br></p><p lang="en-US" style="font-variant-numeric:normal;font-variant-east-asian:normal;font-variant-alternates:normal;margin-bottom:0.1in;line-height:115%;background-color:transparent;background-position-x:0%;background-position-y:0%;background-repeat:repeat;background-attachment:scroll;background-image:none;background-size:auto;background-origin:padding-box;background-clip:border-box;"><span class="color" style="color:#222222;"><span class="font" style="font-family:Arial, Helvetica, sans-serif;"><span>Mar
10 10:20:15 localhost.localdomain asterisk[1536]: Unable to open
Asterisk database '/var/lib/asterisk/astdb.sqlite3': unable to open
database file</span></span></span><br></p><p lang="en-US" style="font-variant-numeric:normal;font-variant-east-asian:normal;font-variant-alternates:normal;margin-bottom:0.1in;line-height:115%;background-color:transparent;background-position-x:0%;background-position-y:0%;background-repeat:repeat;background-attachment:scroll;background-image:none;background-size:auto;background-origin:padding-box;background-clip:border-box;"><span class="color" style="color:#222222;"><span class="font" style="font-family:Arial, Helvetica, sans-serif;"><span>Mar
10 10:20:15 localhost.localdomain systemd[1]: asterisk.service: main
process exited, code=exited, status=1/FAILURE</span></span></span><br></p><p lang="en-US" style="font-variant-numeric:normal;font-variant-east-asian:normal;font-variant-alternates:normal;margin-bottom:0.1in;line-height:115%;background-color:transparent;background-position-x:0%;background-position-y:0%;background-repeat:repeat;background-attachment:scroll;background-image:none;background-size:auto;background-origin:padding-box;background-clip:border-box;"><span class="color" style="color:#222222;"><span class="font" style="font-family:Arial, Helvetica, sans-serif;"><span>Mar
10 10:20:15 localhost.localdomain systemd[1]: Unit asterisk.service
entered failed state.</span></span></span><br></p><p lang="en-US" style="font-variant-numeric:normal;font-variant-east-asian:normal;font-variant-alternates:normal;margin-bottom:0.1in;line-height:115%;background-color:transparent;background-position-x:0%;background-position-y:0%;background-repeat:repeat;background-attachment:scroll;background-image:none;background-size:auto;background-origin:padding-box;background-clip:border-box;"><span class="color" style="color:#222222;"><span class="font" style="font-family:Arial, Helvetica, sans-serif;"><span>Mar
10 10:20:15 localhost.localdomain systemd[1]: asterisk.service
failed.</span></span></span><br></p></div></blockquote><div><br></div><div>The program was unable to access it database, likely due to the configuration in the .service file. It may be running as the wrong user/group, or have filesystem protection settings which disallow access to /var/lib/asterisk, or possibly other things. Running the program manually would not have the same restrictions in place, even if it is run as the proper user and group.<br></div><div><br></div><div>Check the asterisk.service file, in particular the [Service] section, to see if there are any sandboxing restrictions being placed on the service.<br></div><div><br></div></body></html>