[ts-gen] [Re:] shim error
Bill Pippin
pippin at owlriver.net
Mon Mar 22 10:29:59 EDT 2010
Mike,
About the startup problem you are seeing, I'll start with the
error dump you've provided; add a note about shim internals;
highlight the underlying point of failure; point out a work-around
I hope you'll skip, and, last, give a hypothesis you can check
as to the fundamental problem and solution. With respect to
that last point, please let us know what you find.
> Problem: 414 mysql query evaluation failed
> Error 1044 (42000): Access denied for user 'shim'@'localhost' ...
> Problem: 417 AccountCode tuple not found following insert
> Problem: 525 could not obtain IB account info at startup
> Exiting
1. It's probably obvious from the above that the shim does not have
write permission to the AccountCode table. The mysql server
returned an error on an attempted insert, the shim translated
that to the 414 error, the following checking attempt to read the
insert failed for the simple reason that it wasn't there, and
the shim quit, unable to confirm the account code.
2. Note that once that account code record reaches the database,
the shim doesn't attempt to write it on later sessions; the
problem you are seeing is a one-time affair that might show up
when you start with a new, empty database, or move to a new
account.
3. Why wouldn't the shim have write permissions? This is purely a
matter of database setup; nothing in the design or implementation
of the shim itself modifies database permissions in any way. So,
the fundamental issue lies with the database setup process.
4. Although you've probably figured out already that you can
finesse this problem by manually entering the AccountCode tuple
into the appropriate database record, using the mysql interpreter
and a hand-typed sql insert statement, I hope you'll consider
the more fundamental solution.
5. You may have been recreating the database tables with the
create.sql script, and indeed that is what it's for, yet in this
case, given the elapsed time from your last install, the shim's
database permissions are probably incomplete, and you likely need
to start from scratch, using the setup.sql script rather than the
create.sql script. The setup script drops the old databases,
recreates new ones, adds permissions, and rebuilds tables; the
create.sql script takes care of the last step only, as it drops,
recreates, and repopulates tables.
So, once you've unloaded any journal data you want to save, and in order
to obtain admin privileges on the mysql dbms and run the setup.sql script:
begin from a command line session having as current directory the sql
subdirectory of the unpack directory, e.g., shim-100319/sql ; start up
the mysql interpreter with the -p option by itself; answer the resulting
password prompt with the appropriate value; and source the setup.sql
script from with the sql session.
This should fix your problem, and in any case, please let us know what
happens.
By the way, near-future versions of the shim are likely to include some
changes to startup account code processing, involving support for the
Account configuration variable. That, however, is an issue for another
post on another day.
Thanks,
Bill
More information about the ts-general
mailing list