Results 1 to 8 of 8

Thread: Perplexing INIT problem - dissapearing control file

  1. #1

    Default Perplexing INIT problem - dissapearing control file

    I have installed squid and compiled and enabled the c-icap web filter but altough I can start c-icap from the command line, I cannot start it via an init script after reboot.

    What i have found is that c-icap needs a CommandControl file /var/run/c-icap.ctl to be present before the program starts. If I create c-icap.ctl manually and then either run the init script or run it from the command line it works. I can stop and restart the process fine. However after a system reboot the c-icap.ctl file dissapears and the init script fails. (note if I put c-icap.ctl in /var/run/c-icap then after reboot the file and directory dissapears!)

    Should c-icap create the .ctl file in the same way that pid files are created? there is no evidence in logs of a problem creating the file. While the clt file is mentiond in the documentation and defined in the config file there is nothing about its function or interaction with the program.

    I have tried using a systemd init script but have had no success in starting the program, that is why i'm using a SysV init script.

    Does anyone understand these .ctl files and have any comments on how to troubleshoot this issue.

    Bignige

  2. #2
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,153

    Default Re: Perplexing INIT problem - dissapearing control file

    To me this seems to be a problem with a particular product named squid and c-icap. But you never mentioned that in your threads title. How do you think that people using that particular product (and thus may have solved the problem) will ever be attrackted into reading this thread?

    Or do you think everybody runs this and thus from "Perplexing INIT problem - dissapearing control file" they will immediatly recognise this?
    Henk van Velden

  3. #3

    Default Re: Perplexing INIT problem with C-ICAP - dissapearing control file

    Quote Originally Posted by hcvv View Post
    To me this seems to be a problem with a particular product named squid and c-icap.
    Thanks for you comments.

    I had assumed that these control files are not unique to c-icap and that therfore people may have had similar problems with other programs. I have now amended my title.

  4. #4
    Join Date
    Sep 2012
    Posts
    5,138

    Default Re: Perplexing INIT problem - dissapearing control file

    /var/run is volatile directory that exists in RAM disk and content is lost after shutdown. If your program assumes something is present there, you should create file in application startup script.

  5. #5
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,153

    Default Re: Perplexing INIT problem - dissapearing control file

    I do not know if this hlps, but anyway:

    As openSUSE 12.2 used systemd and not sysvinit, crating init scripts yourself might require some more study.
    It could be that upwards compatablity is there, but for how long?

    Also @avidjaar's post leads imho to the question how up-to-date the product that you build still is.
    Henk van Velden

  6. #6

    Default Re: Perplexing INIT problem - dissapearing control file

    Quote Originally Posted by arvidjaar View Post
    /var/run is volatile directory that exists in RAM disk and content is lost after shutdown. If your program assumes something is present there, you should create file in application startup script.
    Thank you. I have modified the startup script to create the ctl file..it seems to work. will have to try a reboot to be sure.

  7. #7

    Default Re: Perplexing INIT problem - dissapearing control file

    Quote Originally Posted by hcvv View Post
    I do not know if this hlps, but anyway:

    As openSUSE 12.2 used systemd and not sysvinit, crating init scripts yourself might require some more study.
    It could be that upwards compatablity is there, but for how long?
    thank you.

    I tried making a number of systemd scripts without success despite reading the documentation. perhaps the creation of the ctl file was preventing the systemd script from working. I will have to find how to create the ctl file from within the systemd script. Altough Lennart's systemd documantation is comprehensive I have yet to find examples of more elaborate scripts which show how this can be achieved. At least for now I have a working (if rather crude) method of starting c-icap. If I find an upwardly compatible script, I will post it.

  8. #8
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: Perplexing INIT problem - dissapearing control file

    On 2013-02-26 13:16, Bignige wrote:
    >
    > arvidjaar;2530175 Wrote:
    >> /var/run is volatile directory that exists in RAM disk and content is
    >> lost after shutdown. If your program assumes something is present there,
    >> you should create file in application startup script.

    >
    > Thank you. I have modified the startup script to create the ctl
    > file..it seems to work. will have to try a reboot to be sure.


    It could be that the control file is expected to be created by another
    service. Ie, that two services have to be started one after the other
    for this to work; the second one checks the existence of the file to
    know that the other part succeeded.

    Maybe by looking at systemv start scripts in another (earlier) openSUSE
    version you could find out.

    And obviously, if squid was installed from openSUSE repos, you should
    report this problem in bugzilla.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 12.1 x86_64 "Asparagus" at Telcontar)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •