On Wed, 30 Aug 2006, ukr.name.lists wrote: > Hello, Igor. > > OK, Here's long story. I'm trying to replay what I did to set > up Apache before. > > Did $cygrunsrv.exe -I httpd -d "CYGWIN httpd" -p /usr/sbin/httpd -a -F > Started service. Doesn't work. Lines in error_log: > > [Wed Aug 30 17:52:30 2006] [notice] Apache/1.3.33 (Cygwin) configured -- > resuming normal operations > [Wed Aug 30 17:52:30 2006] [notice] Accept mutex: pthread (Default: pthread) > [Wed Aug 30 17:52:30 2006] [alert] (3)No such process: setuid: unable to > change to uid: 1003 > [Wed Aug 30 17:52:31 2006] [alert] Child 2920 returned a Fatal error... > \nApache is exiting! > > uid 1003 exists and my current uid. After some digging found out that > there's some special user needed instead of SYSTEM to run such services in > 2003. > > Decided to setup OpenSSH and use it's sshd_server user to run Apache. > > Executed ssh-host-config, did $cygrunsrv -S sshd, checked if sshd > running and accepts connection - yes. Rebooted. Checked if sshd running. > Kinda. It's still in list of running services but doesn't accept any > connections. Messages from /var/log/sshd.log: > 5 [main] ? (3788) E:\Cygwin\usr\sbin\sshd.exe: *** fatal error - > E:\Cygwin\usr\sbin\sshd.exe: *** couldn't allocate heap, Win32 error 0, base > 0x6A0000, top 0x6B0000, reserve_size 61440, allocsize 65536, page_const 4096 > 9 [main] sshd 1952 fork: child -1 - died waiting for longjmp before > initialization, retry 0, exit code 0x100, errno 11 > 4 [main] ? (3960) E:\Cygwin\usr\sbin\sshd.exe: *** fatal error - > E:\Cygwin\usr\sbin\sshd.exe: *** couldn't allocate heap, Win32 error 0, base > 0x6A0000, top 0x6B0000, reserve_size 61440, allocsize 65536, page_const 4096 > 2754387 [main] sshd 1952 fork: child -1 - died waiting for longjmp before > initialization, retry 0, exit code 0x100, errno 11 > 4 [main] ? (1684) E:\Cygwin\usr\sbin\sshd.exe: *** fatal error - > E:\Cygwin\usr\sbin\sshd.exe: *** couldn't allocate heap, Win32 error 0, base > 0x6A0000, top 0x6B0000, reserve_size 61440, allocsize 65536, page_const 4096 > 38433345 [main] sshd 1952 fork: child -1 - died waiting for longjmp before > initialization, retry 0, exit code 0x100, errno 11 > > Last error repeated on each connect attempt. > > Then did: > $ cygrunsrv -E sshd > $ telnet localhost 22 > Trying 127.0.0.1... > telnet: Unable to connect to remote host: Connection refused > $ cygrunsrv -S sshd > $ telnet localhost 22 > Trying 127.0.0.1... > Connected to nowhere-vi3mfi2. > Escape character is '^]'. > Connection closed by foreign host. > > Now it works. Nothing in log. > > I'll stop here before proceeding to Apache because it behave exactly > the same - "couldn't allocate heap after boot", normal operation after > restarting service. > > Thank you in advance !
Sergei, The fact that the service doesn't work after system boot and then works fine after a restart seems to suggest that it's started too early (before some other service). You need to discover what that service is (could be the firewall service, or Tcp/ip, or something else) and add a dependency to it by using the -y cygrunsrv option. Your cygcheck output confirms that your apache service has no dependencies. HTH, Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_ [EMAIL PROTECTED] | [EMAIL PROTECTED] ZZZzz /,`.-'`' -. ;-;;,_ Igor Peshansky, Ph.D. (name changed!) |,4- ) )-,_. ,\ ( `'-' old name: Igor Pechtchanski '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! "Las! je suis sot... -Mais non, tu ne l'es pas, puisque tu t'en rends compte." "But no -- you are no fool; you call yourself a fool, there's proof enough in that!" -- Rostand, "Cyrano de Bergerac" -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/