TJClifton Posted April 4, 2016 Report Share Posted April 4, 2016 Hi, I have recently hit an issue where all my repositories seem to have disappeared, although the workspaces are still listed. Attempting to navigate to any section in the plastic GUI client results in an error reading "There has been an unexpected error "No database selected"". If I run 'cm lrep' it likewise states that "There are no repositories in this server". The problem started when I was attempting to modify my MySQL configuration. I ended up having to remove and create a new service due to a weird state I managed to get it in. The MySQL service is running again correctly and I can view it correctly in the MySQL Workbench but when I tried to run Plastic again I started hitting these problems. I am hoping that I have just managed to muck up some configuration files or something and that the databases are still in fact intact. I have attached the server logs that I think will be useful. Any help in resolving this would be incredibly helpful - I am meant to be shipping a new release for my software this week and this has crippled me really. Thanks, Tom Clifton ChannelCall.log.txt plastic.server.log.txt audit.log.txt Link to comment Share on other sites More sharing options...
manu Posted April 4, 2016 Report Share Posted April 4, 2016 Hi! I can see the following errors: Exception: Packets larger than max_allowed_packet are not allowed. -> Increase the default max_allowed_packet to match something bigger than 4MB. Error: Unable to connect to any of the specified MySQL hosts Problem with the connection, verify the db.conf file and check if the MySQL server address is correctly resolved by your DNS. Try with an IP or if it's installed inside the same machine "localhost" or "127.0.0.1" will do it. The database repositories can't be created. Check the server log (plastic.server.log). Error: Access denied for user 'root'@'localhost' (using password: YES) -> Again connection errors, check if MySQL is having the remote connections mode enabled. Grant permissions for "root" to be used by an external connection. Also, are your old databases using a prefix or suffix? Reuse it in your current "db.conf" file, otherwise Plastic will try to create new databases. (will not override in any case your current ones). Did you change the connection string? Can you share it with us? It's inside the "db.conf" file. Link to comment Share on other sites More sharing options...
TJClifton Posted April 4, 2016 Author Report Share Posted April 4, 2016 Hi Manu, I was aware of the first point - in fact this was the original thing that I mucked up which affeected the mysql service. For the second point the server is set to 127.0.0.1 in the connection string in db.conf. Is that what you are asking me to do there? For the third point, how can I check that remote connections are enabled. I am not aware that my old databases were using a prefix or suffix although i suppose its possible they might be. Certainly the old settings when I changed from CE to MySQL last year did not make use of a suffix and I do not recall specifically doing so. The only change I made to the connection string was to modify the password. I modified the password for root and have now temporarily set it to password until I can get it up and running again. The full db.conf is as follows: <?xml version="1.0"?><DbConfig xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <ProviderName>mysql</ProviderName> <ConnectionString>Server=127.0.0.1;User Id=root;Password=password;Pooling=true</ConnectionString> <AdminConnectionString /> <DatabaseCreationCommands /> <DatabasePath /> <DatabasePrefix /> <DatabaseSuffix /> <DatabaseCollation /> <ColumnCollation /> <MaxCachedTrees>50</MaxCachedTrees> <LastUsedCsets /> <LastUsedCsetsLoad>-1</LastUsedCsetsLoad> <FullTreeRevisionsLoad>20000</FullTreeRevisionsLoad></DbConfig> Thanks Tom Link to comment Share on other sites More sharing options...
manu Posted April 4, 2016 Report Share Posted April 4, 2016 This may help regarding the access error: http://stackoverflow.com/questions/8380797/enable-remote-mysql-connection-error-1045-28000-access-denied-for-user Thank you for the db.conf, I can see errors inside it. Your connection string: <ConnectionString>Server=127.0.0.1;User Id=root;Password=password;Pooling=true</ConnectionString> is missing the database info, look mine: <ConnectionString>Server=localhost;User Id=root;Password=password;Database={0};Pooling=true</ConnectionString> Fix it and try the startup again. Link to comment Share on other sites More sharing options...
TJClifton Posted April 4, 2016 Author Report Share Posted April 4, 2016 Hi Manu, Thanks that was useful. Fixing the db.conf got rid of the no database message. I followed the link and have attempted to fix the access error. This has now also gone away but I am now receiving a message stating "The specified repository couldn't be found". Running 'cm lrep' I can now see 1 repository which is just the default repository. There should however be another 10 or so repositories. The audit log and channel call log don't seem to be showing anything suspicious now. The plastic.server log has the following new log: 2016-04-04 22:34:26,446 00000000-0000-0000-0000-000000000000 NT AUTHORITY\SYSTEM at TOM-SURFACE INFO Operations - Get repository info AI_TOOLKIT_STEERINGBEHAVIOURS_REP2016-04-04 22:34:26,446 00000000-0000-0000-0000-000000000000 NT AUTHORITY\SYSTEM at TOM-SURFACE ERROR Operations - OnError catching exception [The specified repository couldn't be found: AI_TOOLKIT_STEERINGBEHAVIOURS_REP.] - Plastic server version: 5.4.16.6982016-04-04 22:34:26,462 NT AUTHORITY\SYSTEM at ERROR ExceptionTracerSink - Dumping in-transit exception:The specified repository couldn't be found: AI_TOOLKIT_STEERINGBEHAVIOURS_REP.2016-04-04 22:34:26,463 NT AUTHORITY\SYSTEM at INFO ChannelCall - recb: 748|rect: 0|sentb: 1445|sendt: 0|prt: 16|th: 14|dest: 0|mt: 16|sert: 0|zip: 0| 127.0.0.1|GetRepositoryInfo Link to comment Share on other sites More sharing options...
manu Posted April 4, 2016 Report Share Posted April 4, 2016 Ok so now you have the server up and running but can't read the old databases. The default repository has been created and you can see it, I guess it's completely empty as is has been just created during the last startup. Access your MySQL databases and execute "show databases" please send me the output I would like to know if the old databases are using a prefix or a suffix. Link to comment Share on other sites More sharing options...
TJClifton Posted April 4, 2016 Author Report Share Posted April 4, 2016 Executing "show databases" return the following output: 00:06:29 show databases 5 row(s) returned 0.000 sec / 0.000 sec These rows are: # Database'information_schema''mysql''performance_schema''rep_1''repositories' Link to comment Share on other sites More sharing options...
manu Posted April 4, 2016 Report Share Posted April 4, 2016 Ok, so the Plastic SCM server and the MySQL connection is perfectly working. The issue now seems to be related with MySQL itself, it's knowing nothing about your old repositories/databases. Can you try to locate the databases and re-add the to MySQL? Once they are loaded by MySQL they should be visible by the Plastic SCM server too (restarting it). Link to comment Share on other sites More sharing options...
TJClifton Posted April 4, 2016 Author Report Share Posted April 4, 2016 Can you give me any pointers on where I might expect to find the databases? (I'm running on WIndows) Link to comment Share on other sites More sharing options...
TJClifton Posted April 4, 2016 Author Report Share Posted April 4, 2016 Ok so I think I found out how to readd the databases, can you please confirm that I have done the correct thing? I found around 26 repositories in C:\ProgramData\MySQL\MySQL Server 5.6\data. That is about the number of repositories I would expect to see (maybe a little higher). I then copied these directories to C:\Program Files\MySQL\MySQL Server 5.6\data, which is what a similar post on StackOverflow seemed to suggest. I then restarted the MySQl service and re-executed the "show databases" command. This time I received the following output: 00:35:06 show databases 31 row(s) returned 0.000 sec / 0.000 sec This seems a lot better. Plastic still can't find them though and cm lrep still just return the 1 repository. My plastic server log now looks like this: 2016-04-05 00:33:19,581 (null) NT AUTHORITY\SYSTEM at (null) ERROR Channel - Socket Exception caught in SocketServerChannel.WaitForConnections, stop channel's thread : System.Net.Sockets.SocketException A blocking operation was interrupted by a call to WSACancelBlockingCall. protocol plastic:// port 80872016-04-05 00:33:19,583 (null) NT AUTHORITY\SYSTEM at (null) ERROR Channel - Socket Exception caught in SocketServerChannel.WaitForConnections, stop channel's thread : System.Net.Sockets.SocketException A blocking operation was interrupted by a call to WSACancelBlockingCall. protocol ssl:// port 80882016-04-05 00:33:19,613 (null) NT AUTHORITY\SYSTEM at (null) WARN AutodiscoveryServer - Could not setup the discovery server: A blocking operation was interrupted by a call to WSACancelBlockingCall2016-04-05 00:34:34,971 (null) NT AUTHORITY\SYSTEM at (null) INFO Channel - 'sinklevel' compression mode set. all metadata will be serialized2016-04-05 00:34:35,018 (null) NT AUTHORITY\SYSTEM at (null) INFO Channel - 'BufferPoolMax' is set to '10'. It sets the maximum number of available buffers for object data transfers2016-04-05 00:34:35,018 (null) NT AUTHORITY\SYSTEM at (null) INFO Channel - 'SerializationObjectsAtSink' is set to 'True'. True means SerializationBase descendants are directly written into the response buffer2016-04-05 00:34:35,034 (null) NT AUTHORITY\SYSTEM at (null) INFO Channel - Start listening on protocol plastic:// port 80872016-04-05 00:34:35,034 (null) NT AUTHORITY\SYSTEM at (null) INFO Channel - 'sinklevel' compression mode set. all metadata will be serialized2016-04-05 00:34:35,034 (null) NT AUTHORITY\SYSTEM at (null) INFO Channel - 'BufferPoolMax' is set to '10'. It sets the maximum number of available buffers for object data transfers2016-04-05 00:34:35,034 (null) NT AUTHORITY\SYSTEM at (null) INFO Channel - 'SerializationObjectsAtSink' is set to 'True'. True means SerializationBase descendants are directly written into the response buffer2016-04-05 00:34:35,049 (null) NT AUTHORITY\SYSTEM at (null) INFO Channel - Using certificate file ssl-certificate.pfx2016-04-05 00:34:35,087 (null) NT AUTHORITY\SYSTEM at (null) INFO Channel - Start listening on protocol ssl:// port 80882016-04-05 00:34:35,087 (null) NT AUTHORITY\SYSTEM at (null) WARN Tube - No license for Tube, won't initialize.2016-04-05 00:34:35,203 (null) NT AUTHORITY\SYSTEM at (null) INFO Transaction - Transaction timeout -> 120000ms2016-04-05 00:34:37,661 00000000-0000-0000-0000-000000000000 NT AUTHORITY\SYSTEM at TOM-SURFACE INFO Operations - Retrieving server license data2016-04-05 00:34:37,710 NT AUTHORITY\SYSTEM at INFO ChannelCall - recb: 486|rect: 16|sentb: 455|sendt: 16|prt: 63|th: 14|dest: 0|mt: 15|sert: 16|zip: 0| 127.0.0.1|GetLicenseData2016-04-05 00:34:42,426 00000000-0000-0000-0000-000000000000 NT AUTHORITY\SYSTEM at TOM-SURFACE INFO Operations - Get repository info AI_TOOLKIT_STEERINGBEHAVIOURS_REP2016-04-05 00:34:42,447 00000000-0000-0000-0000-000000000000 NT AUTHORITY\SYSTEM at TOM-SURFACE ERROR Operations - OnError catching exception [The specified repository couldn't be found: AI_TOOLKIT_STEERINGBEHAVIOURS_REP.] - Plastic server version: 5.4.16.6982016-04-05 00:34:42,447 NT AUTHORITY\SYSTEM at ERROR ExceptionTracerSink - Dumping in-transit exception:The specified repository couldn't be found: AI_TOOLKIT_STEERINGBEHAVIOURS_REP.2016-04-05 00:34:42,447 NT AUTHORITY\SYSTEM at INFO ChannelCall - recb: 748|rect: 0|sentb: 1445|sendt: 0|prt: 16|th: 14|dest: 0|mt: 16|sert: 0|zip: 0| 127.0.0.1|GetRepositoryInfo2016-04-05 00:34:46,777 00000000-0000-0000-0000-000000000000 NT AUTHORITY\SYSTEM at TOM-SURFACE INFO Operations - Get repository info AI_TOOLKIT_STEERINGBEHAVIOURS_REP2016-04-05 00:34:46,777 00000000-0000-0000-0000-000000000000 NT AUTHORITY\SYSTEM at TOM-SURFACE ERROR Operations - OnError catching exception [The specified repository couldn't be found: AI_TOOLKIT_STEERINGBEHAVIOURS_REP.] - Plastic server version: 5.4.16.6982016-04-05 00:34:46,777 NT AUTHORITY\SYSTEM at ERROR ExceptionTracerSink - Dumping in-transit exception:The specified repository couldn't be found: AI_TOOLKIT_STEERINGBEHAVIOURS_REP.2016-04-05 00:34:46,793 NT AUTHORITY\SYSTEM at INFO ChannelCall - recb: 748|rect: 0|sentb: 1445|sendt: 0|prt: 16|th: 14|dest: 0|mt: 16|sert: 0|zip: 0| 127.0.0.1|GetRepositoryInfo2016-04-05 00:34:50,753 (null) NT AUTHORITY\SYSTEM at (null) INFO Channel - Connection 0 from 127.0.0.1 closed Link to comment Share on other sites More sharing options...
manu Posted April 4, 2016 Report Share Posted April 4, 2016 I need to see the "show databases" output. Plastic right now is just able to see the default repo. Notice there's a special database called "repositories" that is an index to the rest of databases/repositories, you will need to remove the current "default" and "repositories" databases and apply the old ones. If that's not possible you can always use the "cm addrep" in order to read one by one the old repositories. Link to comment Share on other sites More sharing options...
TJClifton Posted April 5, 2016 Author Report Share Posted April 5, 2016 Hi Manu, I attempted to copy over the repositories database but that resulted in 'cm lrep' displaying no repositories in the server followed by the MySQL server immediately shutting down. Running "show databases" gives: 18:48:09 show databases 31 row(s) returned 0.000 sec / 0.000 sec 'information_schema''mysql''performance_schema''rep_1''rep_10''rep_11''rep_12''rep_13''rep_14''rep_15''rep_16''rep_17''rep_18''rep_19''rep_2''rep_20''rep_21''rep_22''rep_23''rep_24''rep_25''rep_26''rep_27''rep_28''rep_4''rep_5''rep_6''rep_7''rep_8''rep_9''repositories' Link to comment Share on other sites More sharing options...
manu Posted April 5, 2016 Report Share Posted April 5, 2016 Ok, it seems you are not using any prefix or suffix. You can try to restore the "repositories" database content, as I said this is an index to the rest of repositories. If you are not able to accomplish that you can give a try to the "cm addrep" command in order to, one by one, re-add the missing repos. Link to comment Share on other sites More sharing options...
TJClifton Posted April 6, 2016 Author Report Share Posted April 6, 2016 I tried to restore the repositories database before but it didn't even display a default database after that. I am happy to add the repos one by one. The 'cm addrep' command required the repo name though and I don't have anyway of retrieving that at the moment - all the repos are named rep_x. Is it the repositories database that contains the mapping from these names to the plastic repo names? Can I query that databse with MySQL to find out which repos are which? Link to comment Share on other sites More sharing options...
manu Posted April 6, 2016 Report Share Posted April 6, 2016 Yes, you can query the old repositories database. This will give you the name and the id. select sname, iobjid from repository.repositories; Link to comment Share on other sites More sharing options...
TJClifton Posted April 6, 2016 Author Report Share Posted April 6, 2016 Hi Manu, So I've finally got everything back up When I attempted to run the command you suggested, MySQL threw up errors about the tables not existing. I came across a similar post on StackOverflow which said that as well as the repositories directory I also needed to copy over the various ib* files. Once I did that the query showed me the repositories I was expecting. After that I ran 'cm lrep' and it showed all the repos again. Running the GUI client also resulted in no errors. Thanks so much for the patient support. I know first hand what a pain it can be to debug this sort of stuff remotely! Cheers Tom Link to comment Share on other sites More sharing options...
manu Posted April 6, 2016 Report Share Posted April 6, 2016 Great Tom! Thanks for coming back with the resolution Very happy to know it's working back, and you are very welcome. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.