What steps will reproduce the problem? 1.Gave this in command prompt c:\memcached\memcached.exe -d install 2.Failed to ignore SIGHUP: Result too large 3
What is the expected output? What do you see instead? Its spposed to install but Failed to ignore SIGHUP: Result too large is teh message
What version of the product are you using? On what operating system? memcached-1.4.5-x86.zip file I downloaded and windows 7 is the Operating system.
Please provide any additional information below.
Comment #1
Posted on Aug 4, 2010 by Massive MonkeyThis is an issue, but the -d functionality has changed.
I know it's not so nice to change flags in micro-releases, but the use of -d for installing as a service was never really sufficient for most installs, as you really need a way to manage the arguments to memcached.
The -d should not generate that error message, but it will, starting with 1.4.5, no longer support installing itself as a windows service. I recommend you wrapper it with whatever is appropriate to start the memcached.exe and pass flags.
Comment #2
Posted on Aug 4, 2010 by Happy Oxwhat flags you recommend to install and start memchached
c:\memcached\memcached.exe -d install
c:\memcached\memcached.exe -d start
Comment #3
Posted on Aug 4, 2010 by Helpful LionInstall: http://support.microsoft.com/kb/251192
memcached -h gives you the options you can pass.. "memcached -m 1024" would use 1gb of ram etc..
Comment #4
Posted on Aug 13, 2010 by Happy KangarooI installed service as: sc create memcached binpath= "path to bin.exe"
But it does not starting. Error 1053: The service did not respond to the start or control request in a timely fashion.
Comment #5
Posted on Aug 13, 2010 by Happy OxRun the command prompt as Administrator and I could install. Click on Start-> Accessories-> right click on CMD and select Run AS Administrator and give your command. It should work.
Comment #6
Posted on Aug 17, 2010 by Happy PandaI've did this:
1) run CMD as an administrator (see comment 5) 2) type SC create memcached binpath= "c:\memcached\145\memcached.exe -m 512 -d" 3) type NET START memcahed
Although you get an error, the program started (check task manager or connect to it using telnet).
The probel is that every time you do a "net start memcached" you get another instance running (how do they all bind on 11211 I do not know).
Bottom line: moved back to 1.4.4 until this issu is solved.
Comment #7
Posted on Aug 17, 2010 by Helpful ElephantI know roughly nothing about Windows, but why would you add -d to the sc thing? In unix, I'd expect it to make that not be controlled by the supervisor.
Comment #8
Posted on Aug 17, 2010 by Helpful BirdI also tried with the 1.4.5 version from Northscale and got this:
C:\memcached-x86>sc create memcachedtest binpath= "c:\memcached-x86\memcached.exe -m 512" [SC] CreateService SUCCESS
C:\memcached-x86>net start memcachedtest The service is not responding to the control function.
If my memory serves me correctly, you need a bit of extra stuff in a windows executable for it to actually work as a service, did you accidentally remove that when you removed everything related to handling the -d parameter in the windows version?
Comment #9
Posted on Aug 17, 2010 by Helpful BirdRight, if you check out this: http://code.jellycan.com/files/memcached-1.2.6-win32-src.zip
...you'll notice that there is a win32 folder which contains a bunch of stuff, but also the files ntservice.c and ntservice.h. This is the "service interface" that you need to implement for it to respond to service control calls.
Did any of this code make it into later versions of memcached?
(Sadly I don't know anything about developing in C on windows, so can't help you much more than this)
Comment #10
Posted on Aug 17, 2010 by Helpful BirdComment deleted
Comment #11
Posted on Aug 18, 2010 by Massive MonkeyAs I said above, -d NO LONGER SETS IT UP AS A SERVICE. The code was later added, and then it was removed because it's really not sufficient. You generally want to specify things like ports and amount of memory.
Use something else to wrapper it as a service.
Note: when I posted the 1.4.5 binary I suspect the bug reporter is using, I even mentioned the change on the page: http://labs.northscale.com/memcached-packages/
The bug remains open because it should do something other than "Failed to ignore SIGHUP".
Comment #12
Posted on Aug 18, 2010 by Happy Panda@ ingenthr -d does not set it up as a service but according to help makes it run as a daemon. Do a memcached.exe -h.
Whatever parameter you want to supply to memcached when you want it as a service you can do it:
SC create memcached binpath= "c:\memcached\145\memcached.exe -m 512 -d "
So what guys did with version 1.4.5 is ok, only that -d that is supposed to run the thing as a deamon (service in windows) is not doing the thing correctly.
I hope they will correct this.
Basically we do not need anymore -d start / install / uninstall / stop. But we need it as a service so new -d parameter should do its job.
Comment #13
Posted on Aug 18, 2010 by Happy KangarooHow to run memcached as a service? On windows it is a great prbolem, if you dont know. While creating with SC, service not starting. HELP!
Use something else to wrapper it as a service. example?
Comment #14
Posted on Aug 18, 2010 by Helpful Bird@kinguru:
You have two options. The first solution is to run an older version of memcached that still can be installed and run as a service. You can download version 1.2.6 here: http://code.jellycan.com/memcached/
The second solution is to use SrvAny from the Microsoft resource kit, but I have no idea if this is still supported under Vista or Windows 7 and related server versions. More info here: http://support.microsoft.com/kb/137890
Comment #15
Posted on Sep 1, 2010 by Helpful GiraffeI execute the following command from console as a administrator and it works fine : Now it is binded to 21201 tcp port and 21202 UDP port on my localhost.
C:\memcached-x86>memcached.exe -p 21201 -r -U 21202 -c 200 -n 65536 -l localhost -m 128
Comment #16
Posted on Oct 8, 2010 by Happy BirdComment deleted
Comment #17
Posted on Oct 8, 2010 by Happy BirdComment deleted
Comment #18
Posted on Nov 11, 2010 by Swift KangarooSince this functionality was working for most people, why was it ripped out?
Comment #19
Posted on Nov 11, 2010 by Helpful LionBecause it change the semantics for the -d argument. In addition it doesn't make any sense to add code in memcached to provide functionality microsoft already includes through sc.exe...
Comment #20
Posted on Nov 15, 2010 by Happy Birdhello experts, please tell me what i can do in case i dont have admin privilage?
Comment #21
Posted on Nov 15, 2010 by Swift KangarooBut the option "-d runservice" has been removed so SC wont work. So now the process will need to be wrapped in svrany.exe or some other "application as a service" wrapper.
Comment #22
Posted on Jul 12, 2011 by Helpful BirdWindows users should try again with 1.6, or if someone wants to volunteer to maintain a wiki page about Windows, please contact me for access permissions. Leaving this all in an issue is silly.
Status: WontFix
Labels:
Type-Defect
Priority-Low