Re: [WebDNA] RESTART WebDNA

This WebDNA talk-list message is from

2016


It keeps the original formatting.
numero = 113196
interpreted = N
texte = 784 --Apple-Mail=_E6A8BF56-B393-4543-A869-18D7C17CCCFB Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Chris Following your instructions I get this: li230-248 : Nov 19 11:14:05 : www-data : parse error in = /etc/sudoers.d/webdna near line 1 ; TTY=3Dunknown ; = PWD=3D/var/www/site/site-root ;=20 Kind regards Stuart Tremain Pharoah Lane Software AUSTRALIA webdna@idfk.com.au > On 19 Nov. 2016, at 08:47, christophe.billiottet@webdna.us wrote: >=20 > I would suggest to create a new file called /etc/sudoers.d/webdna , = and put this inside: > Defaults !authenticate > %www-data ALL=3D/etc/init.d/WebCatalogCtl >=20 > Then chmod 0440 /etc/sudoers.d/webdna . Use the follow WebDNA code = with it: > [SHELL]sudo /etc/init.d/WebCatalogCtl restart &[/SHELL] >=20 >=20 >> WebdnaMonitor utilizes a file that contains the process ID of the = running engine >=20 > When WebCatalog is started with the -m argument, it does not create = the WebCatalog.pid file. Instead the WebDNAMonitor creates it, and puts = its own PID in it: >=20 > # cat /usr/lib/cgi-bin/WebCatalogEngine/WebCatalog.pid > 15568 > # ps aux|grep 15568 > root 15568 0.0 0.0 4288 608 pts/17 S 12:28 0:00 = /usr/lib/cgi-bin//WebCatalogEngine/WebDNAMonitor >=20 > The bug is that the WebCatalog.pid file is deleted by WebCatalog on a = clean exit regardless of whether or not it created it. It should not do = this if -m was passed. >=20 >=20 >> if the running engine is killed (i.e. Not usually the best way to = stop any application) >=20 > This is how WebCatalogCtl and WebDNAMonitor stop WebCatalog. It sends = it a INT signal, which goes through the same handler as TERM so there is = no difference. >=20 > What you want to avoid is sending SIGKILL (aka signal 9), that is = closest to force-quitting an application from the OSX GUI. The = application isn't able to run any signal handlers and do a graceful = shutdown, as signal 9 cannot be caught. >=20 > "killall" will send a TERM signal by default, which WebCatalog will = catch and use to gracefully shutdown by running CleanExit(0). >=20 >=20 >> there will likely end up being a mismatch between the monitor and the = engine. Then what will happen is rogue instances of the engine. >=20 > Yeah you are right. Since WebCatalog deletes the WebCatalog.pid file = when it exits, the WebCatalogCtl script stops working. >=20 > - chris >=20 >=20 >> On Nov 18, 2016, at 21:03, Donovan Brooke wrote: >>=20 >> WebdnaMonitor utilizes a file that contains the process ID of the = running engine.. if the running engine is killed (i.e. Not usually the = best way to stop any application), there will likely end up being a = mismatch between the monitor and the engine. Then what will happen is = rogue instances of the engine.=20 >>=20 >> A better idea to give people the power to control WebDNA and restarts = of the server would be to build a separate and optional WebDNA server = control app perhaps, that utilizes root capabilities... but there is = already an app for that... called shell, or terminal. >>=20 >> D. Brooke Mobile >=20 >=20 >=20 >=20 > --------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us > Bug Reporting: support@webdna.us --Apple-Mail=_E6A8BF56-B393-4543-A869-18D7C17CCCFB Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii Chris

Following your instructions I get this:

li230-248 : Nov 19 =11:14:05 : www-data : parse error in /etc/sudoers.d/webdna near line 1 ; =TTY=3Dunknown ; PWD=3D/var/www/site/site-root ; 

Kind regards

Stuart Tremain
Pharoah Lane = Software
AUSTRALIA






On 19 Nov. 2016, at 08:47, christophe.billiottet@webdna.us wrote:

I = would suggest to create a new file called /etc/sudoers.d/webdna , and = put this inside:
Defaults =        !authenticate
%www-data ALL=3D/etc/init.d/WebCatalogCtl

Then chmod 0440 /etc/sudoers.d/webdna . Use the follow WebDNA = code with it:
[SHELL]sudo /etc/init.d/WebCatalogCtl = restart &[/SHELL]


WebdnaMonitor utilizes a = file that contains the process ID of the running engine

When WebCatalog is started with = the -m argument, it does not create the WebCatalog.pid file. Instead the = WebDNAMonitor creates it, and puts its own PID in it:

# cat /usr/lib/cgi-bin/WebCatalogEngine/WebCatalog.pid
15568
# ps aux|grep 15568
root =     15568  0.0  0.0   4288 =   608 pts/17   S    12:28 =   0:00 /usr/lib/cgi-bin//WebCatalogEngine/WebDNAMonitor

The bug is that the WebCatalog.pid file is = deleted by WebCatalog on a clean exit regardless of whether or not it = created it. It should not do this if -m was passed.


if the = running engine is killed (i.e. Not usually the best way to stop any = application)

This is how = WebCatalogCtl and WebDNAMonitor stop WebCatalog. It sends it a INT = signal, which goes through the same handler as TERM so there is no = difference.

What you want to avoid is = sending SIGKILL (aka signal 9), that is closest to force-quitting an = application from the OSX GUI. The application isn't able to run any = signal handlers and do a graceful shutdown, as signal 9 cannot be = caught.

"killall" will send a TERM signal = by default, which WebCatalog will catch and use to gracefully shutdown = by running CleanExit(0).


there will likely end up = being a mismatch between the monitor and the engine. Then what will = happen is rogue instances of the engine.

Yeah you are right. Since WebCatalog deletes the = WebCatalog.pid file when it exits, the WebCatalogCtl script stops = working.

- chris


On Nov = 18, 2016, at 21:03, Donovan Brooke <dbrooke@euca.us> wrote:

WebdnaMonitor utilizes a file that contains the process ID of = the running engine.. if the running engine is killed (i.e. Not usually = the best way to stop any application), there will likely end up being a = mismatch between the monitor and the engine. Then what will happen is = rogue instances of the engine.

A better = idea to give people the power to control WebDNA and restarts of the = server would be to build a separate and optional WebDNA server control = app perhaps, that utilizes root capabilities... but there is already an = app for that... called shell, or terminal.

D.= Brooke Mobile




---------------------------------------------------------
This message is sent to you because you are subscribed to
the mailing list <talk@webdna.us>.
To unsubscribe, E-mail = to: <talk-leave@webdna.us>
archives: http://mail.webdna.us/list/talk@webdna.us
Bug= Reporting: support@webdna.us

= --------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.us Bug Reporting: support@webdna.us --Apple-Mail=_E6A8BF56-B393-4543-A869-18D7C17CCCFB-- . Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] RESTART WebDNA (christophe.billiottet@webdna.us 2016)
  2. Re: [WebDNA] RESTART WebDNA (Stuart Tremain 2016)
  3. Re: [WebDNA] RESTART WebDNA (Stuart Tremain 2016)
  4. Re: [WebDNA] RESTART WebDNA (Stuart Tremain 2016)
  5. Re: [WebDNA] RESTART WebDNA (christophe.billiottet@webdna.us 2016)
  6. Re: [WebDNA] RESTART WebDNA (Stuart Tremain 2016)
  7. Re: [WebDNA] RESTART WebDNA (Lawrence Banahan 2016)
  8. Re: [WebDNA] RESTART WebDNA (Stuart Tremain 2016)
  9. Re: [WebDNA] RESTART WebDNA (christophe.billiottet@webdna.us 2016)
  10. Re: [WebDNA] RESTART WebDNA (Stuart Tremain 2016)
  11. Re: [WebDNA] RESTART WebDNA (Stuart Tremain 2016)
  12. Re: [WebDNA] RESTART WebDNA (christophe.billiottet@webdna.us 2016)
  13. Re: [WebDNA] RESTART WebDNA (Kenneth Grome 2016)
  14. Re: [WebDNA] RESTART WebDNA (Donovan Brooke 2016)
  15. Re: [WebDNA] RESTART WebDNA (Donovan Brooke 2016)
  16. Re: [WebDNA] RESTART WebDNA (christophe.billiottet@webdna.us 2016)
  17. Re: [WebDNA] RESTART WebDNA (Donovan Brooke 2016)
  18. Re: [WebDNA] RESTART WebDNA (Terry Wilson 2016)
  19. Re: [WebDNA] RESTART WebDNA (Kenneth Grome 2016)
  20. Re: [WebDNA] RESTART WebDNA (christophe.billiottet@webdna.us 2016)
  21. Re: [WebDNA] RESTART WebDNA (Kenneth Grome 2016)
  22. Re: [WebDNA] RESTART WebDNA (Donovan Brooke 2016)
  23. Re: [WebDNA] RESTART WebDNA (Stuart Tremain 2016)
  24. Re: [WebDNA] RESTART WebDNA (christophe.billiottet@webdna.us 2016)
  25. Re: [WebDNA] RESTART WebDNA (Stuart Tremain 2016)
  26. Re: [WebDNA] RESTART WebDNA (Stuart Tremain 2016)
  27. Re: [WebDNA] RESTART WebDNA (Donovan Brooke 2016)
  28. [WebDNA] RESTART WebDNA (Stuart Tremain 2016)
  29. Re: [WebDNA] Restart WebDNA (Stuart Tremain 2013)
  30. [WebDNA] Restart WebDNA (Stuart Tremain 2013)
784 --Apple-Mail=_E6A8BF56-B393-4543-A869-18D7C17CCCFB Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Chris Following your instructions I get this: li230-248 : Nov 19 11:14:05 : www-data : parse error in = /etc/sudoers.d/webdna near line 1 ; TTY=3Dunknown ; = PWD=3D/var/www/site/site-root ;=20 Kind regards Stuart Tremain Pharoah Lane Software AUSTRALIA webdna@idfk.com.au > On 19 Nov. 2016, at 08:47, christophe.billiottet@webdna.us wrote: >=20 > I would suggest to create a new file called /etc/sudoers.d/webdna , = and put this inside: > Defaults !authenticate > %www-data ALL=3D/etc/init.d/WebCatalogCtl >=20 > Then chmod 0440 /etc/sudoers.d/webdna . Use the follow WebDNA code = with it: > [shell]sudo /etc/init.d/WebCatalogCtl restart &[/SHELL] >=20 >=20 >> WebdnaMonitor utilizes a file that contains the process ID of the = running engine >=20 > When WebCatalog is started with the -m argument, it does not create = the WebCatalog.pid file. Instead the WebDNAMonitor creates it, and puts = its own PID in it: >=20 > # cat /usr/lib/cgi-bin/WebCatalogEngine/WebCatalog.pid > 15568 > # ps aux|grep 15568 > root 15568 0.0 0.0 4288 608 pts/17 S 12:28 0:00 = /usr/lib/cgi-bin//WebCatalogEngine/WebDNAMonitor >=20 > The bug is that the WebCatalog.pid file is deleted by WebCatalog on a = clean exit regardless of whether or not it created it. It should not do = this if -m was passed. >=20 >=20 >> if the running engine is killed (i.e. Not usually the best way to = stop any application) >=20 > This is how WebCatalogCtl and WebDNAMonitor stop WebCatalog. It sends = it a INT signal, which goes through the same handler as TERM so there is = no difference. >=20 > What you want to avoid is sending SIGKILL (aka signal 9), that is = closest to force-quitting an application from the OSX GUI. The = application isn't able to run any signal handlers and do a graceful = shutdown, as signal 9 cannot be caught. >=20 > "killall" will send a TERM signal by default, which WebCatalog will = catch and use to gracefully shutdown by running CleanExit(0). >=20 >=20 >> there will likely end up being a mismatch between the monitor and the = engine. Then what will happen is rogue instances of the engine. >=20 > Yeah you are right. Since WebCatalog deletes the WebCatalog.pid file = when it exits, the WebCatalogCtl script stops working. >=20 > - chris >=20 >=20 >> On Nov 18, 2016, at 21:03, Donovan Brooke wrote: >>=20 >> WebdnaMonitor utilizes a file that contains the process ID of the = running engine.. if the running engine is killed (i.e. Not usually the = best way to stop any application), there will likely end up being a = mismatch between the monitor and the engine. Then what will happen is = rogue instances of the engine.=20 >>=20 >> A better idea to give people the power to control WebDNA and restarts = of the server would be to build a separate and optional WebDNA server = control app perhaps, that utilizes root capabilities... but there is = already an app for that... called shell, or terminal. >>=20 >> D. Brooke Mobile >=20 >=20 >=20 >=20 > --------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us > Bug Reporting: support@webdna.us --Apple-Mail=_E6A8BF56-B393-4543-A869-18D7C17CCCFB Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii Chris

Following your instructions I get this:

li230-248 : Nov 19 =11:14:05 : www-data : parse error in /etc/sudoers.d/webdna near line 1 ; =TTY=3Dunknown ; PWD=3D/var/www/site/site-root ; 

Kind regards

Stuart Tremain
Pharoah Lane = Software
AUSTRALIA






On 19 Nov. 2016, at 08:47, christophe.billiottet@webdna.us wrote:

I = would suggest to create a new file called /etc/sudoers.d/webdna , and = put this inside:
Defaults =        !authenticate
%www-data ALL=3D/etc/init.d/WebCatalogCtl

Then chmod 0440 /etc/sudoers.d/webdna . Use the follow WebDNA = code with it:
[shell]sudo /etc/init.d/WebCatalogCtl = restart &[/SHELL]


WebdnaMonitor utilizes a = file that contains the process ID of the running engine

When WebCatalog is started with = the -m argument, it does not create the WebCatalog.pid file. Instead the = WebDNAMonitor creates it, and puts its own PID in it:

# cat /usr/lib/cgi-bin/WebCatalogEngine/WebCatalog.pid
15568
# ps aux|grep 15568
root =     15568  0.0  0.0   4288 =   608 pts/17   S    12:28 =   0:00 /usr/lib/cgi-bin//WebCatalogEngine/WebDNAMonitor

The bug is that the WebCatalog.pid file is = deleted by WebCatalog on a clean exit regardless of whether or not it = created it. It should not do this if -m was passed.


if the = running engine is killed (i.e. Not usually the best way to stop any = application)

This is how = WebCatalogCtl and WebDNAMonitor stop WebCatalog. It sends it a INT = signal, which goes through the same handler as TERM so there is no = difference.

What you want to avoid is = sending SIGKILL (aka signal 9), that is closest to force-quitting an = application from the OSX GUI. The application isn't able to run any = signal handlers and do a graceful shutdown, as signal 9 cannot be = caught.

"killall" will send a TERM signal = by default, which WebCatalog will catch and use to gracefully shutdown = by running CleanExit(0).


there will likely end up = being a mismatch between the monitor and the engine. Then what will = happen is rogue instances of the engine.

Yeah you are right. Since WebCatalog deletes the = WebCatalog.pid file when it exits, the WebCatalogCtl script stops = working.

- chris


On Nov = 18, 2016, at 21:03, Donovan Brooke <dbrooke@euca.us> wrote:

WebdnaMonitor utilizes a file that contains the process ID of = the running engine.. if the running engine is killed (i.e. Not usually = the best way to stop any application), there will likely end up being a = mismatch between the monitor and the engine. Then what will happen is = rogue instances of the engine.

A better = idea to give people the power to control WebDNA and restarts of the = server would be to build a separate and optional WebDNA server control = app perhaps, that utilizes root capabilities... but there is already an = app for that... called shell, or terminal.

D.= Brooke Mobile




---------------------------------------------------------
This message is sent to you because you are subscribed to
the mailing list <talk@webdna.us>.
To unsubscribe, E-mail = to: <talk-leave@webdna.us>
archives: http://mail.webdna.us/list/talk@webdna.us
Bug= Reporting: support@webdna.us

= --------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.us Bug Reporting: support@webdna.us --Apple-Mail=_E6A8BF56-B393-4543-A869-18D7C17CCCFB-- . Stuart Tremain

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

Sku numbers (1997) purchase.log file (1997) REPOST: How do _you_ back up your db? (2000) Mondo amounts of Mail [long] (1999) Almost a there but..bye bye NetCloak (1997) Webten + Webcat running smooth (1998) math a various prices (1997) Help formatting search results w/ table (1997) HELP WITH DATES (1997) Re:WebDNA Writer Needed (1997) WebCatalog not recognizing ShoppingCarts folder (2000) WebCat2 - [format thousands] (1997) WebCat, The Trend, & Consolidating... (1997) RE: How to verify email address (1997) Country & Ship-to address & other fields ? (1997) Spawn doesn't work as advertised ... (2000) Searching,Brain Dead! (1999) Which GUI HTML editors work with WC ? (1997) Email Formatting and Encryption (1998) OT: Just for a waste of time (2003)