Can't start teamcity server due to Unexpected excetion SQLException/HsqlException - teamcity

I can't start my Teamcity server on my local machine. It is giving Teamcity server startup error.
The error is : Unexpected exception SQLException/HsqlException: SQL error when doing: Taking a connection from the data source
SQL exception: error in script file line: C:\ProgramData\JetBrains\TeamCity\system\buildserver 45
Anyone have any idea?
Thank you in advance.

Most probably the error means that HSQL DB is corrupted. The solution is to restore from backup.

Related

Logstash - Error during the load of keystore loading

I'm trying to run logstash with elasticsearch and i got an error when i launch logstash, this error happen after the start of logtash, the creation of all the full, partial and after all the SQL operation. It seem's to ba a connection error but i'm not sure.
[Error]
Error during the load of keystore loading
It's weird that it's happening at the very end of the process
Thank you for your help.

Oracle Sql developer throwing error message : Internal Error: Fetch error message failed! Vendor code 17001

I have recently moved from TCP to TCPS Connection. I can confirm that all my connection parameters are right and properly set. tnsnames.ora and sqlnet.ora is under oracle_home/network/admin folder.
I am trying to connect and getting below error message:
An error was encountered performing the requested operation:
Internal Error: Fetch error message failed!
Vendor code 17001
Looking for suggestions to fix issue.
Make sure that the Oracle Client "bin" directory (e.g. $ORACLE_HOME/bin) is in your PATH environment variable.

SQL Exception when starting TeamCity

I am having the followng error while starting TeamCity:
INFO - jetbrains.buildServer.STARTUP - Using database connection URL from the database properties file. The URL is: jdbc:hsqldb:file:$TEAMCITY_SYSTEM_PATH/buildserver
INFO - jetbrains.buildServer.STARTUP - Using internal (HSQL) database
INFO - jetbrains.buildServer.STARTUP - Current stage: Connecting to the database
ERROR - jetbrains.buildServer.STARTUP - Unexpected exception SQLException/HsqlException: SQL error when doing: Taking a connection from the data source
SQL exception: error in script file line: C:\ProgramData\JetBrains\TeamCity\system\buildserver 278
INFO - jetbrains.buildServer.STARTUP - Current stage: TeamCity server startup error
Line 278 looks like this:
SET TABLE PUBLIC.PROBLEM INDEX '13402 13202 0 0 158'
Could you please help me? What could be the problem?
Got instructions like this:
https://confluence.jetbrains.com/display/TCD10/Common+Problems#CommonProblems-Database-relatedissues
What is more, here is a related question:
https://teamcity-support.jetbrains.com/hc/en-us/community/posts/206158469-SQL-error-when-doing-Taking-a-connection-from-the-data-source
It looks like database got corrupted. If you have backup, you need to restore from it. If not, you can only remove database and start without data, but configuration files will be preserved. For this you need to stop server and move files matching wildcard buildserver.* from /system/ directory to some other place and start server again.
In addition to Jonatan's answer, I determined my data directory by opening the log located at <Teamcity Home>/logs/teamcity-server.log and searched for "data directory". In my case, it was C:\ProgramData\JetBrains\TeamCity\system.
After I moved all the buildserver.* files (in my case, it was buildserver.data, buildserver.log, buildserver.properties), I opened the Teamcity UI in a browser and was prompted to enter the super user token. I determined the token by checking the end of the log at <Teamcity Home>/logs/teamcity-server.log. After entering the token into the Teamcity UI, there was a confirmation to create a new database.
If you get this error in 2022 like I did, check if Sql Browser Service is running. Turns out it needs to be running for Teamcity to start up.

Visual Studio 2013 Test Explorer - Discover Tests Failed to initialize data storage for staging test results

I constantly get the following error when opening the test explorer in VS2013:
Failed to initialize data storage for staging test results as it threw the following exception:
'A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 50 - Local Database Runtime error occurred. Error occurred during LocalDB instance startup: SQL Server process failed to start.
In the EventViewer I see the following entry:
Source: SQLLocalDB 12.0
Message: Windows API call WaitForMultipleObjects returned error code: 575. Windows system error message is: {Application Error}
The application was unable to start correctly (0x%lx). Click OK to close the application.
Reported at line: 3728.
Does anybody have the same problem and know how to get rid of this error?
Best regards
Yannik
Finally, I found a solution that worked in my case.
Delete the instance folder of local db called "v11.0" (C:\Users\theUser\AppData\Local\Microsoft\Microsoft SQL Server Local DB\Instances\v11.0)
Start cmd window and execute the following command: sqllocaldb create "v11.0"
After this, the problems within the test explorer were solved.
Yannik had the solution....local DB (v17) is now called MSSQLLocalDB.
Delete "MSSQLLocalDB"
(C:\Users\theUser\AppData\Local\Microsoft\Microsoft SQL Server Local DB\Instances\MSSQLLocalDB)
Create a new one.
sqllocaldb create "MSSQLLocalDB"

Derby connection error: ERROR XBM0H: Directory /usr/opt/derby/db-derby-10.12.1.1-bin/bin/MyDbTest cannot be created

I am trying to setup Derby on my Mac following these instructions... Tutorial
When I try to run connect 'jdbc:derby:MyDbTest;create=true'; in ij I get the following error
ERROR XJ041: Failed to create database 'MyDbTest', see the next exception for details.
ERROR XBM0H: Directory /usr/opt/derby/db-derby-10.12.1.1-bin/bin/MyDbTest cannot be created.
I have tried googling this error a bit now with no success...
I also get a thread "main" java.lang.NoClassDefFoundError: org/apache/derby/tools/ij when trying to run as super user.
This should be a Permissions issue, try running all these commands throught a directory you have full permissions to such as ~/Documents/Derby.

Resources