KM
2016-Aug-04 18:35 UTC
[CentOS] centos 7- boot doesn't wait for startup script to complete
thank you for the feedback.? I tried using Before=systemd-user-sessions.service.? At first glance it seems to work, but then the oracle DB shuts down.? Note that myservices starts oracle and then does a few things for our application. When I remove that entry, it goes right to the login as I originally described, but the oracle DB does not shut down.? maybe I have the wrong combination of timeout options with this other option or something, although the timeouts seemed to work also. Just thought I'd throw it out there.? In either case, thanks for helping. I looked online for an explanation of the options for these files, other that the systemd manual page which is hard to use.? I really couldn't find one.? Any suggestions? Thanks again.KM From: Jonathan Billings <billings at negate.org> To: CentOS mailing list <centos at centos.org> Sent: Tuesday, August 2, 2016 9:28 AM Subject: Re: [CentOS] centos 7- boot doesn't wait for startup script to complete On Tue, Aug 02, 2016 at 12:56:21PM +0000, KM wrote:> # used to set up the Myservices onstartup > [Unit] > Description=Start and stop Myservices > > [Service] > Type=oneshot > ExecStart=/etc/init.d/Myservices start > ExecStop=/etc/init.d/Myservices stop > RemainAfterExit=yes > > [Install] > WantedBy=multi-user.targetReformatting so it is readable. What you probably want to do is to add something to the [Unit] section to make the completion of the be a requirement for the user login service.? Something like: Before=systemd-user-sessions.service You will most likely also need to add a TimeoutStartSec= to your [Service] section to give it a longer time to run before systemd times out the service start. -- Jonathan Billings <billings at negate.org> _______________________________________________ CentOS mailing list CentOS at centos.org https://lists.centos.org/mailman/listinfo/centos
Jonathan Billings
2016-Aug-04 21:10 UTC
[CentOS] centos 7- boot doesn't wait for startup script to complete
> On Aug 4, 2016, at 14:35, KM <info4km at yahoo.com> wrote: > > thank you for the feedback. I tried using Before=systemd-user-sessions.service. At first glance it seems to work, but then the oracle DB shuts down. Note that myservices starts oracle and then does a few things for our application. > When I remove that entry, it goes right to the login as I originally described, but the oracle DB does not shut down. maybe I have the wrong combination of timeout options with this other option or something, although the timeouts seemed to work also. > Just thought I'd throw it out there. In either case, thanks for helping. > I looked online for an explanation of the options for these files, other that the systemd manual page which is hard to use. I really couldn't find one. Any suggestions? > Thanks again.KMIs your service still a oneshot type? If you are starting daemonized services, systemd is probably terminating them. You should use a 'forking' type for services that will keep around processes.> From: Jonathan Billings <billings at negate.org> > To: CentOS mailing list <centos at centos.org> > Sent: Tuesday, August 2, 2016 9:28 AM > Subject: Re: [CentOS] centos 7- boot doesn't wait for startup script to complete > >> On Tue, Aug 02, 2016 at 12:56:21PM +0000, KM wrote: >> # used to set up the Myservices onstartup >> [Unit] >> Description=Start and stop Myservices >> >> [Service] >> Type=oneshot >> ExecStart=/etc/init.d/Myservices start >> ExecStop=/etc/init.d/Myservices stop >> RemainAfterExit=yes >> >> [Install] >> WantedBy=multi-user.target > > Reformatting so it is readable. > > What you probably want to do is to add something to the [Unit] section > to make the completion of the be a requirement for the user login > service. Something like: > > Before=systemd-user-sessions.service > > You will most likely also need to add a TimeoutStartSec= to your > [Service] section to give it a longer time to run before systemd times > out the service start. > > > -- > Jonathan Billings <billings at negate.org> > _______________________________________________ > CentOS mailing list > CentOS at centos.org > https://lists.centos.org/mailman/listinfo/centos > > > > _______________________________________________ > CentOS mailing list > CentOS at centos.org > https://lists.centos.org/mailman/listinfo/centos
KM
2016-Aug-05 15:23 UTC
[CentOS] centos 7- boot doesn't wait for startup script to complete
Thanks for all the help.? At this point it really only works the original way.? Let the login prompt appear, and have the service continue to start.? So I will talk to the other folks on the project to see if that is acceptable. Thanks againKM From: Jonathan Billings <billings at negate.org> To: CentOS mailing list <centos at centos.org> Sent: Thursday, August 4, 2016 5:10 PM Subject: Re: [CentOS] centos 7- boot doesn't wait for startup script to complete> On Aug 4, 2016, at 14:35, KM <info4km at yahoo.com> wrote: > > thank you for the feedback.? I tried using Before=systemd-user-sessions.service.? At first glance it seems to work, but then the oracle DB shuts down.? Note that myservices starts oracle and then does a few things for our application. > When I remove that entry, it goes right to the login as I originally described, but the oracle DB does not shut down.? maybe I have the wrong combination of timeout options with this other option or something, although the timeouts seemed to work also. > Just thought I'd throw it out there.? In either case, thanks for helping. > I looked online for an explanation of the options for these files, other that the systemd manual page which is hard to use.? I really couldn't find one.? Any suggestions? > Thanks again.KMIs your service still a oneshot type?? If you are starting daemonized services, systemd is probably terminating them. You should use a 'forking' type for services that will keep around processes.>? ? ? From: Jonathan Billings <billings at negate.org> > To: CentOS mailing list <centos at centos.org> > Sent: Tuesday, August 2, 2016 9:28 AM > Subject: Re: [CentOS] centos 7- boot doesn't wait for startup script to complete > >> On Tue, Aug 02, 2016 at 12:56:21PM +0000, KM wrote: >> # used to set up the Myservices onstartup >> [Unit] >> Description=Start and stop Myservices >> >> [Service] >> Type=oneshot >> ExecStart=/etc/init.d/Myservices start >> ExecStop=/etc/init.d/Myservices stop >> RemainAfterExit=yes >> >> [Install] >> WantedBy=multi-user.target > > Reformatting so it is readable. > > What you probably want to do is to add something to the [Unit] section > to make the completion of the be a requirement for the user login > service.? Something like: > > Before=systemd-user-sessions.service > > You will most likely also need to add a TimeoutStartSec= to your > [Service] section to give it a longer time to run before systemd times > out the service start. > > > -- > Jonathan Billings <billings at negate.org> > _______________________________________________ > CentOS mailing list > CentOS at centos.org > https://lists.centos.org/mailman/listinfo/centos > > > > _______________________________________________ > CentOS mailing list > CentOS at centos.org > https://lists.centos.org/mailman/listinfo/centos_______________________________________________ CentOS mailing list CentOS at centos.org https://lists.centos.org/mailman/listinfo/centos
KM
2016-Aug-09 19:07 UTC
[CentOS] centos 7- boot doesn't wait for startup script to complete
I am taking a step back.? I have a normal rc?script that is installed with our product.? All of the CentOS 7 documentation says the script should work on startup/shutdown.?? But it doesn't.?? If I run the script manually it works as it should of course. When I restart the server, nothing happens or starts up.? So my question is should it be working as it was without me changing anything? The only way I was able to make it work was to add a service file for it in the systemd directory which is what led to my email in the trail attached below.? Any way to see what it is doing?? I'll try debugging into out application logs again, but haven't had much luck with that.Thanks in advanceKM From: Jonathan Billings <billings at negate.org> To: CentOS mailing list <centos at centos.org> Sent: Thursday, August 4, 2016 5:10 PM Subject: Re: [CentOS] centos 7- boot doesn't wait for startup script to complete> On Aug 4, 2016, at 14:35, KM <info4km at yahoo.com> wrote: > > thank you for the feedback.? I tried using Before=systemd-user-sessions.service.? At first glance it seems to work, but then the oracle DB shuts down.? Note that myservices starts oracle and then does a few things for our application. > When I remove that entry, it goes right to the login as I originally described, but the oracle DB does not shut down.? maybe I have the wrong combination of timeout options with this other option or something, although the timeouts seemed to work also. > Just thought I'd throw it out there.? In either case, thanks for helping. > I looked online for an explanation of the options for these files, other that the systemd manual page which is hard to use.? I really couldn't find one.? Any suggestions? > Thanks again.KMIs your service still a oneshot type?? If you are starting daemonized services, systemd is probably terminating them. You should use a 'forking' type for services that will keep around processes.>? ? ? From: Jonathan Billings <billings at negate.org> > To: CentOS mailing list <centos at centos.org> > Sent: Tuesday, August 2, 2016 9:28 AM > Subject: Re: [CentOS] centos 7- boot doesn't wait for startup script to complete > >> On Tue, Aug 02, 2016 at 12:56:21PM +0000, KM wrote: >> # used to set up the Myservices onstartup >> [Unit] >> Description=Start and stop Myservices >> >> [Service] >> Type=oneshot >> ExecStart=/etc/init.d/Myservices start >> ExecStop=/etc/init.d/Myservices stop >> RemainAfterExit=yes >> >> [Install] >> WantedBy=multi-user.target > > Reformatting so it is readable. > > What you probably want to do is to add something to the [Unit] section > to make the completion of the be a requirement for the user login > service.? Something like: > > Before=systemd-user-sessions.service > > You will most likely also need to add a TimeoutStartSec= to your > [Service] section to give it a longer time to run before systemd times > out the service start. > > > -- > Jonathan Billings <billings at negate.org> > _______________________________________________ > CentOS mailing list > CentOS at centos.org > https://lists.centos.org/mailman/listinfo/centos > > > > _______________________________________________ > CentOS mailing list > CentOS at centos.org > https://lists.centos.org/mailman/listinfo/centos_______________________________________________ CentOS mailing list CentOS at centos.org https://lists.centos.org/mailman/listinfo/centos
Apparently Analagous Threads
- centos 7- boot doesn't wait for startup script to complete
- centos 7- boot doesn't wait for startup script to complete
- centos 7- boot doesn't wait for startup script to complete
- centos 7- boot doesn't wait for startup script to complete
- centos 7- boot doesn't wait for startup script to complete