Discussion:
syslog-ng service fails: Error starting a service: QueryServiceStatus: Win32 error 1062
Ulrich Schmidt
2012-03-27 11:47:22 UTC
Permalink
E-Mail lesen « 1 Von 22 »



Environment:
Windows 7/32
Cygwin 1.7.11-1
OpenSSH 5.9p1-1
syslog-ng 3.2.1-1

Dear Community,

I’m just started with Cygwin and want to run openSSH. I’m getting slowly furher with knowledge and success and had to install Cygwin therefore several times. I couldn’t setup the openSSH-config again (with the “ssh-host-config” cmd). the flow of the script looked quite good but the service wasn’t startable; I always got message “cygrunsrv: Error starting a service: QueryServiceStatus: Win32 error 1062”.
Now I can help by deleting the privileged user “cyg_server” from /etc/passwd before running “ssh-host-config”.
I can now logon locally to the server by issuing “ssh <userid>@localhost”. But Logon from remote system fails with permission denied for some reason and I would like to find out by writing messages to syslog. syslog-ng was running; I changed the sshd_config to LogLevel DEBUG3 but nothing happened to the log. So I tried to restart syslog-ng as well; stopped it with “cygrunsrv –E syslog-ng” but starting failed with same error “cygrunsrv: Error starting a service: QueryServiceStatus: Win32 error 1062” as before sshd. But here is no user I can delete from /etc/passwd.
So I removed the service (cygrunsrv –R syslog-ng) and installed it again:
***@WS885383 ~
$ cygrunsrv -R syslog-ng

***@WS885383 ~
$ /bin/syslog-ng-config
Overwrite existing /etc/syslog-ng/syslog-ng.conf file? (yes/no) yes
/etc/syslog-ng/syslog-ng.conf has been renamed to /etc/syslog-ng/syslog-ng.conf.old.
Creating default syslog-ng configuration files in /etc/syslog-ng


Warning: The following function requires administrator privileges!

Do you want to install syslog-ng as service?
(Say "no" if it's already installed as service) (yes/no) yes

The service has been installed under LocalSystem account.
To start the service, call `net start syslog-ng' or `cygrunsrv -S syslog-ng'.

Check /etc/syslog-ng/syslog-ng.conf first, if it suits your needs.

Configuration finished. Have fun!

***@WS885383 ~
$ cygrunsrv -S syslog-ng
cygrunsrv: Error starting a service: QueryServiceStatus: Win32 error 1062:
The service was not started.


***@WS885383 ~
$ cygrunsrv -VQ syslog-ng
Service : syslog-ng
Display name : CYGWIN syslog-ng
Current State : Stopped
Command : /usr/sbin/syslog-ng -F
stdin path : /dev/null
stdout path : /var/log/syslog-ng.log
stderr path : /var/log/syslog-ng.log
Process Type : Own Process
Startup : Automatic
Account : LocalSystem


Then I tried to start it with the privileged user:
***@WS885383 ~
$ cygrunsrv -R syslog-ng

***@WS885383 ~
$ cygrunsrv -VQ syslog-ng
cygrunsrv: Error querying a service: OpenService: Win32 error 1060:
Der angegebene Dienst ist kein installierter Dienst. (means: The specified service is not an installed service)


***@WS885383 ~
$ cygrunsrv -I syslog-ng -d "SYSLOG-NG" -p /usr/sbin/syslog-ng -a "-F" -u cyg_server
Enter password of user `WS885383\cyg_server':
Reenter, please:

***@WS885383 ~
$ cygrunsrv -VQ syslog-ng
Service : syslog-ng
Current State : Stopped
Command : /usr/sbin/syslog-ng -F
stdin path : /dev/null
stdout path : /var/log/syslog-ng.log
stderr path : /var/log/syslog-ng.log
Process Type : Own Process
Startup : Automatic
Account : .\cyg_server


***@WS885383 ~
$ cygrunsrv -S syslog-ng
cygrunsrv: Error starting a service: QueryServiceStatus: Win32 error 1062:
The service was not started.

And now I have no idea but to install the whole environment (Cygwin) again.

I would appreciate to understand and fix whats going on here.

Ulrich
Ken Brown
2012-03-27 15:40:02 UTC
Permalink
Post by Ulrich Schmidt
$ cygrunsrv -S syslog-ng
The service was not started.
This might be a known problem with syslog-ng. See the thread starting at

http://cygwin.com/ml/cygwin/2011-10/msg00449.html

Ken
Corinna Vinschen
2012-03-27 16:16:46 UTC
Permalink
Post by Ken Brown
Post by Ulrich Schmidt
$ cygrunsrv -S syslog-ng
The service was not started.
This might be a known problem with syslog-ng. See the thread starting at
http://cygwin.com/ml/cygwin/2011-10/msg00449.html
So you're just wating for me to update the syslog-ng package, right?
I'll see to it in the next couple of days.


Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Project Co-Leader cygwin AT cygwin DOT com
Red Hat
Ken Brown
2012-03-27 16:35:02 UTC
Permalink
Post by Corinna Vinschen
Post by Ken Brown
Post by Ulrich Schmidt
$ cygrunsrv -S syslog-ng
The service was not started.
This might be a known problem with syslog-ng. See the thread starting at
http://cygwin.com/ml/cygwin/2011-10/msg00449.html
So you're just wating for me to update the syslog-ng package, right?
I didn't want to say that, but...
Post by Corinna Vinschen
I'll see to it in the next couple of days.
Thanks.

Ken
Ulrich Schmidt
2012-03-27 19:14:01 UTC
Permalink
Oh yes - you are right. And I had already seen it before I issued my record,
sorry. But when I started the description I thought I would get somewhere and
forgot about your experience. It is the same problem; after deleting
syslog-ng.persist I could start the service. Thank you.
Ulrich
Post by Ken Brown
Post by Ulrich Schmidt
$ cygrunsrv -S syslog-ng
The service was not started.
This might be a known problem with syslog-ng. See the thread starting at
http://cygwin.com/ml/cygwin/2011-10/msg00449.html
Ken
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Loading...