How to make wikidctl start automatically when server reboot

classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

How to make wikidctl start automatically when server reboot

Dacosta
Dear all,

Could you please give a solution how to start wikidctl automatically when the wikid server reboot?

Regards,
Phuoc
Reply | Threaded
Open this post in threaded view
|

Re: How to make wikidctl start automatically when server reboot

Nick Owen
Administrator
https://www.wikidsystems.com/support/wikid-support-center/faq/how-can-i-restart-the-server-without-being-asked-for-the-passphrase

Then, there is a script called 'wikid' in /opt/WiKID/conf/templates
that you can use in /etc/init.d for your service.

HTH,

nick

On Fri, Oct 26, 2012 at 12:26 AM, Dacosta [via WiKID Strong
Authentication Forums] <[hidden email]>
wrote:

> Dear all,
>
> Could you please give a solution how to start wikidctl automatically when
> the wikid server reboot?
>
> Regards,
> Phuoc
>
> ________________________________
> If you reply to this email, your message will be added to the discussion
> below:
> http://wikid-strong-authentication-forums.1491522.n2.nabble.com/How-to-make-wikidctl-start-automatically-when-server-reboot-tp7574730.html
> To start a new topic under Support, email
> [hidden email]
> To unsubscribe from WiKID Strong Authentication Forums, click here.
> NAML



--
--
Nick Owen
WiKID Systems, Inc.
http://www.wikidsystems.com
Commercial/Open Source Two-Factor Authentication
Reply | Threaded
Open this post in threaded view
|

Re: How to make wikidctl start automatically when server reboot

Dacosta
Thank Mr. Nick, it works properly.

Regards,
Dacosta
Reply | Threaded
Open this post in threaded view
|

Re: How to make wikidctl start automatically when server reboot

Doug Foster
In reply to this post by Nick Owen
As a unix babe, I will add some details for the help of other unix babes:
1) I stored the passphrase as instructed and ran
  wikidctl restart
to prove that the application would now start without prompting.

2) I reviewed the template and concluded that it did not require customization.

3) I noticed that in an early step, the script creates a command called wikid.   In a bit of paranoia, I decided that the script should have a different name than the command it creates, so when I copied the script, I also renamed it:

  cd /etc/init.d
  cp /opt/WiKID/conf/templates/wikid wikid1

4) After some testing failures, I realized that it needed execute permission:

  cd /etc/init.d
  chmod +x wikid1

I also verified that this set all of the execute bits:
  cd /etc/init.d
  ls -l wikid1
  -rwxr-xr-x. 1 root root 1312 Jan 10 09:05 wikid1

5) I tested the start command manually
/etc/init.d/wikid1 start

6) Unfortunately, it is still not starting at reboot.  So I need some help with debugging
Reply | Threaded
Open this post in threaded view
|

Re: How to make wikidctl start automatically when server reboot

Nick Owen
Did you add the cert passphrase to /etc/WiKID/security?
Reply | Threaded
Open this post in threaded view
|

Re: How to make wikidctl start automatically when server reboot

Doug Foster
Yes.   Manual start works perfectly without any prompting.
Reply | Threaded
Open this post in threaded view
|

Re: How to make wikidctl start automatically when server reboot

Nick Owen
Administrator
If you change it back to 'wikid' does it work?

On Tue, Jan 10, 2017 at 10:04 AM, Doug Foster [via WiKID Strong
Authentication Forums] <[hidden email]>
wrote:

> Yes.   Manual start works perfectly without any prompting.
>
> ________________________________
> If you reply to this email, your message will be added to the discussion
> below:
> http://wikid-strong-authentication-forums.1491522.n2.nabble.com/How-to-make-wikidctl-start-automatically-when-server-reboot-tp7574730p7575364.html
> To start a new topic under Support, email
> [hidden email]
> To unsubscribe from WiKID Strong Authentication Forums, click here.
> NAML



--
Nick Owen  --  WiKID Systems, Inc.
http://www.wikidsystems.com
On-premises Two-Factor Authentication
http://twitter.com/wikidsystems | #wikid on freenode.net
Get our low-volume newsletter - Notices, updates : http://eepurl.com/zzUeP
Reply | Threaded
Open this post in threaded view
|

Re: How to make wikidctl start automatically when server reboot

Doug Foster
Just tried that without success.   Previously, I also tried the /etc/init folder instead of /etc/init.d

I waited more than 2 minutes after server reboot, and port 443 never opened.   When I ran "/etc/init.d/wikid stop", it said that TomCat, TimeCop, Logger, and Database were already stopped. When I ran "/etc/init.d/wikid start" everything starts up perfectly.

I have also tried "sudo su -" before running the command, to see if privilege level affected the script's ability to run correct, but no errors occur either way.   Here are the results when I run it manually:

[root@wikid ~]# /etc/init.d/wikid start
Starting wikid
Starting database ... Success!
Starting Logger service ... Success!
Starting TimeCop service ... Success!
Starting wAuth protocol daemon ...
Passphrase is good.  Proceeding ...-Success!
Starting Tomcat server ... Success!
Starting RADIUS protocol daemon ... Success!
LDAP protocol not enabled.
                                                           [  OK  ]
[root@wikid ~]#
Reply | Threaded
Open this post in threaded view
|

Re: How to make wikidctl start automatically when server reboot

Nick Owen
Administrator
hmm.   You can run 'more /opt/WiKID/tomcat/logs/catalina.out' to see
if there's an error message.

On Tue, Jan 10, 2017 at 10:21 AM, Doug Foster [via WiKID Strong
Authentication Forums] <[hidden email]>
wrote:

> Just tried that without success.   Previously, I also tried the /etc/init
> folder instead of /etc/init.d
>
> I waited more than 2 minutes after server reboot, and port 443 never opened.
> When I ran "/etc/init.d/wikid stop", it said that TomCat, TimeCop, Logger,
> and Database were already stopped. When I ran "/etc/init.d/wikid start"
> everything starts up perfectly.
>
> I have also tried "sudo su -" before running the command, to see if
> privilege level affected the script's ability to run correct, but no errors
> occur either way.   Here are the results when I run it manually:
>
> [root@wikid ~]# /etc/init.d/wikid start
> Starting wikid
> Starting database ... Success!
> Starting Logger service ... Success!
> Starting TimeCop service ... Success!
> Starting wAuth protocol daemon ...
> Passphrase is good.  Proceeding ...-Success!
> Starting Tomcat server ... Success!
> Starting RADIUS protocol daemon ... Success!
> LDAP protocol not enabled.
>                                                            [  OK  ]
> [root@wikid ~]#
>
>
> ________________________________
> If you reply to this email, your message will be added to the discussion
> below:
> http://wikid-strong-authentication-forums.1491522.n2.nabble.com/How-to-make-wikidctl-start-automatically-when-server-reboot-tp7574730p7575367.html
> To start a new topic under Support, email
> [hidden email]
> To unsubscribe from WiKID Strong Authentication Forums, click here.
> NAML



--
Nick Owen  --  WiKID Systems, Inc.
http://www.wikidsystems.com
On-premises Two-Factor Authentication
http://twitter.com/wikidsystems | #wikid on freenode.net
Get our low-volume newsletter - Notices, updates : http://eepurl.com/zzUeP
Reply | Threaded
Open this post in threaded view
|

Re: How to make wikidctl start automatically when server reboot

Doug Foster
The plot thickens.  No log created at startup, so the system is not trying to run the file.
Reply | Threaded
Open this post in threaded view
|

Re: How to make wikidctl start automatically when server reboot

Nick Owen
Administrator
Did you run chkconfig on?

On Jan 10, 2017 11:14 AM, "Doug Foster [via WiKID Strong Authentication Forums]" <[hidden email]> wrote:
The plot thickens.  No log created at startup, so the system is not trying to run the file.


To start a new topic under Support, email [hidden email]
To unsubscribe from WiKID Strong Authentication Forums, click here.
NAML
Reply | Threaded
Open this post in threaded view
|

Re: How to make wikidctl start automatically when server reboot

Doug Foster
No, because this newbie is not familiar with the command.   But I tried it.   chkconfig on and reboot produced a one-line result in catalina.out.   That seemed to be unwanted, so I ran chkconfig off and rebooted again to get back to my current normal.
Reply | Threaded
Open this post in threaded view
|

Re: How to make wikidctl start automatically when server reboot

Nick Owen
Administrator
See this page:
https://www.wikidsystems.com/blog/how-can-i-configure-wikid-to-start-automatically/

When it was on, did WiKID start?  Usually there's only one line in
catalina.out when it starts...

On Tue, Jan 10, 2017 at 11:49 AM, Doug Foster [via WiKID Strong
Authentication Forums] <[hidden email]>
wrote:

> No, because this newbie is not familiar with the command.   But I tried it.
> chkconfig on and reboot produced a one-line result in catalina.out.   That
> seemed to be unwanted, so I ran chkconfig off and rebooted again to get back
> to my current normal.
>
> ________________________________
> If you reply to this email, your message will be added to the discussion
> below:
> http://wikid-strong-authentication-forums.1491522.n2.nabble.com/How-to-make-wikidctl-start-automatically-when-server-reboot-tp7574730p7575371.html
> To start a new topic under Support, email
> [hidden email]
> To unsubscribe from WiKID Strong Authentication Forums, click here.
> NAML



--
Nick Owen  --  WiKID Systems, Inc.
http://www.wikidsystems.com
On-premises Two-Factor Authentication
http://twitter.com/wikidsystems | #wikid on freenode.net
Get our low-volume newsletter - Notices, updates : http://eepurl.com/zzUeP
Reply | Threaded
Open this post in threaded view
|

Re: How to make wikidctl start automatically when server reboot

Doug Foster
In reply to this post by Doug Foster
I notice that the script has a test to see if the network is up, and it exits if not.   Apparently the script runs too soon.   I am running my test environment in VMWare Player, which may work differently than when it is moved to our production ESX environment.  So I think the problem is sufficiently explained.