Jump to content

MySql Backend


pablo

Recommended Posts

Hi all,

Plastic 2 preview 2 (internally 2.0.85) introduces a new important functionality: MySql backend. Why is it so important? Well, now we start storing all plastic data and metadata at one of the most widely used databases. It will greatly ease server's installation process on systems like Solaris, Mac OS and so on.

Another advantage is scalability: our tests show that Plastic scales better using MySql than any other backend. To see the difference you'll need to have more than 30 or 40 users working against the same server. Under this conditions we clearly outperform (even more than we do with only one user) version control systems like subversion.

How to configure this backend?

Edit (or create) a file named db.conf at the server's directory and put the following content

  <DbConfig>
   <ProviderName>mysql</ProviderName>
   <ConnectionString>
        Server=_SERVER_;User ID=_USER_;Password=_PASSWORD_;
        Database={0};Pooling=true
    </ConnectionString>
   <DatabasePath></DatabasePath>
 </DbConfig>

Note: put all the "connection string" in one line, I've splitted it for the sake of clarity.

Then replace _SERVER_, _USER_ and _PASSWORD_ with your server's data.

The configuration for our internal server is:

  <DbConfig>
   <ProviderName>mysql</ProviderName>
   <ConnectionString>
      Server=SRV_VENUS;User ID=myuser;Password=mypass;Database={0};Pooling=true
    </ConnectionString>
   <DatabasePath></DatabasePath>
 </DbConfig>

If you're using MySql server version previous to 5.1 please change the following parameter too: max_allowed_packet. It is important otherwise you'll have trouble dealing with files bigger than 1Mb. Internally plastic stores large files in 4Mb blocks, so set this size as packet size. Take a look at this article: http://dev.mysql.com/doc/refman/5.0/en/packet-too-large.html.

So, right now plastic can be configured to work with: mysql, sql server and firebird. Internally we have Postgresql and Sqlite backends although we never released them officially.

pablo

Link to comment
Share on other sites

  • 3 years later...

Hello,

I followed exactly the instruction on configuring db.conf and restarted plasticscm server, but when I try to create a new workspace I got this warning screen "No repositories found. Check that the server is running and that there are repositories configured on it." I can connect to MySQL DB fine from HeidiSQL client.

Can you please let me know what I did wrong.

Thanks

Link to comment
Share on other sites

Hi,

Your server is definitely not connecting to MySQL.

Ok, let's go, I'll give you the crash course on server diagnosis:

1- Stop your plastic scm service

2- Open a CLI, go to the directory where your server is installed

3- Delete (unless you've valuable stuff there, which I doubt if you just started using plastic) loader.log.txt

4- run plasticd.exe --console

5- Wait until it starts (it will print the version number)

6- Press ENTER, the server will stop

7- Check loader.log.txt, the reason why the server can't connect to MySQL will be there... (Not tough for a programmer, but feel free to share it with us here :P)

pablo

Link to comment
Share on other sites

ahhh...I see the error now, not sure why I got access denied. I can connect to MySQL DB fine from another machine using HeidiSQL client root account. The DB is on the same server with PlasticSCM. I masked out the IP with xxx...

2011-08-17 11:17:50,776 3328 (null) (null) (null) ERROR bf - Error in CreateDb. Access denied for user 'root'@'xxx.xx.x.xxx' to database 'repositories'

at MySql.Data.MySqlClient.MySqlStream.ReadPacket()

at MySql.Data.MySqlClient.NativeDriver.GetResult(Int32& affectedRow, Int32& insertedId)

at MySql.Data.MySqlClient.Driver.GetResult(Int32 statementId, Int32& affectedRows, Int32& insertedId)

at MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId)

at MySql.Data.MySqlClient.MySqlDataReader.NextResult()

at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)

at MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQuery()

at bf.e(String A_0)

2011-08-17 11:17:50,839 3328 (null) (null) (null) ERROR Codice.CM.Server.RepositoryHandler - The database repositories can't be created. Check the server log for more information. at f.b(String A_0, String A_1)

at f.f()

at Codice.CM.Server.RepositoryHandler.InitService()

2011-08-17 11:17:50,901 3328 EVERY_USER_OR_GROUP 9747e76d-10f8-4771-8df9-a23486090961 Server:PLASTICSCM INFO Transaction - Transaction timeout -> 120000ms

2011-08-17 11:17:50,979 3328 EVERY_USER_OR_GROUP 9747e76d-10f8-4771-8df9-a23486090961 Server:PLASTICSCM ERROR DataConnection - There was a problem in OpenConnection. Access denied for user 'root'@'xxx.xxx.x.xxx' to database 'repositories' [repositories]

at MySql.Data.MySqlClient.MySqlStream.ReadPacket()

at MySql.Data.MySqlClient.NativeDriver.AuthenticateNew()

at MySql.Data.MySqlClient.NativeDriver.Open()

at MySql.Data.MySqlClient.Driver.Open()

at MySql.Data.MySqlClient.Driver.Create(MySqlConnectionStringBuilder settings)

at MySql.Data.MySqlClient.MySqlPool.GetPooledConnection()

at MySql.Data.MySqlClient.MySqlPool.TryToGetDriver()

at MySql.Data.MySqlClient.MySqlPool.GetConnection()

at MySql.Data.MySqlClient.MySqlConnection.Open()

at y.b(CmConnection A_0)

at y.d(CmConnection A_0, bc A_1)

2011-08-17 11:17:50,995 3328 EVERY_USER_OR_GROUP 9747e76d-10f8-4771-8df9-a23486090961 Server:PLASTICSCM INFO Transaction - RollbackArea -- Transaction removed 9747e76d-10f8-4771-8df9-a23486090961

2011-08-17 11:17:50,995 3328 ERROR Transaction - Server PLASTICSCM:8084 wasn't able to open a connection to the database. Check the server's log. at y.d(CmConnection A_0, bc A_1)

at y.b(String A_0, String A_1, bc A_2)

at qu.a()

at Codice.CM.Data.SqlDataQuery.GetAllInactiveUsers()

at k.a()

at Codice.CM.Server.TransactionManager.ExecuteServerTransactedCall(DoServerTransactedCallDelegate call)

2011-08-17 11:17:50,995 3328 ERROR Security - An exception was thrown loading inactive users info:

Codice.CM.Common.CmException: Server PLASTICSCM:8084 wasn't able to open a connection to the database. Check the server's log.

at y.d(CmConnection A_0, bc A_1)

at y.b(String A_0, String A_1, bc A_2)

at qu.a()

at Codice.CM.Data.SqlDataQuery.GetAllInactiveUsers()

at k.a()

at Codice.CM.Server.TransactionManager.ExecuteServerTransactedCall(DoServerTransactedCallDelegate call)

at k.b()

2011-08-17 11:17:51,011 3328 ERROR Security - Starting server without inactive users info

2011-08-17 11:17:51,042 3328 EVERY_USER_OR_GROUP e250a06e-983a-4e54-a4fb-dad0fbcc94d0 Server:PLASTICSCM ERROR DataConnection - There was a problem in OpenConnection. Access denied for user 'root'@'xxx.xxx.x.xxx' to database 'repositories' [repositories]

at MySql.Data.MySqlClient.MySqlStream.ReadPacket()

at MySql.Data.MySqlClient.NativeDriver.AuthenticateNew()

at MySql.Data.MySqlClient.NativeDriver.Open()

at MySql.Data.MySqlClient.Driver.Open()

at MySql.Data.MySqlClient.Driver.Create(MySqlConnectionStringBuilder settings)

at MySql.Data.MySqlClient.MySqlPool.GetPooledConnection()

at MySql.Data.MySqlClient.MySqlPool.TryToGetDriver()

at MySql.Data.MySqlClient.MySqlPool.GetConnection()

at MySql.Data.MySqlClient.MySqlConnection.Open()

at y.b(CmConnection A_0)

at y.d(CmConnection A_0, bc A_1)

2011-08-17 11:17:51,042 3328 EVERY_USER_OR_GROUP e250a06e-983a-4e54-a4fb-dad0fbcc94d0 Server:PLASTICSCM INFO Transaction - RollbackArea -- Transaction removed e250a06e-983a-4e54-a4fb-dad0fbcc94d0

2011-08-17 11:17:51,042 3328 ERROR Transaction - Server PLASTICSCM:8084 wasn't able to open a connection to the database. Check the server's log. at y.d(CmConnection A_0, bc A_1)

at y.b(String A_0, String A_1, bc A_2)

at qu.b()

at Codice.CM.Data.SqlDataQuery.GetAllActiveUsers()

at f.a()

at Codice.CM.Server.TransactionManager.ExecuteServerTransactedCall(DoServerTransactedCallDelegate call)

2011-08-17 11:17:51,042 3328 ERROR Security - An exception was thrown loading known seid info:

Codice.CM.Common.CmException: Server PLASTICSCM:8084 wasn't able to open a connection to the database. Check the server's log.

at y.d(CmConnection A_0, bc A_1)

at y.b(String A_0, String A_1, bc A_2)

at qu.b()

at Codice.CM.Data.SqlDataQuery.GetAllActiveUsers()

at f.a()

at Codice.CM.Server.TransactionManager.ExecuteServerTransactedCall(DoServerTransactedCallDelegate call)

at f.c()

2011-08-17 11:17:51,042 3328 ERROR Security - Starting server without known seid info

2011-08-17 11:17:51,136 3328 EVERY_USER_OR_GROUP 0dac6e83-867c-400a-96e6-9fa107d5bc43 Server:PLASTICSCM ERROR DataConnection - There was a problem in OpenConnection. Access denied for user 'root'@'xxx.xxx.x.xxx' to database 'repositories' [repositories]

at MySql.Data.MySqlClient.MySqlStream.ReadPacket()

at MySql.Data.MySqlClient.NativeDriver.AuthenticateNew()

at MySql.Data.MySqlClient.NativeDriver.Open()

at MySql.Data.MySqlClient.Driver.Open()

at MySql.Data.MySqlClient.Driver.Create(MySqlConnectionStringBuilder settings)

at MySql.Data.MySqlClient.MySqlPool.GetPooledConnection()

at MySql.Data.MySqlClient.MySqlPool.TryToGetDriver()

at MySql.Data.MySqlClient.MySqlPool.GetConnection()

at MySql.Data.MySqlClient.MySqlConnection.Open()

at y.b(CmConnection A_0)

at y.d(CmConnection A_0, bc A_1)

2011-08-17 11:17:51,136 3328 EVERY_USER_OR_GROUP 0dac6e83-867c-400a-96e6-9fa107d5bc43 Server:PLASTICSCM ERROR Trigger - There was an error loading the triggers. Error: Server PLASTICSCM:8084 wasn't able to open a connection to the database. Check the server's log.

Link to comment
Share on other sites

Now I got a bunch of "Table doesn't exist". Do I need to create these tables manually ?

2011-08-17 11:37:22,543 3696 EVERY_USER_OR_GROUP 37e81e45-7eac-402b-b6d0-f7f2f7a982ce Server:PLASTICSCM INFO Transaction - Transaction timeout -> 120000ms

2011-08-17 11:37:22,621 3696 EVERY_USER_OR_GROUP 37e81e45-7eac-402b-b6d0-f7f2f7a982ce Server:PLASTICSCM ERROR DataConnection - Error in ExecuteScalar. Query SELECT sdata FROM databaseinfo WHERE iobjid = 1

Table 'repositories.databaseinfo' doesn't exist

at MySql.Data.MySqlClient.MySqlStream.ReadPacket()

at MySql.Data.MySqlClient.NativeDriver.GetResult(Int32& affectedRow, Int32& insertedId)

at MySql.Data.MySqlClient.Driver.GetResult(Int32 statementId, Int32& affectedRows, Int32& insertedId)

at MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId)

at MySql.Data.MySqlClient.MySqlDataReader.NextResult()

at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)

at MySql.Data.MySqlClient.MySqlCommand.ExecuteScalar()

at a9.c()

at y.c(CmConnection A_0, a9 A_1)

2011-08-17 11:37:22,636 3696 EVERY_USER_OR_GROUP 37e81e45-7eac-402b-b6d0-f7f2f7a982ce Server:PLASTICSCM INFO Transaction - RollbackArea -- Transaction removed 37e81e45-7eac-402b-b6d0-f7f2f7a982ce

2011-08-17 11:37:22,652 3696 ERROR Transaction - Table 'repositories.databaseinfo' doesn't exist at MySql.Data.MySqlClient.MySqlStream.ReadPacket()

at MySql.Data.MySqlClient.NativeDriver.GetResult(Int32& affectedRow, Int32& insertedId)

at MySql.Data.MySqlClient.Driver.GetResult(Int32 statementId, Int32& affectedRows, Int32& insertedId)

at MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId)

at MySql.Data.MySqlClient.MySqlDataReader.NextResult()

at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)

at MySql.Data.MySqlClient.MySqlCommand.ExecuteScalar()

at a9.c()

at y.c(CmConnection A_0, a9 A_1)

at y.d(CmConnection A_0, String A_1)

at qu.a(CmConnection A_0)

at Codice.CM.Data.SqlDataQuery.GetRepositoriesDatabaseInfoData()

at Codice.CM.Server.LicenseManager.a(DateTime& A_0, Boolean& A_1, DateTime& A_2)

at Codice.CM.Server.LicenseManager.a(LicenseData A_0, Boolean A_1)

at Codice.CM.Server.LicenseManager.a(Boolean A_0)

at Codice.CM.Server.TransactionManager.ExecuteServerTransactedCall(DoServerTransactedCallDelegate call)

2011-08-17 11:37:22,652 3696 ERROR Codice.CM.Server.RepositoryHandler - Table 'repositories.databaseinfo' doesn't exist at MySql.Data.MySqlClient.MySqlStream.ReadPacket()

at MySql.Data.MySqlClient.NativeDriver.GetResult(Int32& affectedRow, Int32& insertedId)

at MySql.Data.MySqlClient.Driver.GetResult(Int32 statementId, Int32& affectedRows, Int32& insertedId)

at MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId)

at MySql.Data.MySqlClient.MySqlDataReader.NextResult()

at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)

at MySql.Data.MySqlClient.MySqlCommand.ExecuteScalar()

at a9.c()

at y.c(CmConnection A_0, a9 A_1)

at y.d(CmConnection A_0, String A_1)

at qu.a(CmConnection A_0)

at Codice.CM.Data.SqlDataQuery.GetRepositoriesDatabaseInfoData()

at Codice.CM.Server.LicenseManager.a(DateTime& A_0, Boolean& A_1, DateTime& A_2)

at Codice.CM.Server.LicenseManager.a(LicenseData A_0, Boolean A_1)

at Codice.CM.Server.LicenseManager.a(Boolean A_0)

at Codice.CM.Server.TransactionManager.ExecuteServerTransactedCall(DoServerTransactedCallDelegate call)

at Codice.CM.Server.LicenseManager.d()

at Codice.CM.Server.LicenseManager.Init()

at Codice.CM.Server.RepositoryHandler.InitService()

2011-08-17 11:37:22,730 3696 EVERY_USER_OR_GROUP 00bbd328-e1f0-4eec-8318-9b5894a32b12 Server:PLASTICSCM ERROR DataConnection - Error in ExecuteReader. Query SELECT * FROM seid WHERE sactive != 'T' AND sgroup = 'F'

Table 'repositories.seid' doesn't exist

at MySql.Data.MySqlClient.MySqlStream.ReadPacket()

at MySql.Data.MySqlClient.NativeDriver.GetResult(Int32& affectedRow, Int32& insertedId)

at MySql.Data.MySqlClient.Driver.GetResult(Int32 statementId, Int32& affectedRows, Int32& insertedId)

at MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId)

at MySql.Data.MySqlClient.MySqlDataReader.NextResult()

at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)

at MySql.Data.MySqlClient.MySqlCommand.ExecuteDbDataReader(CommandBehavior behavior)

at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader()

at Codice.CM.Data.CmDataReader..ctor(CmConnection A_0, a9 A_1, y A_2)

at y.a(CmConnection A_0, a9 A_1)

2011-08-17 11:37:22,730 3696 EVERY_USER_OR_GROUP 00bbd328-e1f0-4eec-8318-9b5894a32b12 Server:PLASTICSCM INFO Transaction - RollbackArea -- Transaction removed 00bbd328-e1f0-4eec-8318-9b5894a32b12

2011-08-17 11:37:22,730 3696 ERROR Transaction - Table 'repositories.seid' doesn't exist at MySql.Data.MySqlClient.MySqlStream.ReadPacket()

at MySql.Data.MySqlClient.NativeDriver.GetResult(Int32& affectedRow, Int32& insertedId)

at MySql.Data.MySqlClient.Driver.GetResult(Int32 statementId, Int32& affectedRows, Int32& insertedId)

at MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId)

at MySql.Data.MySqlClient.MySqlDataReader.NextResult()

at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)

at MySql.Data.MySqlClient.MySqlCommand.ExecuteDbDataReader(CommandBehavior behavior)

at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader()

at Codice.CM.Data.CmDataReader..ctor(CmConnection A_0, a9 A_1, y A_2)

at y.a(CmConnection A_0, a9 A_1)

at y.c(CmConnection A_0, String A_1)

at qu.b(CmConnection A_0, String A_1)

at qu.a()

at Codice.CM.Data.SqlDataQuery.GetAllInactiveUsers()

at k.a()

at Codice.CM.Server.TransactionManager.ExecuteServerTransactedCall(DoServerTransactedCallDelegate call)

2011-08-17 11:37:22,730 3696 ERROR Security - An exception was thrown loading inactive users info:

MySql.Data.MySqlClient.MySqlException: Table 'repositories.seid' doesn't exist

at MySql.Data.MySqlClient.MySqlStream.ReadPacket()

at MySql.Data.MySqlClient.NativeDriver.GetResult(Int32& affectedRow, Int32& insertedId)

at MySql.Data.MySqlClient.Driver.GetResult(Int32 statementId, Int32& affectedRows, Int32& insertedId)

at MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId)

at MySql.Data.MySqlClient.MySqlDataReader.NextResult()

at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)

at MySql.Data.MySqlClient.MySqlCommand.ExecuteDbDataReader(CommandBehavior behavior)

at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader()

at Codice.CM.Data.CmDataReader..ctor(CmConnection A_0, a9 A_1, y A_2)

at y.a(CmConnection A_0, a9 A_1)

at y.c(CmConnection A_0, String A_1)

at qu.b(CmConnection A_0, String A_1)

at qu.a()

at Codice.CM.Data.SqlDataQuery.GetAllInactiveUsers()

at k.a()

at Codice.CM.Server.TransactionManager.ExecuteServerTransactedCall(DoServerTransactedCallDelegate call)

at k.b()

2011-08-17 11:37:22,730 3696 ERROR Security - Starting server without inactive users info

2011-08-17 11:37:22,746 3696 EVERY_USER_OR_GROUP e262535d-64d2-4947-a2b7-1c9defc1839a Server:PLASTICSCM ERROR DataConnection - Error in ExecuteReader. Query SELECT * FROM seid

Table 'repositories.seid' doesn't exist

at MySql.Data.MySqlClient.MySqlStream.ReadPacket()

at MySql.Data.MySqlClient.NativeDriver.GetResult(Int32& affectedRow, Int32& insertedId)

at MySql.Data.MySqlClient.Driver.GetResult(Int32 statementId, Int32& affectedRows, Int32& insertedId)

at MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId)

at MySql.Data.MySqlClient.MySqlDataReader.NextResult()

at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)

at MySql.Data.MySqlClient.MySqlCommand.ExecuteDbDataReader(CommandBehavior behavior)

at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader()

at Codice.CM.Data.CmDataReader..ctor(CmConnection A_0, a9 A_1, y A_2)

at y.a(CmConnection A_0, a9 A_1)

2011-08-17 11:37:22,746 3696 EVERY_USER_OR_GROUP e262535d-64d2-4947-a2b7-1c9defc1839a Server:PLASTICSCM INFO Transaction - RollbackArea -- Transaction removed e262535d-64d2-4947-a2b7-1c9defc1839a

2011-08-17 11:37:22,746 3696 ERROR Transaction - Table 'repositories.seid' doesn't exist at MySql.Data.MySqlClient.MySqlStream.ReadPacket()

at MySql.Data.MySqlClient.NativeDriver.GetResult(Int32& affectedRow, Int32& insertedId)

at MySql.Data.MySqlClient.Driver.GetResult(Int32 statementId, Int32& affectedRows, Int32& insertedId)

at MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId)

at MySql.Data.MySqlClient.MySqlDataReader.NextResult()

at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)

at MySql.Data.MySqlClient.MySqlCommand.ExecuteDbDataReader(CommandBehavior behavior)

at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader()

at Codice.CM.Data.CmDataReader..ctor(CmConnection A_0, a9 A_1, y A_2)

at y.a(CmConnection A_0, a9 A_1)

at y.c(CmConnection A_0, String A_1)

at qu.b(CmConnection A_0, String A_1)

at qu.d()

at Codice.CM.Data.SqlDataQuery.GetAllSEID()

at f.a()

at Codice.CM.Server.TransactionManager.ExecuteServerTransactedCall(DoServerTransactedCallDelegate call)

2011-08-17 11:37:22,746 3696 ERROR Security - An exception was thrown loading known seid info:

MySql.Data.MySqlClient.MySqlException: Table 'repositories.seid' doesn't exist

at MySql.Data.MySqlClient.MySqlStream.ReadPacket()

at MySql.Data.MySqlClient.NativeDriver.GetResult(Int32& affectedRow, Int32& insertedId)

at MySql.Data.MySqlClient.Driver.GetResult(Int32 statementId, Int32& affectedRows, Int32& insertedId)

at MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId)

at MySql.Data.MySqlClient.MySqlDataReader.NextResult()

at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)

at MySql.Data.MySqlClient.MySqlCommand.ExecuteDbDataReader(CommandBehavior behavior)

at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader()

at Codice.CM.Data.CmDataReader..ctor(CmConnection A_0, a9 A_1, y A_2)

at y.a(CmConnection A_0, a9 A_1)

at y.c(CmConnection A_0, String A_1)

at qu.b(CmConnection A_0, String A_1)

at qu.d()

at Codice.CM.Data.SqlDataQuery.GetAllSEID()

at f.a()

at Codice.CM.Server.TransactionManager.ExecuteServerTransactedCall(DoServerTransactedCallDelegate call)

at f.c()

2011-08-17 11:37:22,746 3696 ERROR Security - Starting server without known seid info

2011-08-17 11:37:22,777 3696 EVERY_USER_OR_GROUP 59d2184e-2914-4d71-8575-1a772d3546cd Server:PLASTICSCM ERROR DataConnection - Error in ExecuteReader. Query SELECT ta.iobjid as iobjid, ta.iposition as iposition, ta.sname as sname, ta.itype as itype, ta.isubtype as isubtype, ta.spath as spath, ta.sfilter as sfilter, ta.fidowner as fidowner, ta.fidacl as fidacl FROM triggeraction ta

Table 'repositories.triggeraction' doesn't exist

at MySql.Data.MySqlClient.MySqlStream.ReadPacket()

at MySql.Data.MySqlClient.NativeDriver.GetResult(Int32& affectedRow, Int32& insertedId)

at MySql.Data.MySqlClient.Driver.GetResult(Int32 statementId, Int32& affectedRows, Int32& insertedId)

at MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId)

at MySql.Data.MySqlClient.MySqlDataReader.NextResult()

at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)

at MySql.Data.MySqlClient.MySqlCommand.ExecuteDbDataReader(CommandBehavior behavior)

at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader()

at Codice.CM.Data.CmDataReader..ctor(CmConnection A_0, a9 A_1, y A_2)

at y.a(CmConnection A_0, a9 A_1)

2011-08-17 11:37:22,777 3696 EVERY_USER_OR_GROUP 59d2184e-2914-4d71-8575-1a772d3546cd Server:PLASTICSCM ERROR Trigger - There was an error loading the triggers. Error: Table 'repositories.triggeraction' doesn't exist

Link to comment
Share on other sites

Hi,

It looks like a permissions issue with your MySQL setup.

And now you probably are in the middle of a "broken situation" (db created but empty)

Let's go:

1- drop the repositories database from mysql

2- run plastic again

3- check if it works, if not, the error should show up on the log

it could be that now it has permissions to create db but not tables, although I don't find it possible. I bet retrying from a clean situation will work... Otherwise we've to figure out why tables are not being created

(and don't worry, plastic creates all the tables itself)

Link to comment
Share on other sites

So I drop repositories DB and restarted plasticscm and this is what I got in loader.log.txt file.

2011-08-17 15:05:28,587 3408 EVERY_USER_OR_GROUP 10c36a66-4a0d-49a1-8a1b-01143950d449 Server:PLASTICSCM INFO Transaction - Transaction timeout -> 120000ms

2011-08-17 15:05:29,384 3408 EVERY_USER_OR_GROUP ab9a9f5e-ea96-4766-903e-b917f01c9870 Server:PLASTICSCM ERROR bf - Error in CreateDb. Access denied for user 'root'@'xxx.xxx.x.xxx' to database 'rep_1'

at MySql.Data.MySqlClient.MySqlStream.ReadPacket()

at MySql.Data.MySqlClient.NativeDriver.GetResult(Int32& affectedRow, Int32& insertedId)

at MySql.Data.MySqlClient.Driver.GetResult(Int32 statementId, Int32& affectedRows, Int32& insertedId)

at MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId)

at MySql.Data.MySqlClient.MySqlDataReader.NextResult()

at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)

at MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQuery()

at bf.e(String A_0)

2011-08-17 15:05:29,384 3408 EVERY_USER_OR_GROUP ab9a9f5e-ea96-4766-903e-b917f01c9870 Server:PLASTICSCM ERROR datalayer - Error in CreateSingleRepository. The database rep_1 can't be created. Check the server log for more information.

at f.b(String A_0, String A_1)

at f.b(Int64 A_0)

2011-08-17 15:05:29,415 3408 EVERY_USER_OR_GROUP ab9a9f5e-ea96-4766-903e-b917f01c9870 Server:PLASTICSCM INFO Transaction - RollbackArea -- Transaction removed ab9a9f5e-ea96-4766-903e-b917f01c9870

2011-08-17 15:05:29,415 3408 ERROR Transaction - Object reference not set to an instance of an object. at Codice.CM.Server.RepositoryHandler.CreateRepository(String repositoryName)

at Codice.CM.Server.RepositoryHandler.b()

at Codice.CM.Server.TransactionManager.ExecuteServerTransactedCall(DoServerTransactedCallDelegate call)

2011-08-17 15:05:29,415 3408 ERROR Codice.CM.Server.RepositoryHandler - Object reference not set to an instance of an object. at Codice.CM.Server.RepositoryHandler.CreateRepository(String repositoryName)

at Codice.CM.Server.RepositoryHandler.b()

at Codice.CM.Server.TransactionManager.ExecuteServerTransactedCall(DoServerTransactedCallDelegate call)

at Codice.CM.Server.RepositoryHandler.a()

at Codice.CM.Server.RepositoryHandler.InitService()

Link to comment
Share on other sites

hmmmm.....so I stopped the mysql db and plastics scm and restarted those 2 again and this is what I got in the upgrade.log.txt

2011-08-17 15:33:05,023 3464 EVERY_USER_OR_GROUP 9cf205cd-7559-42af-8e9c-627c049c338b Server:PLASTICSCM INFO Transaction - Transaction timeout -> 120000ms

2011-08-17 16:27:30,787 3332 EVERY_USER_OR_GROUP deef80e3-ea15-4baf-8c59-208c015c234e Server:PLASTICSCM INFO Transaction - Transaction timeout -> 120000ms

Link to comment
Share on other sites

Ok, now it is complaining it can't create rep_1 database.

On the first run Plastic will try to create:

- "repositories" database

- rep_1 database

if it doesn't have permissions to create then, it will complain.

It is complaining because it can't access rep_1, and it can't create it either...

We've installed tons and tons of MySQLs... so it must be a permissions issue...

IT seems you're accessing with "root" user, so it should have ALL permissions, but just check, maybe something is not allowed...

The user Plastic is using should be able to:

- create databases (at least on the first run, you can drop this privilege afterwards, we often do)

- create tables inside the newly created database

it is not more than that, so some issue is happening due to the connection ...

(Every plastic release passes the entire "smoke" test suite on MySQL... and it means it goes through this process 340 times...)

Link to comment
Share on other sites

Hi Pfc, as Pablo indicated, drop the repositories + rep_1 from within my sql "taking into account you have absolutely nothing saved on rep_1"

check from the same machine where you have Plastic server installed that you can connect to the Mysql server.

also find some hints in this Plastic KB article how to define a new mysql user and grant that user the permissions needed:

http://www.plasticscm.com/infocenter/technical-articles/kb-plastic-scm-database-backend-migrating-sqlite-to-mysql.aspx

My plastic server and MySql server were on the same machine.

restart the plastic scm server, check on your mysql that repositories + rep_1 are created.

check from the plastic client machine that you can access the automatically create default repository, simple, on commandline, execute

cm lrep

if not successful, check logs at the server.

I hope this helps,

Miller

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...