Sonar Installation problem - sonarqube

Information about Installation
Using embedded database Derbis
Problem :
I run bin/windows-x86-32/StartSonar.bat and then click http://localhost:9000
On clicking this, I get the following error:
We're sorry, but something went wrong.
Please try back in a few minutes and contact support if the problem persists.
<%= link_to "Go back to the homepage", home_path %>
Do you know what to do with that error message.

I usually get that message when the database isn't correctly set (either the local has an issue, in which case I try a fresh installation).
Or the mysql database you can associate has an issue (wrong 'sonar.jdbc.username' or 'sonar.jdbc.password' in sonar.properties file.).
Or the default port for the embedded database (jdbc:derby://localhost:1527/sonar;create=true) isn't available on your server/workstation.
If you are using a Mysql database (not your case), you need to create it first:
mysql [localhost] {root} ((none)) > CREATE DATABASE IF NOT EXISTS sonar CHARACTER SET utf8 COLLATE utf8_general_ci;
Query OK, 1 row affected (0.01 sec)
mysql [localhost] {root} ((none)) > grant all privileges on sonar.* to 'sonar'#'localhost' identified by 'sonar';
Query OK, 0 rows affected (0.00 sec)
mysql [localhost] {root} ((none)) > flush privileges;
Query OK, 0 rows affected (0.00 sec)

http://localhost:9000/setup will initialize the database and correct this error

Check the sonar log file for finding the issue you are facing. find out the error form the log file and try to solve it.
cheers..!

My OS is Mac.
If the version of sonar is 6.x, please try to run the follow steps:
Check the log: /Users/test/Downloads/sonarqube-6.0/logs/sonar.log
Whether it have the ERROR: “zh-CN” is not a valid locale or “en” is not a valid locale
Please run the command: gem uninstall -i /Users/test/.rvm/gems/ruby-2.3.0 i18n
The version of Ruby is your default ruby.

Related

Connecting a db2 database from a centos hosted laravel application

I'm trying to connect to a db2 database server (iseries ibm) from my laravel application (5.8). The application is running on a centos linux server.
I saw that db2 isn't in the 4 databases types listed here : https://laravel.com/docs/5.8/database#introduction.
So I tried to use that package https://github.com/cooperl22/laravel-db2 but I got the followings errors :
Undefined class constant 'I5_ATTR_DBC_SYS_NAMING'
And I've got the errors for 5 constants :
PDO::I5_ATTR_DBC_SYS_NAMING, PDO::I5_ATTR_COMMIT, PDO::I5_ATTR_JOB_SORT, PDO::I5_ATTR_DBC_LIBL, PDO::I5_ATTR_DBC_CURLIB.
Also, if I comment theses constants, I got this error :
`Syntax error: -104 [IBM][CLI Driver][AS] SQL0104N An unexpected token "<END-OF-STATEMENT>" was found following "". Expected tokens may include: "( + - ? : DAY INF NAN RID ROW RRN". SQLSTATE=42601 (SQLNumResultCols[-104] at /root/PDO_IBM-1.3.6/ibm_driver.c:153) (SQL: select * from )`
I'm using the db2_ibmi_ibm driver.
Here is my php info linked to the driver :
EDITED :
php version is 7.3.4
centos version is 7
Also I made a from scratch php script running and I can get the results from a query using the db2_connection method. So I'm pretty sure it's PDO related :-/
Ok I found the issue, my scheme and database were wrong, so the query wasn't correct.
The PDO constants are not needed in my case.
Thanks for your answers

Hive Browser Throwing Error

I am trying to put some basic query in hive editor in hue browser , but it is returning the following error whereas my Hivecli works fine and able to execute queries. Could someone help me?
Fetching results ran into the following error(s):
Bad status for request TFetchResultsReq(fetchType=1,
operationHandle=TOperationHandle(hasResultSet=True,
modifiedRowCount=None, operationType=0,
operationId=THandleIdentifier(secret='r\t\x80\xac\x1a\xa0K\xf8\xa4\xa0\x85?\x03!\x88\xa9',
guid='\x852\x0c\x87b\x7fJ\xe2\x9f\xee\x00\xc9\xeeo\x06\xbc')),
orientation=4, maxRows=-1):
TFetchResultsResp(status=TStatus(errorCode=0, errorMessage="Couldn't
find log associated with operation handle: OperationHandle
[opType=EXECUTE_STATEMENT,
getHandleIdentifier()=85320c87-627f-4ae2-9fee-00c9ee6f06bc]",
sqlState=None,
infoMessages=["*org.apache.hive.service.cli.HiveSQLException:Couldn't
find log associated with operation handle: OperationHandle
[opType=EXECUTE_STATEMENT,
getHandleIdentifier()=85320c87-627f-4ae2-9fee-00c9ee6f06bc]:24:23",
'org.apache.hive.service.cli.operation.OperationManager:getOperationLogRowSet:OperationManager.java:229',
'org.apache.hive.service.cli.session.HiveSessionImpl:fetchResults:HiveSessionImpl.java:687',
'sun.reflect.GeneratedMethodAccessor14:invoke::-1',
'sun.reflect.DelegatingMethodAccessorImpl:invoke:DelegatingMethodAccessorImpl.java:43',
'java.lang.reflect.Method:invoke:Method.java:606',
'org.apache.hive.service.cli.session.HiveSessionProxy:invoke:HiveSessionProxy.java:78',
'org.apache.hive.service.cli.session.HiveSessionProxy:access$000:HiveSessionProxy.java:36',
'org.apache.hive.service.cli.session.HiveSessionProxy$1:run:HiveSessionProxy.java:63',
'java.security.AccessController:doPrivileged:AccessController.java:-2',
'javax.security.auth.Subject:doAs:Subject.java:415',
'org.apache.hadoop.security.UserGroupInformation:doAs:UserGroupInformation.java:1657',
'org.apache.hive.service.cli.session.HiveSessionProxy:invoke:HiveSessionProxy.java:59',
'com.sun.proxy.$Proxy19:fetchResults::-1',
'org.apache.hive.service.cli.CLIService:fetchResults:CLIService.java:454',
'org.apache.hive.service.cli.thrift.ThriftCLIService:FetchResults:ThriftCLIService.java:672',
'org.apache.hive.service.cli.thrift.TCLIService$Processor$FetchResults:getResult:TCLIService.java:1553',
'org.apache.hive.service.cli.thrift.TCLIService$Processor$FetchResults:getResult:TCLIService.java:1538',
'org.apache.thrift.ProcessFunction:process:ProcessFunction.java:39',
'org.apache.thrift.TBaseProcessor:process:TBaseProcessor.java:39',
'org.apache.hive.service.auth.TSetIpAddressProcessor:process:TSetIpAddressProcessor.java:56',
'org.apache.thrift.server.TThreadPoolServer$WorkerProcess:run:TThreadPoolServer.java:285',
'java.util.concurrent.ThreadPoolExecutor:runWorker:ThreadPoolExecutor.java:1145',
'java.util.concurrent.ThreadPoolExecutor$Worker:run:ThreadPoolExecutor.java:615',
'java.lang.Thread:run:Thread.java:745'], statusCode=3), results=None,
hasMoreRows=None)
This error could be either due to HiveServer2 not running or Hue does not have access to hive_conf_dir.
Check whether the HiveServer2 has been started and is running. It uses the port 10000 by default.
netstat -ntpl | grep 10000
If it is not running, start the HiveServer2
$HIVE_HOME/bin/hiveserver2
Also check the Hue configuration file hue.ini. The hive_conf_dir property must be set under [beeswax] section. If not set, add this property under [beeswax]
hive_conf_dir=$HIVE_HOME/conf
Restart supervisor after making these changes.

Fail to execute database migration: org.sonar.server.db.migrations.v44.ConvertProfileMeasuresMigration

RESOLVED: flushed sonar table.
When i go to http://localhost:9000/setup , after pressing "update" button , i get this error:
2014.08.06 04:08:03 ERROR [o.s.s.ui.JRubyFacade] Fail to upgrade database
An error has occurred, all later migrations canceled:
Fail to execute database migration: org.sonar.server.db.migrations.v44.ConvertProfileMeasuresMigration
Any suggestion please ?
Server: Centos 7
DB: Mysql
Mihai
You're facing the following issue: SONAR-5515. It will be fixed in the next version of SonarQube 4.5.
Meanwhile, you can run the SQL script given in the last comment of this ticket to fix your issue.

Hibernate seems not to resolve alias correctly

since some days I'm facing the following problem:
I am using Hibernate to do the following Restriction on a criteria:
...
criteria.add(Restrictions.sqlRestriction("1=1 CONNECT BY PRIOR {ProcessEntityworkflowProject}.ID = {ProcessEntityworkflowProject}.PARENT_ID"))
Where "ProcessEntityworkflowProject" is the alias which should be resolved by hibernate.
This alias is set in code properly. I also debugged the code and inspected criteria:
There I could see that a subcriteria in subcriterialist of criteria has this correct alias bound to the association path.
But in SQL logs I see that it is not resolved:
... and this_.EXTERNAL_KEY is not null and 1=1 CONNECT BY PRIOR {ProcessEntityworkflowProject}.ID = {ProcessEntityworkflowProject}.PARENT_ID and processent4_.TYPE_ID=? ...
... or is this output correct and it is resolved later internally?
And in tomcat.log I see that there is a NPE:
java.lang.NullPointerException
at oracle.jdbc.driver.T4C8Oall.getNumRows(T4C8Oall.java:876)
at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:831)
at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1039)
at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:850)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1134)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3339)
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3384)
at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:92)
at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:139)
at org.hibernate.loader.Loader.getResultSet(Loader.java:1669)
at org.hibernate.loader.Loader.doQuery(Loader.java:662)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
at org.hibernate.loader.Loader.doList(Loader.java:2145)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2029)
at org.hibernate.loader.Loader.list(Loader.java:2024)
at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:94)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1533)
at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:295)
I already found out that this NPE is cause because Oracle JDBC driver can not parse the brackets "{" "}". So I guess that the alias was not resolved properly.
Does anyone of you have an idea what could be wrong or how I could investigate deeper?
Some additional info:
I am using Hibernate 3.2.0 (CR1 afaik), tomcat 5.5, ojdbc14.jar.
Running on RHEL 6.4 and Oracle 11g
Many thx in advance if some of you have an idea ;)
Cheers
Sascha

Adding data source for jidea 11.0.2

i'm trying to connect to a oracle 10g database from inside jidea,i'm using ojdbc6-11.2.0.1.0.jar as the jdbc driver. attached is the error message i'm getting when
i'm trying to connect! can any one help me to solve this issue??
Connection to oracle - albi1dv1 failed
java.sql.SQLException: ORA-00604: error occurred at recursive SQL level 1
ORA-01882: timezone region not found
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:439)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:388)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:381)
at oracle.jdbc.driver.T4CTTIfun.processError(T4CTTIfun.java:564)
at oracle.jdbc.driver.T4CTTIoauthenticate.processError(T4CTTIoauthenticate.java:431)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:436)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:186)
at oracle.jdbc.driver.T4CTTIoauthenticate.doOAUTH(T4CTTIoauthenticate.java:366)
at oracle.jdbc.driver.T4CTTIoauthenticate.doOAUTH(T4CTTIoauthenticate.java:752)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:359)
at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:531)
at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:221)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:503)
Regards,
Rangana
i have used the jdbc driver named ojdbc14_noneXe.jar, it solved my problem. :)
FYI - i'm connecting to a remote oracle development database, not an local installation on my mechine!
You can set the timezone to IDEA. This will prevent this error.
Add the next line to file idea.vmoptions :
-Duser.timezone=your_database_timezone
Here's some explanation on how to get your database timezone
in eclipse go run - > run configuration
in there go to JRE tab in right side panels
in VM Arguments section paste this
-Duser.timezone=GMT
then Apply - > Run

Resources