pinpoint-docker icon indicating copy to clipboard operation
pinpoint-docker copied to clipboard

Facing issue for creating dockerised container for all pinpoint components like INFRASTRUCTURE and URI STATISTICS

Open PIYUSHRAJ24 opened this issue 1 year ago • 6 comments

When I am trying to execute docker-compose up for the docker-compose-metric.yml file I am facing this issue. Please fix this asap. It would be very helpful.

Error querying database. Cause: java.sql.SQLException: Failed to execute query : {} ### The error may exist in URL [jar:file:/pinpoint/pinpoint-web-boot.jar!/BOOT-INF/lib/pinpoint-metric-2.5.0-SNAPSHOT.jar!/pinot-web/mapper/pinot/HostInfoMapper.xml] ### The error may involve com.navercorp.pinpoint.metric.web.dao.pinot.PinotSystemMetricHostInfoDao.selectHostGroupNameList-Inline ### The error occurred while setting parameters ### SQL: SELECT DISTINCT hostGroupName FROM systemMetricTag WHERE tenantId = ? ### Cause: java.sql.SQLException: Failed to execute query : {} ; uncategorized SQLException; SQL state [SELECT DISTINCT hostGroupName FROM systemMetricTag WHERE tenantId = ? LIMIT 2147483647]; error code [0]; Failed to execute query : {}; nested exception is java.sql.SQLException: Failed to execute query : {}

PIYUSHRAJ24 avatar Mar 17 '23 11:03 PIYUSHRAJ24

https://github.com/pinpoint-apm/pinpoint-docker/pull/156#issue-1514275114 https://github.com/pinpoint-apm/pinpoint-docker/issues/158#issuecomment-1383326090

please explain what you did to create this issue. did you check if pinot is up and running?

ga-ram avatar Mar 20 '23 00:03 ga-ram

So did you check if pinot is up and running and tables successfully created????? At least you should check your container logs and provide them here for me to further help you. Please refer to pinot-init within docker-compose-metric.yml to manually create your tables when the tables are not created within pinot-init container. It may fail if pinot-init tries to add tables when other pinot containers are not ready. I put sleep 30 to wait for them but it may not be sufficient for your environment. Any contribution to improve this (e.g., check if pinot is ready instead of waiting for 30s and then add table) is always welcome.

ga-ram avatar Mar 21 '23 02:03 ga-ram

So did you check if pinot is up and running and tables successfully created????? At least you should check your container logs and provide them here for me to further help you. Please refer to pinot-init within docker-compose-metric.yml to manually create your tables when the tables are not created within pinot-init container. It may fail if pinot-init tries to add tables when other pinot containers are not ready. I put sleep 30 to wait for them but it may not be sufficient for your environment. Any contribution to improve this (e.g., check if pinot is ready instead of waiting for 30s and then add table) is always welcome.

I entered the pinot-init container to manually create a data table, but an error was reported. The error is as follows: 2023/04/27 04:55:37.757 INFO [AddTableCommand] [main] Executing command: AddTable -tableConfigFile null -offlineTableConfigFile null -realtimeTableConfigFiledoubleTable.json -schemaFile doubleSchema.json -controllerProtocol http -controllerHost pinot-controller -controllerPort 9000 -user null -password [hidden] -exec java.net.ConnectException: Connection refused (Connection refused) at java.base/java.net.PlainSocketImpl.socketConnect(Native Method) at java.base/java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:412) at java.base/java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:255) at java.base/java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:237) at java.base/java.net.Socket.connect(Socket.java:609) at java.base/java.net.Socket.connect(Socket.java:558) at java.base/sun.net.NetworkClient.doConnect(NetworkClient.java:182) at java.base/sun.net.www.http.HttpClient.openServer(HttpClient.java:507) at java.base/sun.net.www.http.HttpClient.openServer(HttpClient.java:602) at java.base/sun.net.www.http.HttpClient.<init>(HttpClient.java:275) at java.base/sun.net.www.http.HttpClient.New(HttpClient.java:374) at java.base/sun.net.www.http.HttpClient.New(HttpClient.java:395) at java.base/sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1253) at java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1187) at java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1081) at java.base/sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:1015) at java.base/sun.net.www.protocol.http.HttpURLConnection.getOutputStream0(HttpURLConnection.java:1367) at java.base/sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1342) at org.apache.pinot.tools.admin.command.AbstractBaseAdminCommand.sendRequest(AbstractBaseAdminCommand.java:95) at org.apache.pinot.tools.admin.command.AddTableCommand.sendTableCreationRequest(AddTableCommand.java:191) at org.apache.pinot.tools.admin.command.AddTableCommand.execute(AddTableCommand.java:258) at org.apache.pinot.tools.Command.call(Command.java:33) at org.apache.pinot.tools.Command.call(Command.java:29) at picocli.CommandLine.executeUserObject(CommandLine.java:1953) at picocli.CommandLine.access$1300(CommandLine.java:145) at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2352) at picocli.CommandLine$RunLast.handle(CommandLine.java:2346) at picocli.CommandLine$RunLast.handle(CommandLine.java:2311) at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179) at picocli.CommandLine.execute(CommandLine.java:2078) at org.apache.pinot.tools.admin.PinotAdministrator.execute(PinotAdministrator.java:171) at org.apache.pinot.tools.admin.PinotAdministrator.main(PinotAdministrator.java:202)

PeiAlan avatar Apr 27 '23 05:04 PeiAlan

The command I executed was : /opt/pinot/bin/pinot-admin.sh AddTable -schemaFile uriStatSchema.json -realtimeTableConfigFile uriStatTable.json -controllerHost pinot-controller -controllerPort 9000 -exec

/opt/pinot/bin/pinot-admin.sh AddTable -schemaFile tagSchema.json -realtimeTableConfigFile tagTable.json -controllerHost pinot-controller -controllerPort 9000 -exec

/opt/pinot/bin/pinot-admin.sh AddTable -schemaFile doubleSchema.json -realtimeTableConfigFile doubleTable.json -controllerHost pinot-controller -controllerPort 9000 -exec

/opt/pinot/bin/pinot-admin.sh AddTable -schemaFile dataTypeSchema.json -realtimeTableConfigFile dataTypeTable.json -controllerHost pinot-controller -controllerPort 9000 -exec

PeiAlan avatar Apr 27 '23 05:04 PeiAlan

Please check if pinot-controller started successfully. If not, please check if pinot-zoo has errors or not. You can restart pinot-init container with docker compose -f docker-compose.yml -f docker-compose-metric.yml restart pinot-init as well.

ga-ram avatar Apr 27 '23 06:04 ga-ram

#176

HeeJoon-Kim avatar May 31 '23 07:05 HeeJoon-Kim