Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid the error "checkstart entered FATAL state, too many start retries too quickly" #29

Open
Potomac54 opened this issue Apr 15, 2019 · 8 comments

Comments

@Potomac54
Copy link

@lucasdiedrich @marcbria

It seems that supervisord is not correctly configured for running ojs-pre-start script, in the console I can see these 2 errors messages :

  • INFO exited: checkstart (exit status 0; not expected)
  • INFO gave up: checkstart entered FATAL state, too many start retries too quickly

one solution is to use the options "startsecs" and "exitcodes" in /etc/supervisord.conf

[program:checkstart]
command=/usr/local/bin/ojs-pre-start
startsecs=0
exitcodes=0

http://supervisord.org/configuration.html

after these modifications the new output of supervisord about checkstart process, no errors like "fatal state" :

  • INFO spawned: 'checkstart' with pid 11
  • INFO success: checkstart entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
  • INFO exited: checkstart (exit status 0; expected)
  • INFO success: apache entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
@lucasdiedrich
Copy link
Owner

Thats awesome @Potomac54, the error occurs because supervisor normally need an service to be running, and the exit of ojs-pre-start its not a running process and i never found and work around. Can you please make a PR with that?

Or i will integrate this as soon as i'm possible.

Thanks

@Potomac54
Copy link
Author

Can you tell me how can I make pull request in your github ?

Do I need to be a member of your github ?
I tried to clone your github (php7-test branch), and then make a pull with my modifications, it doesn't accept my credentials

$ git push
Username for 'https://github.com': potomac
Password for 'https://[email protected]': 
remote: Permission to lucasdiedrich/ojs.git denied to Potomac.
fatal: unable to access 'https://github.com/lucasdiedrich/ojs.git/': The requested URL returned error: 403

then I tried to use the "pull request" feature of your github, but not sure to understand how it works

@marcbria
Copy link
Contributor

In short:

  1. fork lucas repo.
  2. "git clone" your forked repo to your local computer.
  3. Make your chages.
  4. "git commit" to your local repo.
  5. "git push" to your forked repo.
  6. Visit github and the tool will ask you to create a PR with your changes.
  7. Delete your fork and local repo.

Here you have github's howto:
https://help.github.com/en/articles/creating-a-pull-request

@Potomac
Copy link

Potomac commented Apr 16, 2019

@marcbria @lucasdiedrich

Ok I forked lucas repo, I made the change in the "php7-test" branch, and I made a pull request :
#31

@Potomac
Copy link

Potomac commented Apr 16, 2019

I notice a bug in my pull request, ojs-pre-start is not started when startsecs=0,

so the solution is to set this option to 1, like this :

[program:checkstart]
command=/usr/local/bin/ojs-pre-start
startsecs=1
exitcodes=0

@lucasdiedrich
Copy link
Owner

@Potomac thanks for your help, unfortunetly your second PR included breaking code, i mentioned that over the PR, thanks.

@Potomac
Copy link

Potomac commented Apr 16, 2019

@lucasdiedrich @marcbria : I fixed the wrong path in a new commit,

for the supervisor problem my fix doesn't really work, sometimes I get the message "fatal state", I think the main problem is that supervisord is designed to run daemons, not really simple bash scripts,

one solution would be to start ojs-pre-start with an init system like systemd, alpine linux uses a different init software, openRC : https://wiki.alpinelinux.org/wiki/Alpine_Linux_Init_System

another solution may be to use a cron script, with settings to run once ojs-pre-start script

@lucasdiedrich
Copy link
Owner

@Potomac thats exactly the problem, supervisor is designed to run daemons, using alpine init system is the best option, as soon as possible going to look into this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants