Re: connector mxj can't init db on linux

Eric Herman <[email protected]>
Newsgroups gmane.comp.db.mysql.java
Message-ID <1146158444.7390.77.camel@localhost>
On Thu, 2006-04-27 at 15:15 +0200, Andreas Schlicker wrote:

Hello Andreas,


> Hi all,
> 
> I'm using connector mxj 1.1.6 with Java 1.5.0_06 on Debian Linux.
> 
> I have an small program that fills the database and a second one uses 
> this db. First, I filled the db and the program exited with the 
> following output:
> 
> [MysqldResource] stopping mysqld (process: 28975)
> 060427 14:43:32 [Note] 
> /TL/usr1/schlandi/work/master_thesis/GOTaxExplorer/fsst/bin/mysqld: 
> Normal shutdown
> 
> 060427 14:43:33  InnoDB: Starting shutdown...
> 060427 14:43:34  InnoDB: Shutdown completed; log sequence number 0 43634
> 060427 14:43:34 [Note] 
> /TL/usr1/schlandi/work/master_thesis/GOTaxExplorer/fsst/bin/mysqld: 
> Shutdown complete
> 
> [MysqldResource] clearing options
> [MysqldResource] shutdown complete
> 

The output above looks normal and good.

> Then I started the second application but it always gives me the 
> following error:
> [MysqldResource] launching mysqld (driver_launched_mysqld_1)
> InnoDB: Unable to lock ./ibdata1, error: 11
> InnoDB: Check that you do not already have another mysqld process
> InnoDB: using the same InnoDB data or log files.
> 060427 15:01:51  InnoDB: Retrying to lock the first data file
> ...
> InnoDB: Unable to lock ./ibdata1, error: 11
> InnoDB: Check that you do not already have another mysqld process
> InnoDB: using the same InnoDB data or log files.
> 060427 15:03:31  InnoDB: Unable to open the first data file
> InnoDB: Error in opening ./ibdata1
> 060427 15:03:31  InnoDB: Operating system error number 11 in a file 
> operation.
> InnoDB: Error number 11 means 'Resource temporarily unavailable'.
> InnoDB: Some operating system error numbers are described at
> InnoDB: http://dev.mysql.com/doc/mysql/en/Operating_System_error_codes.html
> InnoDB: Could not open or create data files.
> InnoDB: If you tried to add new data files, and it failed here,
> InnoDB: you should now edit innodb_data_file_path in my.cnf back
> InnoDB: to what it was, and remove the new ibdata files InnoDB created
> InnoDB: in this failed attempt. InnoDB only wrote those files full of
> InnoDB: zeros, but did not yet use them in any way. But be careful: do not
> InnoDB: remove old data files which contain your precious data!
> 060427 15:03:31 [ERROR] Can't init databases
> 060427 15:03:31 [ERROR] Aborting
> 

This part looks very unusual. Clearly there is something wrong here,
relating to ibdata1, but I don't have a good guess what immediately. I
have not seen this before with Connector/MXJ.

> 
> I checked that there is no other mysqld instance running (pstree, 
> netstat) and tried to run the second program on a different machine. The 
> code used to connect to the database is identical in both cases.

I understand that it is not practical for you to post your code, but
perhaps I could persuade you to create some sample code (similar to your
real code) which also has this problem. Then I could run the code and
see if I can reproduce the error, and hopefully gain some insight into
how to fix it.

> 
> Does anybody have an idea what the problem could be?
> 
> Thanks,
> Andreas
> 

Cheers,
 -- Eric

-- 
Eric Herman, Software Developer
MySQL AB, www.mysql.com
Mobile: +1 206 913 8942

Are you MySQL certified?  www.mysql.com/certification


-- 
MySQL Java Mailing List
For list archives: http://lists.mysql.com/java
To unsubscribe:    http://lists.mysql.com/[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.