Bug #60551 Start manualy but aborting when start as a Windows service
Submitted: 20 Mar 2011 16:27 Modified: 27 May 2011 15:03
Reporter: Philippe Jean Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Windows Severity:S2 (Serious)
Version:5.1.51-ndb-7.1.10-cluster-gpl-debug OS:Windows (Windows Server 2008 SP1 and Vista SP2)
Assigned to: CPU Architecture:Any

[20 Mar 2011 16:27] Philippe Jean
Description:
I prepare a cluster and when I start the MySQL server manually, everything works perfectly. In Windows service, it starts but it ends with the message "Aborting"in the Windows event log.

I use the same command options and the same configuration file. In the service registry for debuging;
"C:\mysqlc\bin\mysqld-debug" --defaults-file="C:\my_cluster\conf\my.ini" --debug=d:t:o,C:\my_cluster\mysqld_data\mysql.trace MySQL

When started as a service, the error file is created but remains empty.

In debug mode, the trace file created and contains all the steps but no error appears.

I see in the cluster manager log that mysqld connects well to the nodes before aborting.

How to repeat:
Install as a service with --install

Edit the service registry to add the --default-file=...

Try to start the service.
[20 Mar 2011 16:28] Philippe Jean
Trace file when started as a service

Attachment: mysql.trace (text/plain), 212.18 KiB.

[20 Mar 2011 16:29] Philippe Jean
Error file created (empty)

Attachment: STATION-001.err (application/octet-stream, text), 0 bytes.

[20 Mar 2011 16:39] Philippe Jean
Error file when started manualy

Attachment: STATION-001.err (application/octet-stream, text), 1.53 KiB.

[20 Mar 2011 16:41] Philippe Jean
Trace file when started manualy

Attachment: mysql.trace.zip (application/x-zip-compressed, text), 95.14 KiB.

[21 Mar 2011 16:34] MySQL Verification Team
Could you please try as described below (isn't necessary to edit the Windows Registry):

1- Remove the current service: mysqld --remove service_name
2- Install the service:

mysqld --install service_name(i.e: mysql51) --defaults-file="C:\my_cluster\conf\my.ini"

start the service.

Do the above with Administrator privileges.

Thanks.
[21 Mar 2011 17:30] Philippe Jean
The new value "ImagePath" in the registry is 

C:\mysqlc\bin\mysqld --defaults-file=C:\my_cluster\conf\my.ini MySQL51

and I have exactly the same problem. Empty error file and "Aborting" message in the Windows application event log. 

I disabled the cluster support in the config file and no change. I reset default database from the .zip and no change. In debugging mode, the trace file is created and filled. This tells me that the rights of the directory are correct. I changed the rights for "everyone" without change.

Thank you,
[30 Mar 2011 13:58] MySQL Verification Team
If you try on command prompt run as administrator:

mysqld --defaults-file=path_for_my_ini\my.ini --standalone --console

which error messages are printed?. Thanks in advance.
[30 Mar 2011 21:37] Philippe Jean
I have no error message.

This is the text displayed in console;

C:\mysqlc\bin>mysqld --defaults-file=C:\my_cluster\conf\my.ini --standalone --console
110330 17:33:39 [Note] Plugin 'FEDERATED' is disabled.
110330 17:33:39  InnoDB: Started; log sequence number 0 44273
110330 17:33:39 [Note] NDB: NodeID is 100, management server 'station-001.lsi.local:1186'
110330 17:33:40 [Note] NDB[0]: NodeID: 100, all storage nodes connected
110330 17:33:40 [Note] Starting Cluster Binlog Thread
110330 17:33:41 [Note] Event Scheduler: Loaded 0 events
110330 17:33:41 [Note] NDB Binlog: DISCOVER TABLE Event: REPL$mysql/ndb_schema
110330 17:33:41 [Note] NDB Binlog: logging .\mysql\ndb_schema (UPDATED,USE_WRITE)
110330 17:33:41 [Note] NDB Binlog: DISCOVER TABLE Event: REPL$mysql/ndb_apply_status
110330 17:33:41 [Note] NDB Binlog: logging .\mysql\ndb_apply_status (UPDATED,USE_WRITE)
2011-03-30 17:33:42 [NdbApi] INFO     -- Flushing incomplete GCI:s < 614159/18
2011-03-30 17:33:42 [NdbApi] INFO     -- Flushing incomplete GCI:s < 614159/18
110330 17:33:42 [Note] NDB Binlog: starting log at epoch 614159/18
110330 17:33:42 [Note] NDB Binlog: ndb tables writable
110330 17:33:42 [Note] NDB Binlog: Node: 1, subscribe from node 101, Subscriber bitmask 00
110330 17:33:42 [Note] mysqld: ready for connections.
Version: '5.1.51-ndb-7.1.10-cluster-gpl'  socket: ''  port: 3306  MySQL Cluster Server (GPL)
110330 17:33:42 [Note] NDB Binlog: Node: 1, subscribe from node 102, Subscriber bitmask 00
110330 17:33:42 [Note] NDB Binlog: Node: 2, subscribe from node 102, Subscriber bitmask 00
110330 17:33:42 [Note] NDB Binlog: Node: 2, subscribe from node 101, Subscriber bitmask 00
[31 Mar 2011 2:17] MySQL Verification Team
Open a command prompt as administrator and print the output of:

sc qc mysql51

and then try to start the service:

net start mysql51

print the error message if exists here.

Thanks.
[31 Mar 2011 3:02] Philippe Jean
When I type "sc qc mysql51"

C:\>sc qc mysql51
[SC] QueryServiceConfig réussite(s)

SERVICE_NAME: mysql51
        TYPE               : 10  WIN32_OWN_PROCESS
        START_TYPE         : 2   AUTO_START
        ERROR_CONTROL      : 1   NORMAL
        BINARY_PATH_NAME   : C:\mysqlc\bin\mysqld --defaults-file=C:\my_cluster\conf\my.ini MySQL51
        LOAD_ORDER_GROUP   :
        TAG                : 0
        DISPLAY_NAME       : MySQL51
        DEPENDENCIES       :
        SERVICE_START_NAME : LocalSystem

When I start the service;

C:\>net start mysql51
Le service MySQL51 démarre...
Le service MySQL51 n'a pas pu être lancé.

Une erreur système s'est produite.

L'erreur système 1067 s'est produite.

Le processus s'est arrêté inopinément.
[27 May 2011 15:03] Philippe Jean
Problem solved with upgrade to 5.1.56

Thanks,