SQL Exception when starting TeamCity - 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.

Related

Oracle 19c - I'm getting [INS-35180] Unable to check for available memory error

I'm getting [INS-35180] Unable to check for available memory error while installing Oracle 19c in my laptop. I have tried to run DBCA as admin but still facing the same issue.
Error: [INS-35180] Unable to check for available memory.
Details: Additional Information:
Exception details  - PRVG-1901 : failed to setup CVU remote execution framework directory "C:\Users\u720770\AppData\Local\Temp\InstallActions2023-02-08_06-14-10PM\CVU_19.0.0.0.0_u720770" on nodes "blrl52gm6g3"
Please select a different work area for the framework
blrl52gm6g3 : PRKN-1014 : Failed to execute remote command "C:\Users\u720770\AppData\Local\Temp\InstallActions2023-02-08_06-14-10PM\CVU_19.0.0.0.0_u720770\exectask.exe" on node "BLRL52GM6G3".Failed during connecting to service
blrl52gm6g3 : Failed during connecting to service
Version of exectask could not be retrieved from node "blrl52gm6g3"
I did below steps.
Downloaded Oracle 19c from Oracle site.
Extracted the zip file and copied it to C: drive.
Renamed the folder to 'db_home'
Ran setup file as administrator.
Please let me know how to resolve this issue to be able to install Oracle 19c.
Hello Can you check this path really exists and permissions on exectask.exe allow you to execute ?
C:\Users\u720770\AppData\Local\Temp\InstallActions2023-02-08_06-14-10PM\CVU_19.0.0.0.0_u720770\exectask.exe
or maybe it could be this bug
Bug 28747089 - DBCA Errors Out During Verification-- Unable to check for available memory (Doc ID 28747089.8) To BottomTo Bottom
or this
After applying Microsoft KB, DBCA Fails With [DBT-50000] Unable To Check For Available Memory (Doc ID 2807229.1)
SOLUTION
Make a note of the directory from which the OracleRemoteExecService is running; usually it is %temp% or c:\windows\temp. This information is available in the Service Control Manager.
Delete the OracleRemExecService.
Clean all the files under the directory from which OracleRemoteExecService was running, i.e. %temp% or c:\windows\temp.
It looks like I dont have enough admin privileges. I was able to install successfully after obtaining admin privileges.

Error during installation of Jasper Reportt Server

I'm trying to install Jasper Report Server but I keep getting always the same error: during the post-install actions I get the following
Problem running post-install step. Installation may not complete correctly
Error running C:\Jaspersoft\jasperreports-server-cp-8.0.0/buildomatic/js-ant.bat
load-sugarcrm-db:[create-ks] Failed to create the keystore C:\Users\Paolo\.jrsks
BUILD FAILED
C:\Jaspersoft\jasperreports-server-cp-8.0.0\buildomatic\build.xml:377: The
following error occurred while executing this line:
C:\Jaspersoft\jasperreports-server-cp-8.0.0\buildomatic\bin\setup.xml:377:
Keystore may have been tampered with.
Total time: 1 second
I'm using the default installation and windows 11. I also tried running it in compatibility mode for Windows 7 but nothing changed. Can someone help me?
My problem was that js-install.sh created the keystore and placed it in a user directory, where it then couldn't access it again.
You could check the access rights for the folder the keystore is placed, and check if your user has the right ones.

Oracle 11g Enterprise Manager Login Fail Internal Error has Occured

I have installed Oracle 11g on my Windows 10 machine. I followed all preinstallation requirements.
When trying to log in to the Enterprise manager via this link:
https://localhost:1158/em
I get the error:
Internal Error has occurred. Check the log file for details.
I have found log files and it looks like this is the relevant entry:
2017-09-17 07:36:53,631 [MetricCollector:HOMETAB_THREAD600:60] ERROR rt.DbMetricCollectorTarget _getAllData.344 - java.lang.NullPointerException
java.lang.NullPointerException
at oracle.sysman.emSDK.emd.comm.EMDClient.getURL(EMDClient.java:1570)
at oracle.sysman.emSDK.emd.comm.EMDClient.getConnection(EMDClient.java:1266)
at oracle.sysman.emSDK.emd.comm.EMDClient.getConnection(EMDClient.java:1242)
at oracle.sysman.emSDK.emd.comm.EMDClient.getResponseForRequest(EMDClient.java:1689)
at oracle.sysman.emSDK.emd.comm.EMDClient.getMetrics(EMDClient.java:981)
at oracle.sysman.emo.perf.metric.rt.DbHomeTab._getAllData(DbHomeTab.java:340)
at oracle.sysman.emo.perf.metric.rt.DbHomeTab.getData(DbHomeTab.java:154)
at oracle.sysman.emo.perf.metric.eng.MetricCached.collectCachedData(MetricCached.java:416)
at oracle.sysman.emo.perf.metric.eng.MetricCollectorThread._collectCachedData(MetricCollectorThread.java:605)
at oracle.sysman.emo.perf.metric.eng.MetricCollectorThread.run(MetricCollectorThread.java:325)
at java.lang.Thread.run(Thread.java:595)
I have tried to set the unique name in environment variables, I thought maybe Java was the problem so I updated my JDK to 8. I am still getting the same error, and my SQL Plus will not open, as soon as I put in the correct credentials it closes. Also I have configured a Listener and tested, test was successful.
I managed to fix the issue, turns out it was a time zone issue. The DB time zone and computer time zone were different. Thus the DB Console would not start and was giving the error "EM daemon is not running".
I fixed it by following instructions here.
Also note before I did that I completely uninstalled Oracle and reinstalled it. There were some issues on that install that were causing SQL not to run. But the above is what fixed the Internal Error I was getting.
Make sure the SYSMAN database user is not locked.
select username, account_status from dba_users where username = 'SYSMAN';
If the account status is not OPEN then
alter user SYSMAN account unlock;
Try restarting dbconsole
$ emctl stop dbconsole
$ emctl start dbconsole

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

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.

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"

Resources