I'm new to WSO2, and I'm trying to configure a single node WSO2 API Manager with Analytics using mysql as the RDBMS on my local machine (ubuntu).
I've successfully configured the API Manager to use mysql as the RDBMS using the official documentation page here, however I can't configure the Analytics to use mysql as the RDBMS.
I've followed the official documentation related to Configuring APIM Analytics, downloaded the Connector/J 8.0.23 from MySQL official website and copied it to the lib directory, and here's my db-related configuration on <APIM_ANALYTICS_HOME>/conf/worker/deployment.yaml file:
name: APIM_ANALYTICS_DB
description: "The datasource used for APIM statistics aggregated data."
jndiConfig:
name: jdbc/APIM_ANALYTICS_DB
definition:
type: RDBMS
configuration:
jdbcUrl: 'jdbc:mysql://localhost:3306/analytics_db?useSSL=false'
username: behzad
password: myStronPassword!
driverClassName: com.mysql.cj.jdbc.Driver
maxPoolSize: 50
idleTimeout: 60000
connectionTestQuery: SELECT 1
validationTimeout: 30000
isAutoCommit: false
I get this error:
Cannot connect to JDBC URL jdbc:mysql://localhost:3306/analytics_db?useSSL=false. Failed due to Failed to initialize pool: Unknown database 'analytics_db'
Here's the full log:
JAVA_HOME environment variable is set to /usr/lib/jvm/java-1.11.0-openjdk-amd64
CARBON_HOME environment variable is set to /home/behzad/0/projects/wso2/wso2am-analytics-3.2.0
RUNTIME_HOME environment variable is set to /home/behzad/0/projects/wso2/wso2am-analytics-3.2.0/wso2/worker
[2021-02-21 16:05:04,879] INFO {org.wso2.carbon.launcher.extensions.OSGiLibBundleDeployerUtils updateOSGiLib} - Successfully updated the OSGi bundle information of Carbon Runtime: worker
osgi> [2021-02-21 16:05:07,208] INFO {org.wso2.msf4j.internal.websocket.WebSocketServerSC} - All required capabilities are available of WebSocket service component is available.
[2021-02-21 16:05:07,216] INFO {org.wso2.carbon.metrics.core.config.model.JmxReporterConfig} - Creating JMX reporter for Metrics with domain 'org.wso2.carbon.metrics'
[2021-02-21 16:05:07,235] INFO {org.wso2.msf4j.analytics.metrics.MetricsComponent} - Metrics Component is activated
[2021-02-21 16:05:07,241] INFO {org.wso2.carbon.databridge.agent.internal.DataAgentDS} - Successfully deployed Agent Server
[2021-02-21 16:05:07,902] ERROR {com.zaxxer.hikari.pool.HikariPool} - HikariPool-4 - Exception during pool initialization. java.sql.SQLSyntaxErrorException: Unknown database 'analytics_db'
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120)
at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:833)
at com.mysql.cj.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:453)
at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:246)
at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:198)
at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:138)
at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:353)
at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:201)
at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:473)
at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:562)
at com.zaxxer.hikari.pool.HikariPool.<init>(HikariPool.java:115)
at com.zaxxer.hikari.HikariDataSource.<init>(HikariDataSource.java:81)
at org.wso2.carbon.datasource.rdbms.hikari.HikariRDBMSDataSource.getDataSource(HikariRDBMSDataSource.java:61)
at org.wso2.carbon.datasource.rdbms.hikari.HikariDataSourceReader.createDataSource(HikariDataSourceReader.java:74)
at org.wso2.carbon.datasource.core.DataSourceBuilder.buildDataSourceObject(DataSourceBuilder.java:79)
at org.wso2.carbon.datasource.core.DataSourceBuilder.buildDataSourceObject(DataSourceBuilder.java:60)
at org.wso2.carbon.datasource.core.DataSourceBuilder.buildCarbonDataSource(DataSourceBuilder.java:44)
at org.wso2.carbon.datasource.core.DataSourceManager.initDataSources(DataSourceManager.java:163)
at org.wso2.carbon.datasource.core.internal.DataSourceListenerComponent.onAllRequiredCapabilitiesAvailable(DataSourceListenerComponent.java:125)
at org.wso2.carbon.kernel.internal.startupresolver.StartupComponentManager.lambda$notifySatisfiableComponents$7(StartupComponentManager.java:266)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
at org.wso2.carbon.kernel.internal.startupresolver.StartupComponentManager.notifySatisfiableComponents(StartupComponentManager.java:252)
at org.wso2.carbon.kernel.internal.startupresolver.StartupOrderResolver$1.run(StartupOrderResolver.java:204)
at java.base/java.util.TimerThread.mainLoop(Timer.java:556)
at java.base/java.util.TimerThread.run(Timer.java:506)
[2021-02-21 16:05:07,903] ERROR {org.wso2.carbon.datasource.rdbms.hikari.HikariRDBMSDataSource} - Cannot connect to JDBC URL jdbc:mysql://localhost:3306/analytics_db?useSSL=false. Failed due to Failed to initialize pool: Unknown database 'analytics_db'retrying in 5 seconds com.zaxxer.hikari.pool.HikariPool$PoolInitializationException: Failed to initialize pool: Unknown database 'analytics_db'
at com.zaxxer.hikari.pool.HikariPool.throwPoolInitializationException(HikariPool.java:597)
at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:576)
at com.zaxxer.hikari.pool.HikariPool.<init>(HikariPool.java:115)
at com.zaxxer.hikari.HikariDataSource.<init>(HikariDataSource.java:81)
at org.wso2.carbon.datasource.rdbms.hikari.HikariRDBMSDataSource.getDataSource(HikariRDBMSDataSource.java:61)
at org.wso2.carbon.datasource.rdbms.hikari.HikariDataSourceReader.createDataSource(HikariDataSourceReader.java:74)
at org.wso2.carbon.datasource.core.DataSourceBuilder.buildDataSourceObject(DataSourceBuilder.java:79)
at org.wso2.carbon.datasource.core.DataSourceBuilder.buildDataSourceObject(DataSourceBuilder.java:60)
at org.wso2.carbon.datasource.core.DataSourceBuilder.buildCarbonDataSource(DataSourceBuilder.java:44)
at org.wso2.carbon.datasource.core.DataSourceManager.initDataSources(DataSourceManager.java:163)
at org.wso2.carbon.datasource.core.internal.DataSourceListenerComponent.onAllRequiredCapabilitiesAvailable(DataSourceListenerComponent.java:125)
at org.wso2.carbon.kernel.internal.startupresolver.StartupComponentManager.lambda$notifySatisfiableComponents$7(StartupComponentManager.java:266)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
at org.wso2.carbon.kernel.internal.startupresolver.StartupComponentManager.notifySatisfiableComponents(StartupComponentManager.java:252)
at org.wso2.carbon.kernel.internal.startupresolver.StartupOrderResolver$1.run(StartupOrderResolver.java:204)
at java.base/java.util.TimerThread.mainLoop(Timer.java:556)
at java.base/java.util.TimerThread.run(Timer.java:506)
Caused by: java.sql.SQLSyntaxErrorException: Unknown database 'analytics_db'
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120)
at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:833)
at com.mysql.cj.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:453)
at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:246)
at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:198)
at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:138)
at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:353)
at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:201)
at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:473)
at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:562)
... 15 more
First of all, manually You need to create a database called analytics_db and point to it. Then automatically DB tables will be created.
Related
I have two apps one build is native and other is normal image(*.jar) and the apps running on kubernetes. After a time running the native image lost connection with database and loses performance. I think this problem is image I use.
The source code is the same.
I'm using this dockefile.
FROM buildpack-deps:22.04
ENV LD_LIBRARY_PATH=/usr/local/freetype/2_12_1/lib
RUN mkdir /app/
ADD . /app
WORKDIR /app
COPY target/example-native /app
CMD ["./example-native"]
Spring boot: 3.0.1
Mysql: 8.0.26
Kubernetes : 1.24
spring:
datasource:
url: ${JDBC_URL:jdbc:mysql://localhost:3306/database?allowPublicKeyRetrieval=true&useSSL=false}
username: '${DATABASE_USER:root}'
password: ${DATABASE_PASS:123456}
hikari:
maximumPoolSize: 5
minimumIdle: 1
keepaliveTime: 30000
Log error:
Caused by: java.sql.SQLTransientConnectionException: HikariPool-1 - Connection is not available, request timed out after 30000ms.
at com.zaxxer.hikari.pool.HikariPool.createTimeoutException(HikariPool.java:696) ~[na:na]
at com.zaxxer.hikari.pool.HikariPool.getConnection(HikariPool.java:181) ~[na:na]
at com.zaxxer.hikari.pool.HikariPool.getConnection(HikariPool.java:146) ~[na:na]
at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:128) ~[example-native:na]
at org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl.getConnection(DatasourceConnectionProviderImpl.java:122) ~[na:na]
at org.hibernate.internal.NonContextualJdbcConnectionAccess.obtainConnection(NonContextualJdbcConnectionAccess.java:38) ~[na:na]
at org.hibernate.resource.jdbc.internal.LogicalConnectionManagedImpl.acquireConnectionIfNeeded(LogicalConnectionManagedImpl.java:107) ~[na:na]
... 131 common frames omitted
2023-01-12T16:21:00.989-03:00 WARN 1 --- [io-5000-exec-22] o.s.b.a.health.HealthEndpointSupport : Health contributor org.springframework.boot.actuate.jdbc.DataSourceHealthIndicator (db) took 11371ms to respond
2023-01-12T16:21:00.993-03:00 WARN 1 --- [o-5000-exec-142] o.s.b.a.health.HealthEndpointSupport : Health contributor org.springframework.boot.actuate.jdbc.DataSourceHealthIndicator (db) took 11139ms to respond
I tried delete the native app from kubernetes and created again but the error happen yet.
I tested the native app running out of kubernetes in a normal vm and the problem does not happen.
i not conection.
have db in RDS amazon and have app in spring boot with hibernate...
state db is public..
i have conexion in local with workwench mysql. but not with app..
HELP ME PLEASE!!
Loading class com.mysql.jdbc.Driver'. This is deprecated. The new driver class is com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.
2020-06-30 13:21:16.187 INFO 22852 --- [ main] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'applicationTaskExecutor'
2020-06-30 13:21:16.195 INFO 22852 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
2020-06-30 13:21:16.198 WARN 22852 --- [ main] com.zaxxer.hikari.util.DriverDataSource : Registered driver with driverClassName=com.mysql.jdbc.Driver was not found, trying direct instantiation.
2020-06-30 13:21:17.960 ERROR 22852 --- [ main] com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - Exception during pool initialization.
java.sql.SQLException: Access denied for user 'master'#'186.23.179.139' (using password: YES)
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:129) ~[mysql-connector-java-8.0.20.jar:8.0.20]
enter image description here
spring.datasource.url=jdbc:mysql://autofabricadb.clbpfrarz8ji.sa-east-1.rds.amazonaws.com:3306/dbautofabrica
Caused by: com.mysql.cj.exceptions.CJCommunicationsException: Communications link failure
I HAVE CONEXIONNN BUT NOW SHOWW THE NEXT
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
at com.mysql.cj.protocol.StandardSocketFactory.connect(StandardSocketFactory.java:132) [mysql-connector-java-8.0.20.jar:8.0.20]
at com.mysql.cj.protocol.a.NativeSocketConnection.connect(NativeSocketConnection.java:65) [mysql-connector-java-8.0.20.jar:8.0.20]
Have you inserted dependency(maven or gradle whatever you used to build the application) of mysql connector/jdbc driver for mysql, Make sure you've compatible version of jdbc mysql connector and your mysql version. Also keep in mind if your master user password and credentials maintained in your application properties file along with datasource url.
Hello everybody I am trying to connect my Spring boot App with Mysql but unfortunately it does not work.
application.properties file:
spring.datasource.url=jdbc:mysql://localhost:3306/mydb
spring.datasource.username=root
spring.datasource.password=*********
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
# Keep the connection alive if idle for a long time (needed in production)
spring.datasource.tomcat.max-active=1
# ===============================
# = JPA / HIBERNATE
# ===============================
# Use spring.jpa.properties.* for Hibernate native properties (the prefix is
# stripped before adding them to the entity manager).
# Show or not log for each sql query
spring.jpa.show-sql = true
# Hibernate ddl auto (create, create-drop, update): with "update" the database
# schema will be automatically updated accordingly to java entities found in
# the project
spring.jpa.hibernate.ddl-auto = update
# Allows Hibernate to generate SQL optimized for a particular DBMS
spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5Dialect
The errors that I am getting are the following:
2018-07-06 18:32:10.832 WARN 7180 --- [ main] o.a.tomcat.jdbc.pool.ConnectionPool : maxIdle is larger than maxActive, setting maxIdle to: 1
Fri Jul 06 18:32:10 CEST 2018 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
2018-07-06 18:32:11.093 ERROR 7180 --- [ main] o.a.tomcat.jdbc.pool.ConnectionPool : Unable to create initial connections of pool.
java.sql.SQLException: Unknown system variable 'query_cache_size'
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:964) ~[mysql-connector-java-5.1.41.jar:5.1.41]
at com.auth0.samples.bootfaces.Application.main(Application.java:21) [classes/:na]
2018-07-06 18:32:11.109 WARN 7180 --- [ main] ationConfigEmbeddedWebApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flywayInitializer' defined in class path resource [org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration$FlywayConfiguration.class]: Invocation of init method failed; nested exception is org.flywaydb.core.api.FlywayException: Unable to obtain Jdbc connection from DataSource
Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.
2018-07-06 18:32:11.176 ERROR 7180 --- [ main] o.s.boot.SpringApplication : Application startup failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flywayInitializer' defined in class path resource [org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration$FlywayConfiguration.class]: Invocation of init method failed; nested exception is org.flywaydb.core.api.FlywayException: Unable to obtain Jdbc connection from DataSource
Caused by: org.flywaydb.core.api.FlywayException: Unable to obtain Jdbc connection from DataSource
at org.flywaydb.core.internal.util.jdbc.JdbcUtils.openConnection(JdbcUtils.java:56) ~[flyway-core-3.2.1.jar:na]
pport.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1624) ~[spring-beans-4.3.7.RELEASE.jar:4.3.7.RELEASE]
... 18 common frames omitted
Caused by: java.sql.SQLException: Unknown system variable 'query_cache_size'
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:964) ~[mysql-connector-java-5.1.41.jar:5.1.41]
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3973) ~[mysql-connector-java-5.1.41.jar:5.1.41]
I have been running DCHQ.io (On-Prem) for a few months now with no major issue.
My Container Hosts environment looks like this:
DCHQ-VM-Host
RAM: 14gb / CPU 4 / 100gb Storage
10.21.38.165
host0
This is where DCHQ resides
Docker-VM-1
RAM: 8gb / CPU 2
10.21.36.201
host1
Where LB containers are hosted
Docker-Metal-2
RAM 96gb / CPU 12
10.21.39.71
host2
Where APP containers are hosted
Docker-Metal-4
RAM 96gb / CPU 12
10.21.38.170
host4
Where DB containers are hosted
Today, while attempting to deploy the 3-Tier Java (ApacheHTTP – Tomcat – MySQL) application template for a POC at work, host-4 went offline.
Couple days ago I converted host-1 from a BM machine to a VM. Therefore, I removed that host from DCHQ and added it back using the same name (host-1) but this time as a VM ona different ESX server. Not sure if this has something to do with host-4 throwing the error below. As a result, no template involving host-4 can be deployed so as a workaround I'm using host-1 and host-2 to deploy.
I have tried restarting the host-4, deactivating/activating host-4 from within DCHQ UI and restarting the agent on host-4 but to no avail.
My last resort is to remove and reinstall the client on host-4 but I wanted to post it here first. I have also email DCHQ support with this issue.
The DCHQ log shows the following error :
2016-01-29 15:56:31.026 INFO 1217 --- [pool-3-thread-2] c.d.a.o.impl.ImagePullQueueProcessor : Processing pull req
2016-01-29 15:56:31.028 INFO 1217 --- [pool-3-thread-2] c.d.a.o.impl.TemplateOperationsImpl : Received pull request for image [mysql:latest] registry [null]
2016-01-29 15:56:31.028 INFO 1217 --- [pool-3-thread-2] c.d.a.o.impl.DockerClientBuilderUtil : Using public repo since username [null] or password is empty
2016-01-29 15:56:31.043 ERROR 1217 --- [pool-15-thread-1] c.g.d.core.async.ResultCallbackTemplate : Error during callback
org.apache.http.conn.HttpHostConnectException: Connect to 127.0.0.1:10624 [/127.0.0.1] failed: Connection refused
at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:151)
at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:353)
at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:380)
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236)
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184)
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88)
at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:71)
at com.github.dockerjava.jaxrs.connector.ApacheConnector.apply(ApacheConnector.java:443)
at org.glassfish.jersey.client.ClientRuntime.invoke(ClientRuntime.java:246)
at org.glassfish.jersey.client.JerseyInvocation$2.call(JerseyInvocation.java:683)
at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
at org.glassfish.jersey.internal.Errors.process(Errors.java:228)
at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:424)
at org.glassfish.jersey.client.JerseyInvocation.invoke(JerseyInvocation.java:679)
at org.glassfish.jersey.client.JerseyInvocation$Builder.method(JerseyInvocation.java:435)
at org.glassfish.jersey.client.JerseyInvocation$Builder.post(JerseyInvocation.java:338)
at com.github.dockerjava.jaxrs.async.POSTCallbackNotifier.response(POSTCallbackNotifier.java:29)
at com.github.dockerjava.jaxrs.async.AbstractCallbackNotifier.call(AbstractCallbackNotifier.java:45)
at com.github.dockerjava.jaxrs.async.AbstractCallbackNotifier.call(AbstractCallbackNotifier.java:22)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:579)
at org.apache.http.conn.socket.PlainConnectionSocketFactory.connectSocket(PlainConnectionSocketFactory.java:74)
at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:134)
... 25 common frames omitted
2016-01-29 15:56:31.044 ERROR 1217 --- [pool-3-thread-2] c.d.a.o.impl.TemplateOperationsImpl : Error pulling image [mysql] response logs []
2016-01-29 15:56:31.046 INFO 1217 --- [pool-3-thread-2] c.d.a.o.impl.ImagePullQueueProcessor : Finished processing pull req
2016-01-29 15:58:39.687 WARN 1217 --- [pool-3-thread-1] c.d.a.o.impl.SysInfoMonitorService : org.apache.http.conn.HttpHostConnectException: Connect to 127.0.0.1:10624 [/127.0.0.1] failed: Connection refused
2016-01-29 15:58:39.688 ERROR 1217 --- [pool-3-thread-2] c.d.a.o.impl.MachineOperationsImpl : org.apache.http.conn.HttpHostConnectException: Connect to 127.0.0.1:10624 [/127.0.0.1] failed: Connection refused
Thank you in advance,
Rod
Thanks for reporting this issue. Feel free to report this on our issue tracker.
https://github.com/dchqinc/dchq-on-premise-issue-tracker/issues
Please make sure that the information in the application.properties file has not changed. Make sure that the server key matches whatever the DCHQ UI shows for host-4.
vi /opt/dchq/config/application.properties
You can then restart the agent:
service dchq stop
ps -ef | grep dchq
## forcefully kill any DCHQ process that may not have stopped otherwise using kill -9
service dchq start
Lastly -- can you please test the connection from the UI? This will help us narrow down the issue.
For any help deploying Docker Compose applications, please refer to our documentation: http://dchq.co/docker-compose.html
I am trying to setup the Gov. registry 4.6.0 with a MySQL 5.6 community edition database
I followed the setup instructions in the 4.6.0 documentation and when I start the registry with wso2server.bat -Dsetup option I get the following error
C:\Apps\wso2greg-4.6.0\bin>wso2server.bat -Dsetup
JAVA_HOME environment variable is set to C:\Program Files\Java\jre6
CARBON_HOME environment variable is set to C:\Apps\WSO2GR~1.0\bin\..
[2014-03-03 13:52:57,979] INFO {org.wso2.carbon.core.internal.CarbonCoreActivator} - Starting WSO2 Carbon...
[2014-03-03 13:52:57,982] INFO {org.wso2.carbon.core.internal.CarbonCoreActivator} - Operating System : Windows 7 6.1, amd64
[2014-03-03 13:52:57,983] INFO {org.wso2.carbon.core.internal.CarbonCoreActivator} - Java Home : C:\Program Files\Java\jre6
[2014-03-03 13:52:57,983] INFO {org.wso2.carbon.core.internal.CarbonCoreActivator} - Java Version : 1.6.0_29
[2014-03-03 13:52:57,983] INFO {org.wso2.carbon.core.internal.CarbonCoreActivator} - Java VM : Java HotSpot(TM) 64-Bit Server VM 20.4-b02,Sun Microsystems Inc.
[2014-03-03 13:52:57,984] INFO {org.wso2.carbon.core.internal.CarbonCoreActivator} - Carbon Home : C:\Apps\WSO2GR~1.0\bin\..
[2014-03-03 13:52:57,984] INFO {org.wso2.carbon.core.internal.CarbonCoreActivator} - Java Temp Dir : C:\Apps\WSO2GR~1.0\bin\..\tmp
[2014-03-03 13:52:57,984] INFO {org.wso2.carbon.core.internal.CarbonCoreActivator} - User : xxxxx, en-US, America/New_York
[2014-03-03 13:52:58,056] WARN {org.wso2.carbon.core.bootup.validator.util.ValidationResultPrinter} - The default keystore (wso2carbon.jks) is currently being used. To maximize security when deploying to a production environment, configure a new keystore with a unique password in the production server profile.
[2014-03-03 13:52:58,063] INFO {org.wso2.carbon.databridge.agent.thrift.AgentHolder} - Agent created !
[2014-03-03 13:52:58,079] INFO {org.wso2.carbon.databridge.agent.thrift.internal.AgentDS} - Successfully deployed Agent Client
[2014-03-03 13:52:59,096] ERROR {org.wso2.carbon.user.core.internal.Activator} - Cannot start User Manager Core bundle
java.lang.Exception: Error in creating the database
at org.wso2.carbon.user.core.common.DefaultRealmService.initializeDatabase(DefaultRealmService.java:285)
at org.wso2.carbon.user.core.common.DefaultRealmService.<init>(DefaultRealmService.java:90)
at org.wso2.carbon.user.core.common.DefaultRealmService.<init>(DefaultRealmService.java:114)
at org.wso2.carbon.user.core.internal.Activator.startDeploy(Activator.java:70)
at org.wso2.carbon.user.core.internal.BundleCheckActivator.start(BundleCheckActivator.java:61)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:711)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:702)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:683)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:390)
at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1176)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:559)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:544)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:457)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:243)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:438)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:1)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
Caused by: java.lang.Exception: Error occurred while executing : CREATE INDEX REG_PATH_IND_BY_PATH_VALUE USING HASH ON REG_PATH(REG_PATH_VALUE, REG_TENANT_ID)
at org.wso2.carbon.utils.dbcreator.DatabaseCreator.executeSQL(DatabaseCreator.java:169)
at org.wso2.carbon.utils.dbcreator.DatabaseCreator.executeSQLScript(DatabaseCreator.java:325)
at org.wso2.carbon.utils.dbcreator.DatabaseCreator.createRegistryDatabase(DatabaseCreator.java:61)
at org.wso2.carbon.user.core.common.DefaultRealmService.initializeDatabase(DefaultRealmService.java:278)
... 19 more
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Specified key was too long; max key length is 767 bytes
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
at com.mysql.jdbc.Util.getInstance(Util.java:386)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1054)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4237)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4169)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2617)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2778)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2828)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2777)
at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:949)
at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:795)
at org.wso2.carbon.utils.dbcreator.DatabaseCreator.executeSQL(DatabaseCreator.java:139)
... 22 more
[2014-03-03 13:53:05,444] INFO {org.apache.catalina.startup.TaglibUriRule} - TLD skipped. URI: http://tiles.apache.org/tags-tiles is already defined
What is wrong?
Thanks
I guess same issue has been mentioned in the jira. Workaround that, they have mentioned is
This occurs when an encoding like UTF-8 is used, because it takes more than 1 byte to represent a character. When an encoding like latin1 is used, this exception does not occur.
You can try it and check