Launchd: Using Sockets key for on demand jobs

Hi,
I would like to start nginx whenever I send an HTTP request to localhost. This is my plist:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Disabled</key>
<false/>
<key>Label</key>
<string>org.sysoev.nginx</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/nginx/sbin/nginx</string>
</array>
<key>Sockets</key>
<dict>
<key>Listeners</key>
<dict>
<key>SockNodeName</key>
<string>127.0.0.1</string>
<key>SockServiceName</key>
<string>http</string>
</dict>
</dict>
<key>KeepAlive</key>
<dict>
<key>SuccessfulExit</key>
<false/>
</dict>
</dict>
</plist>
Although nginx is started when I request a webpage from localhost, the request never arrives at nginx, so the requested page is not loaded. When I replace the Sockets dict with RunAtLoad: true, all works fine.
Could it be that launchd somehow intercepts the requests sent to an on-demand daemon?
Kind regards,
Jan

Launchd does intercept the requests sent to an on-demand process. That's how launch on demand works.
I'm not familiar with nginx, but I wouldn't expect launch on demand to work with any web server, for the same reason it doesn't work with Apache. Apache has to start up as root in order to bind the usual ports 80 and 443. It then forks an unprivileged process to handle the actual network traffic. Any sort of automatic forking is incompatible with launch on demand. The solution is the one you already found, run at launch and let the process do its own listening on the network.

Similar Messages

  • By default, on a mac keyboard F3 lets you see all the open apps and the such. However, I changed it so that I use those keys for keyboard shortcuts; But i'd like the normal F3 key to still work without me having to press FN.

    By default, on a mac keyboard F3 lets you see all the open apps and the such. However, I changed it so that I use those keys for keyboard shortcuts; But i'd like the normal F3 key to still work without me having to press FN.

    rajlego,
    in the Keyboard pane of System Preferences, select the Shortcuts tab, and then select Mission Control on the left-hand side. On the right-hand side, make sure that the Mission Control checkbox is checked, double-click on its current key combination (by default “^↑”) so that the key combination is highlighted, and then press the F3 button — that will set its shortcut to be F3. You can now press F3 to bring up Mission Control without needing to also press the Fn button.

  • How we use Surrogate Keys for snowflake dimension

    Hi All,
    my question is - How we use  Surrogate Keys for  snowflake dimension
    i heard from some body Surrogate Keys only work with star schema.
    please correct me if i wrong.
    Regards,
    Manish

    Hi manishcal16PPS,
    According to your description, you can only create natural key in your dimension. But it's not working when using surrogate key. Right?
    In Analysis Services, the snowflake schema of the dimensions are represented by more than one dimension table in other words its takes multiple dimension tables to define a dimension. Surrogate key are just some extra, redundant, unique key based on the
    natural key. So there's no direct relationship or some limitations between surrogate keys and snowflake schema.
    In this scenario, since there's relationship between the two dimensions, you should create natural key. For using natural key or surrogate key. Please refer to an article below:
    Surrogate Key vs. Natural Key
    For understanding star/snowflake schema, please see:
    Understanding Star and Snowflake Schemas 
    Regards,
    Simon Hou
    TechNet Community Support

  • How to use Remote key for linking two repository

    Hi,
    I have a challenge like not to repeate common tables like Company_code,Currency,Vendor name,customer name across all repositories.
    Is there any way I can use 'Remote key' to link different repository.
    I can create a Main table with all common attributes required across the repository but want to know how I can connect it to different repository.
    For example to get company-code in Vendor table , how can I link Company-code main table(customized) in another repository may be thru 'Remote key'.
    Going thru java api route is not prefffered for the sake of simple solution.
    Appreciate your help in providing any idea and detail steps for the process.
    -regards, Reo

    could you confirm the name and the existence of this file "IOMM_20121213_060736.csv" ?
    same error like:
    http://www.oracle-base.com/articles/9i/external-tables-9i.php
    if the load files have not been saved in the appropriate directory the following result will be displayed.
    SQL> SELECT *
      2  FROM   countries_ext
      3  ORDER BY country_name;
    SELECT *
    ERROR at line 1:
    ORA-29913: error in executing ODCIEXTTABLEOPEN callout
    ORA-29400: data cartridge error
    KUP-04040: file Countries1.txt in EXT_TABLES not found
    ORA-06512: at "SYS.ORACLE_LOADER", line 14
    ORA-06512: at line 1Edited by: Fran on 10-ene-2013 23:32

  • Cannot use product key for Vista installation on my Satellite U400-112

    HI, NICE DAY
    I BOUGHT TOSHIBA SATELLITE U400-112 , WINDOWS VISTA , I FORMATED MY LAPTOP THEN I SETUP WINDOWS VISTA , BUT WHEN I INTRED THE PRODUCT KEY (THAT IN THE LAPTP`S STICKER) , A MESSAGE APPEAR AND TELL THE P K IS INVALID !!!
    BY THE WAY, MY WINDOWS VISA IS A COPY CD OF THE ORIGENAL VISTA, IT CAN BE UPTATED BUT DOES`T ACCEPT MY LAPTOP PRODUCT KEY!!!
    WAIT FOR HELP, THANKS.

    hi
    i get answer by search results
    ther is
    Hi!
    The product key on the bottom side of the notebook is an OEM key and belongs to the preinstalled OEM version. That means you can??t use this key with a normal Vista installation disk that you can buy on the internet or from a computer shop.
    If you want to install Vista you should a Toshiba recovery disk or a Microsoft disk with the corresponding product key.
    You can order a Toshiba recovery disk from Toshiba directly:
    https://backupmedia.toshiba.eu/landing.aspx
    Bye
    thanks

  • Using German key for US English iWork08 version

    Hello,
    I am new in the MAc world and have a question. I purchased a MacBook with US English OS X and used a US English iWork08 trail. Now I would like to purchase a key to use iWork. But if I log on to Apple I am forwarded to the German Apple Store. And here is my question: Can I use a German product key for the English iWork version?
    Thanks for help in advance,
    Bjoern

    There is no German iWork.
    There is a single package able to run in:
    Dutch
    English
    French
    German
    Italian
    Japanese
    Spanish
    zh_CN
    So the key bought in Germany will apply. Mine was bought in France.
    Yvan KOENIG (from FRANCE jeudi 12 juin 2008 14:05:24)

  • How to use Distribution Key for planning workforce

    Hi,
    I have an activity named "Activity1":
    Start date = ST = 01/01/2008
    End date = ST + 10
    Work = 120H
    Duration = 10day
    Activity type = Labor
    I want to assign workers into the activity as follows:
    01/01/2008: 10H
    02/01/2008: 20H
    03/01/2008: 30H
    04/01/2008: 40H
    04/01/2008 - 10/01/2008: 12H
    So I maintained a Distribution Function in IMG as below:
    % Duration % Req.
    0 9%
    10 18%
    30 27%
    40 36%
    50 10%
    And maintain the distribution Strategy in:
    SPRO-->PS->Resources->Distribution->Define distribution strategy.
    And maintain Req. distribution in:
    SPRO-->PS->Resources->Distribution->Define requirement distribution.
    Finally maintain this distribution key for the activity in "DistKeyCapRqInt" in internal tab .
    My question:
    What are the next steps for planning workers?
    Which transaction is used to execute and monitor the task as plan?
    Thanks
    Long

    "How to split sender data to reciever such tht the distribution should be done on the actual costs of each reciever. how to formulate the rule for reciever?" :
    In the segment header : use receiver rule 1 "variable portions" + variable portion type with rule 1 "actual costs". These parameters are confirmed in the receiving tracking factor page.
    Then go in the "receiving wighting factors" just for a check of factor per fields. All the lines have the value 100. It's absolutely OK, don't modify it.
    One thing to notice: if you use this rule, all the receiver must have a value, in the contrary a distribution based upon receiver actual cost can't run.
    "In our company GST for all documents goes to a particular cost center 'X'. Now they want to distribute the GST to the respective cost centers from which it is actually incurred.I tried using SKF with '%' as unit measure but then it's distributing the costs equally to all recievers. How to solve this?":
    did you change the percentages of each receveirs in the receiving tracking factor page?
    hope it's helpful
    Pascal

  • Using accelerator keys for loading a appliaction made with J2ME

    Hi
    Is there any methods to use accelerator keys to load a application made with J2ME for mobile telephones. The application is not running and i must find a way to load the application using keys codes.
    How can i accomplish this? can i use the application manager and the jad file? i know that i can use PushRegistry for incomming connections to load the application automaticaly. But i need a way to accomplish this by using the key events on a mobile phone when the application is closed.
    Best Regard
    jan Fredrik Fallsen

    Hi
    Is there any methods to use accelerator keys to load a application made with J2ME for mobile telephones. The application is not running and i must find a way to load the application using keys codes.
    How can i accomplish this? can i use the application manager and the jad file? i know that i can use PushRegistry for incomming connections to load the application automaticaly. But i need a way to accomplish this by using the key events on a mobile phone when the application is closed.
    Best Regard
    jan Fredrik Fallsen

  • [TIP] Use vi keys for CLI history and editing

    I randomly discovered this when reading documentation about GNU Screen, and thought it was awesome!  By default bash (and I believe other shells too) use some emacs like commands for movement: <code>CONTROL-A</code> to move the cursor to the begining of the line, and <code>CONTROL-E</code> to move the cursor to the end of the line, etc.
    You can change that behavior to more closely mimic the movements and commands in Vi by issuing the command:
    $ set -o vi
    If you just want to see what your current settings are, leave off the <code>vi</code> part.
    $ set -o
    allexport off
    braceexpand on
    emacs off
    errexit off
    hashall on
    histexpand on
    history on
    ignoreeof off
    interactive-comments on
    keyword off
    monitor on
    noclobber off
    noexec off
    noglob off
    nolog off
    notify off
    nounset off
    onecmd off
    physical off
    posix off
    privileged off
    verbose off
    vi on
    xtrace off
    Then you can hit the <code><ESCAPE></code> key to enter the command-editing mode.  Then try out using the "<code>h j k l</code>" movement keys to navigation through the command history.  You can also use other Vi movement commands to edit the line.  If you want to go back to typing, use the typical "<code>i I a A</code>" keys to either Insert or Append as expected.  To make this change permanent, just add the "<code>set -o vi</code>" command in your <code>~/.bashrc</code> file.
    Anyway, after messing around with it for a bit, I think it will make my command-line usage much more efficient.  Hope this appeals to somebody else out there...

    I also forgot, you can use Vi commands to skip to items from your history as well.  If you view your history:
    $ history
    377 ps aux | grep firefox
    378 sudo pacman -Syu
    379 exit
    380 startx
    381 startx
    382 sudo pacman -Syu
    383 less /etc/ntp.conf
    384 sudo vim /etc/pacman.conf
    385 sudo pacman -Syu
    ...and say you want to run "<code>ps aux | grep firefox</code>", you can just type <code><ESCAPE></code> to enter command-editing mode, put in the line number you want: <code>377</code>, and then hit '<code>G</code>' to go there.  There are all sorts of cool things I'm figuring out...

  • Using Function Keys for various tasks

    Can someone tell me where I can find a list of what the function keys do; especially when used in conjunction with other keys such as control, alt, etc.

    System Preferences>Keyboard>Keyboard Shortcuts.

  • Can't use purchased key for QuckTime Pro 7

    Hello. This is my first time posting to this forum and I hope I can get some help.
    I bought a computer off ebay about 5 years ago to edit video and I have been using the programs that were already installed on my machine. Everything worked fine. I was able to import QuickTime files and export no problem. Then about a year ago...one day my computer decided not to recognize QuickTime files anymore. I've been getting by, but it's very inconvenient.
    I updated to QuickTime7 and still had problems. I finally bought a key last week and went to the control panel and entered my key.
    My problem is that I still can't render QuickTime files. Any help will be greatly appreciated...especially since I BOUGHT THE KEY!!

    Hello, CM, and welcome to the Discussions.
    I'm not clear on exactly what problem(s) you're having. Are you having problems getting the QuickTime Pro key recognized in QuickTime Player? In opening QuickTime files (and if so, what format are they)? Or in exporting files from QuickTime Player? If you can post back with clarification as to exactly what problem(s) you're having and full details about the problem including error messages if any, perhaps someone here will be able to provide useful suggestions.
    Regards.

  • Permission from Apple to use MainStage keys for instructional videos.

    How would I do this?
    I already use MidiKeys. (a neat little util) I got permission from the developer to use this. How would I do the same with Apple.
    Heres a demo
    http://www.youtube.com/watch?v=i5urwxm3Rpw

    that does not seems to work. i quickly created authorized_keys2 file with contents from authorized_keys. and tried to connect without any success...
    one more test i did, from my office laptop i tried to connect to same server without VPN connection, it did not connect. But as soon as i loged into the VPN (office network) i was able to connect to it...
    does "Roaming not allowed by server" has anything to do with this behaviour?

  • Best Practice to use one Key on ACE for new CSR?

    We generate multiple CSR on our ACE....but our previous network admin was only using
    one key for all new CSR requests.
    i.e.......we have samplekey.pem key on our ACE
    we use samplekey.pem to generate CSR's for multiple certs..
    is this best practice or should we be using new keys for each new CSR
    also .is it ok to delete old CSR on the lb..since the limit is only 8?..thx

    We generate multiple CSR on our ACE....but our previous network admin was only using
    one key for all new CSR requests.
    i.e.......we have samplekey.pem key on our ACE
    we use samplekey.pem to generate CSR's for multiple certs..
    is this best practice or should we be using new keys for each new CSR
    also .is it ok to delete old CSR on the lb..since the limit is only 8?..thx

  • Ip sla operations with different keys for the same destination

      Hi all,
    the customer wants to use different ip sla operations for the same destination (ip sla responder). From the first source router he uses key key1 and from the second source router he uses key key2. The ip sla responder responds only for the first router which uses the key key1.:-( Is it a normal behaviour? Can I use different keys for different ip sla operations for the same ip sla responder?
    See the configuration on the responder:
    key chain test
    key 1
      key-string 7 *key1*
    key 2
      key-string 7 *key2*
    ip sla key-chain test
    ip sla responder
    He tried to use ip sla responders on:
    Ciscu 2911
    Cisco IOS Software, C2900 Software (C2900-UNIVERSALK9-M), Version 15.2(4)M3, RELEASE SOFTWARE (fc2)
    Cisco 881
    Cisco IOS Software, C880 Software (C880DATA-UNIVERSALK9-M), Version 15.1(4)M4, RELEASE SOFTWARE (fc1)
    Thank you.
    Roman

    Thomas,
    Have a look at:
    http://www.cisco.com/en/US/docs/ios-xml/ios/sec_conn_dmvpn/configuration/15-2mt/sec-conn-dmvpn-share-ipsec-w-tun-protect.html#GUID-2B448241-FD10-4F3B-BFF8-DFD44982D235
    If you're using one tunnel source you need to use one ipsec profile, unless you're running (a) p2p tunnel which you're not in this case.
    While you MAY have some luck with sharing/unsharing among different interface I'm afarid it will not be ever mentioned as supported.
    The situation will change with upcomfing 3.10 and 3.11 IOS XE releases (and corresponding IOS releases).
    M.

  • Depreciation Key for Capital Leasehold Improvement

    Hi Everyone
    I need your help in creating the depreciation key for the Capital leasehold improvemnet assets. I need to specify a specific percentage rate for each period of the first year to calculate depreciation (if asset is acquired in period 1, rate x. If asset is acquired in period 2, then rate y and so on). From year 2-39, it is a constant rate of depreciation.
    I created a multilevel method by specifying that year 1, base level 01, rate is 2.461
    Year 39, base level 01, rate is 2.564.
    I assigned it to the depreciation key with Base method 0012, Period control 002, and the multilevel method that I created. When I post an asset acquisition and use this key for Asset, the amounts for year 1 & 2 are not correct. Second year is taking part of percentage from the first year and the first year is trying to calculate the depreciation for the whole year despite the fact that asset was capitalized in February.
    Can someone help me with step-by-step details to create this key?
    I appreciate your help.
    Thanks,
    Shalu

    Resolved myself

Maybe you are looking for

  • Line with pointed end?

    Trying to find the easiest method to achieve this. This will be a 3/4 circle around a mark. So i draw a circle, delete the right side point to create an opening. Now i'd like for the two end points to come to a "point" (sharp, pointed end like a knif

  • HT204266 How to check my iPhone5 from which country?

    As the tittle above,can anyone teach me to check my iPhone5 from which country?Thank you.

  • Using Extreme as a wireless card

    I have a G4 Dual 800 with no Airport card. I also have a UFO Airport Extreme Basestation. Can I connect the basestation to the G4 and use it as a wireless card to connect to my network? Does that make sense?

  • Retrieving Positions for Specific Org Units

    Hi All, I have a headcount report to develop. It will run for one personnel area at a time. So for the period run, I have to list out all the org units under the personnel area as well as the sub org units. For each of the org units I have to separat

  • Lock the Tcode through program

    Hi All, I has write a program for lock the tcode for that I am using FM:-RSAU_WRITE_SM01_LOG,When I pass Input for  FM like below Tcode and lock , It will run correct but the database updation is not takes place.. Can any one guide to resolve the Iss