How do I gracefully restart Apache?

Is there any way to gracefully restart Apache? On a standard setup I would normally run this command:
<pre>sudo apachectl graceful</pre>
But the Apache 2 that comes with OS X Server 10.5 does not gracefully restart with this command. Instead it will interrupt all open connections stopping all downloads. I'm assuming this is because Apache is handled by launchd which doesn't support graceful restarts. Is there any way to get around this problem?

I decided maybe there's a man page that will point in the right direction:
http://developer.apple.com/documentation/Darwin/Reference/Manpages/man1/launchct l.1.html
This is a complete stab in the dark. Launchd can receive commands from launchctl. but the launchctl command syntax is not the same as say apachectl. Try this command:
launchctl submit -p apachectl graceful
Let me know if that really performs a graceful restart. I'm a big fan of the graceful restart myself, and would hate to see that option not available from the commandline.

Similar Messages

  • How Do I do graceful restarts or configtests of SUNW.apache Resources?

    I have created a scalably clustered Apache resource group using the SUNW.apache resource type.
    I can not find any documentation as to how to perform configtest and graceful (restart) operations.
    Can anyone detail for me, or point me to documentation on how these standard Apache functions are invoked in this environment?
    Thanks in advance!
    John
    [email protected]

    I have created a scalably clustered Apache resource group using the SUNW.apache resource type.
    I can not find any documentation as to how to perform configtest and graceful (restart) operations.
    Can anyone detail for me, or point me to documentation on how these standard Apache functions are invoked in this environment?
    Thanks in advance!
    John
    [email protected]

  • Graceful Restart of Apache Causes JRun Connector Protocol Error

    Can anyone shed some light on how I can get Apache to do a
    graceful restart without causing a JRun Connector Protocol error.
    If I run a ColdFusion page that basically loops through a set
    of numbers and then issue a "kill -SIGUSR1 `cat
    /var/run/httpd.pid`" command then I receive the following error:
    Server Error
    The server encountered an internal error and was unable to
    complete your request.
    JRun Connector Protocol Error.
    Can anyone shed some light on how I can avoid this error?
    Thanks,
    John

    And what happens on Apache 1.3?
    Thanks in advance,
    Lopato

  • How to restart Apache

    I am having trouble starting my web server and filemaker pro server. I think it would help if I could restart Apache. Does anyone know what the commands are for doing this on Leopard Server in terminal?

    to restart apache safely with Terminal, under root
    serveradmin stop web; serveradmin start web
    If you’ve made some modifications on some apache config files by hand (which means not using Server Admin/Web anymore usually), it’s a good idea to test the configuration before restarting Apache.
    Then you can use the apachectl command:
    apachectl -t
    to restart only teams server :
    serveradmin stop teams; serveradmin start teams
    Once the services says they have restarted give them few more seconds before trying to access them.
    That’s my experience anyways. Hope it helps.

  • HT201236 "graceful" restart key combination

    Hi there, I'd like to do a "graceful" restart, but there Control-Command-Power button combination is listed twice in here. Do you know how to do it?

    OS X: Keyboard shortcuts - Apple Support
    Two keys:
    Control-Power button
    Show the restart / sleep / shut down dialog
    Three keys:
    Command-Control-power button
    Force the Mac to restart

  • BGP and Graceful-restart

    Hello colleagues!
    I'm trying to figure out some details regarding BGP GR functionality.
    The basic concept is pretty simple, but I cannot find answer to my question:
    How BGP peers knows when SSO-performing router switches to standby supervisor?
    BGP peers should somehow distinguish real supervisor fail from some other fails.
    I think it's very important, because if not so - when 'other fail' occurs BGP peer will keep routes during `Restart Timer` that equal to 120 sec by default. It may cause a blackhole.
    Also such a big pause (dead timer + restart timer) is not acceptable for HA infrastructure.
    Does really BGP Peers each time when BGP TCP session timed out (no matter why) keeps routes during `Restart Timer`? Or how Restarter notify its peers?
    On the other hand - when I simulate termination of the BGP session (add route to the neighbor to Null0 at the Restarter), peer just wait for the holdtime and does not mark routes as stale after. In other words it does not start NSF process. What should happen to start that process in the context of neighbors?
    If the BGP session is lost during the RP switchover, the NSF-aware BGP peer marks all the routes associated with the NSF-capable router as stale; however, it continues to use these routes to make forwarding decisions for a set period of time. This functionality means that no packets are lost while the newly active RP is waiting for convergence of the routing information with the BGP peers.
    After an RP switchover occurs, the NSF-capable router reestablishes the session with the BGP peer. In establishing the new session, it sends a new graceful restart message that identifies the NSF-capable router as having restarted.
    http://www.cisco.com/en/US/docs/ios/12_2t/12_2t15/feature/guide/ftbgpnsf.html
    Regards, Konstantin.

    I think I figured it out...
    When new supervisor becomes active it receives BGP keepalives from BGP peers but ongoing TCP session is unknown for the new supervisor. That's why it abort the session with TCP RST.
    This RST is a trigger to its peer to mark old routes as `stale` and continue NSF process as documented.

  • How can i avoid restarting tomcat server when servlet is modified?

    please advice me that how can i avoid restarting the tomcat server, whenever a servlet file is modified in my application. is their any way ?

    No probs. Here's how I do things...
    1. Install tomcat as normal (e.g. I install to C:\Apps\jakarta-tomcat-5.5.4)
    2. Create a webapps directory in your eclipse project with the following directory structure
    MyEclipseProject
       - src
       - conf
       - webapps
          - MyApplication
             - META-INF
             - WEB-INF
                - classes
                - lib
                - pages3. Set the project's output folder (e.g. bin folder) to webapps/MyApplication/WEB-INF/classes
    4. Put all your jar files in the lib directory
    5. Put JSPs / HTML in the pages directory (you may also want to create additional directories for TLDs, config files etc)
    6. Ensure your web.xml is in the WEB-INF directory
    7. Although it isn't essential I create a context.xml file and store it in META-INF, e.g.
    <Context reloadable="true">
        <!-- Default set of monitored resources -->
         <WatchedResource>WEB-INF/web.xml</WatchedResource>
         <WatchedResource>WEB-INF/conf/struts/struts-config.xml</WatchedResource>
         <WatchedResource>WEB-INF/conf/struts/tiles-defs.xml</WatchedResource>
         <WatchedResource>WEB-INF/conf/struts/validation.xml</WatchedResource>     
    </Context>I use this to set monitored resources that will trigger an automatic appliation reload and to configure JAAS (not shown). See the Tomcat documentation for additional information.
    8. In the 'conf' directory I create a server.xml file used to configure Tomcat (you can copy the one from your <TOMCAT_HOME>/conf/server.xml).
    After copying the file change appBase attribute in the host element to be the full path to the webapps directory. You can also change the HTTP and HTTPS ports if you wish
    9. Download and install the Tomcat Launcher plugin from Sysdeo.
    10. In Eclipse's Preferences menu you will see a new entry for Tomcat. Click this then
    a. Set your Tomcat Version
    b. Set your Tomcat Home
    c. Set "Context declaration mode" to server.xml
    d. Set the configuration file to the full path to your server.xml file created in step 8
    On the "Advanced " sub page select all relevant projects to add to the Tomcat classpath
    On the "JVM Settings" page add all the jars in your WEB-INF lib directory to the class path
    On the "Source Path" page select all relevant projects
    Now if you start Tomcat using the Tomcat icon, you will be able to remote debug your application. If you change web.xml (or any other file in your context.xml watched resources) it will automatically reload. Any changes to JSPs will automatically be picked up (providing your tell your browser not to use the page in cache - e.g. CTRL+F5 in IE)
    There are some limitations that I'm still working on however. Primarily that I haven't included the Tomcat Manager application in my webapps directory, so Sysdeo cannot perform a reload. This means that if I change a source file, and eclipse auotmatically rebuilds, Tomcat doesn't pick up the change unless I either change a watched resource file (e.g. web.xml) or stop and restart Tomcat.
    There's no reason why this can't be fixed, I just haven't got round to it yet.
    I'm sure there are lots of other (probably better) ways of achieving the same thing. This was the first method I tried and it worked, so I stuck with it. I'm not a Tomcat config guru and I'm sure other forum users could provide some improvements should they wish.
    Post if you get into trouble, however I won't be able to respond until next week.
    Cheers,
    Steve

  • How to make a restart of the workflow in a process controlled workflow?

    Hi Experts,
    How to make a restart of the workflow in case of process controlled workflow? Scenario is like this:
    The user has created a shopping cart with 1000 USD. The process schema has three process level with the first level being approval with completion.
    The first level being executed by the responsible purchaser. Here, the purchaser adds the source of supply and changes the price of the shopping cart 2000 USD and approve the shopping cart.
    Now, I want the approval task to start from beginning so that the requestor can know the changes and accept/reject the changes.
    Thanks and regards,
    Ranjan

    Hi,
    Restarting workflow goes to 1st level approval step. It is not requester.
    I think you need to set condition for "Acceptance by Contact Person" in Define Process Level.
    Regards,
    Masa

  • Caanot restart apache after installing mod_jk connector

    Hallo,
    I have installed the mod_jk connector to use seperate apache and tomcat instances for my web ap. I followed the instructions here: http://www.onjava.com/pub/a/onjava/2002/11/20/tomcat.html?page=2
    After making changes to httpd.conf, I am unable to restart apache - the sevent viewer gives the following message:
    "The Apache2 service terminated with service-specific error 1. "
    I think it has something to do with the addmodule lines i've added. Here is what I added to httpd.conf:
    AddModule mod_jk.c
    # JkWorkersFile C:/tomcat/Tomcat 5.5/conf/workers.properties
    # JkLogFile C:/tomcat/Tomcat 5.5/logs/mod_jk.log
    # JkLogLevel debug
    # Alias /toolkit C:/tomcat/Tomcat 5.5/webapps/toolkitv3
    # JkMount /toolkit/servlet/* ajp13w
    # JkMount /toolkit/*.jsp ajp13w
    # <location "/toolkit/web-inf/">
    # AllowOverride None
    # deny from all
    # </location
    (all uncommented of course)
    I hope someone out there can help me with this.
    Thanks

    I used the mod-jk.dll and loadModule :
    # Load mod_jk module
    # Update this path to match your modules location
    LoadModule jk_module modules/mod_jk.dll
    # Declare the module for <IfModule directive>
    #AddModule mod_jk.c
    # Where to find workers.properties
    # Update this path to match your conf directory location (put workers.properties next to httpd.conf)
    JkWorkersFile c:/Apache/Apache2/conf/workers.properties
    # Where to put jk logs
    # Update this path to match your logs directory location (put mod_jk.log next to access_log)
    JkLogFile c:/Apache/Apache2/logs/mod_jk.log
    # Set the jk log level [debug/error/info]
    JkLogLevel debug
    # Select the log format
    JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
    # JkOptions indicate to send SSL KEY SIZE,
    #JkOptions ForwardKeySize ForwardURICompat -ForwardDirectories
    # JkRequestLogFormat set the request format
    JkRequestLogFormat "%w %V %T"
    # Send everything for context /examples to worker named worker1 (ajp13)
    JkMount /examples/* loadbalancer
    JkMount /olp/* loadbalancer

  • How to implement checkpoint restart in OWB 11gR2?

    How to implement checkpoint restart in OWB 11gR2?
    Which will enable us to restart the OWB mapping from the last successfully inserted checkpoint onwards.
    Edited by: user4593813 on Jul 6, 2010 10:23 AM

    Hi Borkur,
    Thanks for reply.
    Actually I want to implement it in OWB. But after I got the answer from you, I decided to do in some othere way.
    The way you mentioned is right when we are performing the operations directly on a table.
    But in my scenario, an intermediate data is generating. I want to perform lag over operation on those records. Its possible by view.
    So for performing operations for intermediate result, Oracle is providing Table Function concept. I can pass the result to it.
    But the problem again is, how to implement the lag over operation there.
    Any idea.?
    Thanks and regards
    Gowtham sen.

  • How to Stop and restart the midtier?

    Hello All,
    I have installed Oracle AS (Infraturcture & middle tier , BI & Forms) on same Linux box.i.e: Oracle As 10.1.2.0.2 (Rel 2, x86 for Linux), SLES 9
    Here is my question:
    How to Stop and restart the midtier?
    Regards,
    DN

    biforms.sh
    export ORACLE_HOME=/opt/oracle/biforms
    export OH=$ORACLE_HOME
    export PATH=$OH/bin:$OH/opmn/bin:/bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/opt/gnome/bin:/opt/kde3/bin:/usr/lib/java/bin
    export ORACLE_SID=ORCL
    export LD_LIBRARY_PATH=$OH/lib:/usr/openwin/lib:/usr/dt/lib:/usr/lib:/tools/lib
    infra.sh
    export ORACLE_HOME=/opt/oracle/infra  <-- or correct one!
    export OH=$ORACLE_HOME
    export PATH=$OH/bin:$OH/opmn/bin:/bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/opt/gnome/bin:/opt/kde3/bin:/usr/lib/java/bin
    export ORACLE_SID=ORCL
    export LD_LIBRARY_PATH=$OH/lib:/usr/openwin/lib:/usr/dt/lib:/usr/lib:/tools/libAs you see, only the first row differs from these two scrips. Because I'm lazy, I usualy set export OH. Under certain circumstances you might want to add DISPLAY to biforms.sh. Set it to localhost:0 or whatever is correct.
    Martin

  • How to Stop and restart the OC4J_BI_FORMS?

    I have Oracle AS 10.1.2.0.2 (Rel 2) installed. (Infratsructure & BI & Forms) on same computer.
    my question is :
    How to Stop and restart the OC4J_BI_FORMS?
    Regards,
    DN

    Just as any other OC4J:
    opmnctl stopproc -process-type=OC4J_BI_FORMS
    opmnctl startproc -process-type=OC4J_BI_FORMS
    or
    opmnctl restartproc -process-type=OC4J_BI_FORMS
    cu
    Andreas

  • How to use JSP in apache web server

    hi all,
    can anybody tell me how to use JSPs in Apache Web Server.
    Thanks
    sir

    You would need a servlet container to run Servlets and JSPs. And Apache's Tomcat is one such free container available. Download Tomcat from http://jakarta.apache.org and integrate with Apache WS
    HTH

  • OSPF Graceful Restart

    Hi all! i´m Juan from Argentina.
    I´m studing to my CCIE WR R&S Exam, and i have a dude with GR in OSPF:
    When a router needs to boot, or switch the RP, sends a ospf-graceful to his neighbors.
    When his neighbors receives his graceful-lsas:
         1- What will they do?
              a) they don´t down the neighbor relationship.
              b) they sends again his own lsa?
              c) they gives to the graceful router,a grace period to maintain the relationship?
    Thanks to all, but i don´t understand this topic,
    Thanks
    Juan

    Juan,
    Check out the following URL for more information on OSPF Graceful restart.  Your answer is in there.
    http://www.cisco.com/en/US/docs/ios/12_0s/feature/guide/gr_ospf.html
    Thanks,
    Bryan

  • RSVP graceful restart support in 12000 router

    Hi,
    It seems like the router is not supporting graceful restart full mode.
    If you have to GSR's that are connected to each other, will it be possible to setup graceful restart and work together with SSO?
    I have tried but with no success, if it's should work, have somebody any config example?
    /Niklas

    Thanks,
    I will contact our sales.
    Means helper-mode that the router can help the other side to recover a RP failure situation?
    The other router must also support full-mode?
    BR Niklas

Maybe you are looking for