Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error after deploying pinpoint metric using docker compose file #161

Open
max420max opened this issue Feb 20, 2023 · 4 comments
Open

error after deploying pinpoint metric using docker compose file #161

max420max opened this issue Feb 20, 2023 · 4 comments

Comments

@max420max
Copy link

image

@max420max max420max changed the title error after deploying pinpoint metric using docker error after deploying pinpoint metric using docker compose file Feb 20, 2023
@max420max
Copy link
Author

some tables are required that doesn't exist in database please help me with this

@ga-ram
Copy link
Contributor

ga-ram commented Mar 13, 2023

Did you modify the docker compose file?

@max420max
Copy link
Author

yeah i have modified

below is the modified docker compose file

`version: "3.6"

services:
pinpoint-hbase:
build:
context: ./pinpoint-hbase/
dockerfile: Dockerfile
args:
- PINPOINT_VERSION=${PINPOINT_VERSION}

container_name: "${PINPOINT_HBASE_NAME}"
image: "pinpointdocker/pinpoint-hbase:${PINPOINT_VERSION}"
networks:
  - pinpoint
environment:
  - AGENTINFO_TTL=${AGENTINFO_TTL}
  - AGENTSTATV2_TTL=${AGENTSTATV2_TTL}
  - APPSTATAGGRE_TTL=${APPSTATAGGRE_TTL}
  - APPINDEX_TTL=${APPINDEX_TTL}
  - AGENTLIFECYCLE_TTL=${AGENTLIFECYCLE_TTL}
  - AGENTEVENT_TTL=${AGENTEVENT_TTL}
  - STRINGMETADATA_TTL=${STRINGMETADATA_TTL}
  - APIMETADATA_TTL=${APIMETADATA_TTL}
  - SQLMETADATA_TTL=${SQLMETADATA_TTL}
  - TRACEV2_TTL=${TRACEV2_TTL}
  - APPTRACEINDEX_TTL=${APPTRACEINDEX_TTL}
  - APPMAPSTATCALLERV2_TTL=${APPMAPSTATCALLERV2_TTL}
  - APPMAPSTATCALLEV2_TTL=${APPMAPSTATCALLEV2_TTL}
  - APPMAPSTATSELFV2_TTL=${APPMAPSTATSELFV2_TTL}
  - HOSTAPPMAPV2_TTL=${HOSTAPPMAPV2_TTL}
volumes:
  - hbase_data:/home/pinpoint/hbase
  - /home/pinpoint/zookeeper
expose:
  # HBase Master API port
  - "60000"
  # HBase Master Web UI
  - "16010"
  # Regionserver API port
  - "60020"
  # HBase Regionserver web UI
  - "16030"
ports:
  - "60000:60000"
  - "16010:16010"
  - "60020:60020"
  - "16030:16030"
restart: always
depends_on:
  - zoo1

pinpoint-mysql:
build:
context: ./pinpoint-mysql/
dockerfile: Dockerfile
args:
- PINPOINT_VERSION=${PINPOINT_VERSION}

container_name: pinpoint-mysql
restart: always
image: "pinpointdocker/pinpoint-mysql:${PINPOINT_VERSION}"
hostname: pinpoint-mysql
ports:
  - "3306:3306"
environment:
  - MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
  - MYSQL_USER=${MYSQL_USER}
  - MYSQL_PASSWORD=${MYSQL_PASSWORD}
  - MYSQL_DATABASE=${MYSQL_DATABASE}

volumes:
  - mysql_data:/var/lib/mysql
networks:
  - pinpoint

pinpoint-web:
build:
context: ./pinpoint-web
dockerfile: Dockerfile-metric
args:
- PINPOINT_VERSION=${PINPOINT_VERSION}
container_name: "${PINPOINT_WEB_NAME}"
image: "pinpointdocker/pinpoint-web:${PINPOINT_VERSION}-metric"
depends_on:
- pinpoint-hbase
- pinpoint-mysql
- zoo1
- pinpoint-kafka-init
- pinot-init
restart: always
expose:
- "9997"
ports:
- "9997:9997"
- "${WEB_SERVER_PORT:-8080}:${WEB_SERVER_PORT:-8080}"
environment:
- WEB_SERVER_PORT=${WEB_SERVER_PORT}
- SPRING_PROFILES_ACTIVE=${SPRING_PROFILES},metric
- PINPOINT_ZOOKEEPER_ADDRESS=${PINPOINT_ZOOKEEPER_ADDRESS}
- CLUSTER_ENABLE=${CLUSTER_ENABLE}
- ADMIN_PASSWORD=${ADMIN_PASSWORD}
- CONFIG_SENDUSAGE=${CONFIG_SENDUSAGE}
- LOGGING_LEVEL_ROOT=${WEB_LOGGING_LEVEL_ROOT}
- CONFIG_SHOW_APPLICATIONSTAT=${CONFIG_SHOW_APPLICATIONSTAT}
- JDBC_DRIVERCLASSNAME=${JDBC_DRIVERCLASSNAME}
- JDBC_URL=${JDBC_URL}
- JDBC_USERNAME=${JDBC_USERNAME}
- JDBC_PASSWORD=${JDBC_PASSWORD}
- PINPOINT_PINOT_JDBC_URL=${PINPOINT_PINOT_JDBC_URL}
- PINPOINT_PINOT_JDBC_USERNAME=${PINPOINT_PINOT_JDBC_USERNAME}
- PINPOINT_PINOT_JDBC_PASSWORD=${PINPOINT_PINOT_JDBC_PASSWORD}
links:
- "pinpoint-mysql:pinpoint-mysql"
networks:
- pinpoint

pinpoint-collector:
build:
context: ./pinpoint-collector
dockerfile: Dockerfile-metric
args:
- PINPOINT_VERSION=${PINPOINT_VERSION}
container_name: "${PINPOINT_COLLECTOR_NAME}"
image: "pinpointdocker/pinpoint-collector:${PINPOINT_VERSION}-metric"
depends_on:
- pinpoint-hbase
- zoo1
- pinpoint-kafka-init
- pinot-init
restart: always
expose:
- "9991"
- "9992"
- "9993"
- "9994"
- "9995"
- "9996"
- "15200"
ports:
- "${COLLECTOR_RECEIVER_GRPC_AGENT_PORT:-9991}:9991/tcp"
- "${COLLECTOR_RECEIVER_GRPC_STAT_PORT:-9992}:9992/tcp"
- "${COLLECTOR_RECEIVER_GRPC_SPAN_PORT:-9993}:9993/tcp"
- "${COLLECTOR_RECEIVER_BASE_PORT:-9994}:9994"
- "${COLLECTOR_RECEIVER_STAT_UDP_PORT:-9995}:9995/tcp"
- "${COLLECTOR_RECEIVER_SPAN_UDP_PORT:-9996}:9996/tcp"
- "${COLLECTOR_RECEIVER_STAT_UDP_PORT:-9995}:9995/udp"
- "${COLLECTOR_RECEIVER_SPAN_UDP_PORT:-9996}:9996/udp"
networks:
pinpoint:
ipv4_address: ${COLLECTOR_FIXED_IP}
environment:
- SPRING_PROFILES_ACTIVE=local,metric
- PINPOINT_ZOOKEEPER_ADDRESS=${PINPOINT_ZOOKEEPER_ADDRESS}
- CLUSTER_ENABLE=${CLUSTER_ENABLE}
- LOGGING_LEVEL_ROOT=${COLLECTOR_LOGGING_LEVEL_ROOT}
- FLINK_CLUSTER_ENABLE=${FLINK_CLUSTER_ENABLE}
- FLINK_CLUSTER_ZOOKEEPER_ADDRESS=${FLINK_CLUSTER_ZOOKEEPER_ADDRESS}
- PINPOINT_PINOT_JDBC_URL=${PINPOINT_PINOT_JDBC_URL}
- PINPOINT_PINOT_JDBC_USERNAME=${PINPOINT_PINOT_JDBC_USERNAME}
- PINPOINT_PINOT_JDBC_PASSWORD=${PINPOINT_PINOT_JDBC_PASSWORD}
- PINPOINT_METRIC_KAFKA_BOOTSTRAP_SERVERS=${PINPOINT_METRIC_KAFKA_BOOTSTRAP_SERVERS}

pinpoint-kafka:
image: ubuntu/kafka:3.1-22.04_beta
restart: unless-stopped
hostname: pinpoint-kafka
command: /etc/kafka/server.properties --override advertised.listeners=PLAINTEXT://pinpoint-kafka:9092
depends_on:
- pinot-zoo
expose:
- "9092"
environment:
- ZOOKEEPER_HOST=pinot-zoo
networks:
- pinpoint

pinpoint-kafka-init:
image: ubuntu/kafka:3.1-22.04_beta
restart: "no"
depends_on:
- pinpoint-kafka
entrypoint: >
sh -c "/opt/kafka/bin/kafka-topics.sh --create --topic url-stat --bootstrap-server pinpoint-kafka:9092 &&
/opt/kafka/bin/kafka-topics.sh --create --topic system-metric-data-type --bootstrap-server pinpoint-kafka:9092 &&
/opt/kafka/bin/kafka-topics.sh --create --topic system-metric-tag --bootstrap-server pinpoint-kafka:9092 &&
/opt/kafka/bin/kafka-topics.sh --create --topic system-metric-double --bootstrap-server pinpoint-kafka:9092"
networks:
- pinpoint

pinot-controller:
image: apachepinot/pinot:latest
restart: unless-stopped
command: StartController -zkAddress pinot-zoo
depends_on:
- pinot-zoo
expose:
- "9000"
ports:
- "9000:9000"
networks:
- pinpoint

pinot-broker-0:
image: apachepinot/pinot:latest
restart: unless-stopped
command: StartBroker -zkAddress pinot-zoo
depends_on:
- pinot-controller
expose:
- "8099"
networks:
- pinpoint

pinot-server-0:
image: apachepinot/pinot:latest
restart: unless-stopped
command: StartServer -zkAddress pinot-zoo
depends_on:
- pinot-broker-0
expose:
- "8098"
networks:
- pinpoint

pinot-init:
image: apachepinot/pinot:latest
restart: "no"
entrypoint: >
sh -c "
curl https://raw.githubusercontent.com/pinpoint-apm/pinpoint/v${PINPOINT_VERSION}/metric-module/metric/src/main/pinot/pinot-uriStat-table.json > uriStatTable.json &&
curl https://raw.githubusercontent.com/pinpoint-apm/pinpoint/v${PINPOINT_VERSION}/metric-module/metric/src/main/pinot/pinot-uriStat-schema.json > uriStatSchema.json &&
curl https://raw.githubusercontent.com/pinpoint-apm/pinpoint/v${PINPOINT_VERSION}/metric-module/metric/src/main/pinot/pinot-tag-table.json > tagTable.json &&
curl https://raw.githubusercontent.com/pinpoint-apm/pinpoint/v${PINPOINT_VERSION}/metric-module/metric/src/main/pinot/pinot-tag-schema.json > tagSchema.json &&
curl https://raw.githubusercontent.com/pinpoint-apm/pinpoint/v${PINPOINT_VERSION}/metric-module/metric/src/main/pinot/pinot-double-table.json > doubleTable.json &&
curl https://raw.githubusercontent.com/pinpoint-apm/pinpoint/v${PINPOINT_VERSION}/metric-module/metric/src/main/pinot/pinot-double-schema.json > doubleSchema.json &&
curl https://raw.githubusercontent.com/pinpoint-apm/pinpoint/v${PINPOINT_VERSION}/metric-module/metric/src/main/pinot/pinot-dataType-table.json > dataTypeTable.json &&
curl https://raw.githubusercontent.com/pinpoint-apm/pinpoint/v${PINPOINT_VERSION}/metric-module/metric/src/main/pinot/pinot-dataType-schema.json > dataTypeSchema.json &&

  sed -i 's/localhost:19092/pinpoint-kafka:9092/g' uriStatTable.json tagTable.json doubleTable.json dataTypeTable.json &&
  sed -i 's/uri-stat/url-stat/g' uriStatTable.json &&
  sed -i '3,$$s/Double/DOUBLE/' doubleSchema.json &&

  sleep 30 &&
  /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"
depends_on:
  - pinot-server-0
  - pinpoint-kafka-init
networks:
  - pinpoint

#zookeepers
pinot-zoo:
image: zookeeper:3.8.0-temurin
restart: always
expose:
- "2181"
networks:
- pinpoint

telegraf:
image: telegraf:1.25.0
networks:
- pinpoint
depends_on:
- pinpoint-collector
volumes:
- ./telegraf.conf:/etc/telegraf/telegraf.conf
entrypoint: ["telegraf", "-config", "/etc/telegraf/telegraf.conf"]

#zookeepers
zoo1:
image: zookeeper:3.4.13
restart: always
hostname: zoo1
expose:
- "2181"
- "2888"
- "3888"
ports:
- "2181"
environment:
ZOO_MY_ID: 1
ZOO_SERVERS: server.1=0.0.0.0:2888:3888 server.2=zoo2:2888:3888 server.3=zoo3:2888:3888
networks:
- pinpoint

zoo2:
image: zookeeper:3.4.13
restart: always
hostname: zoo2
expose:
- "2181"
- "2888"
- "3888"
ports:
- "2181"
environment:
ZOO_MY_ID: 2
ZOO_SERVERS: server.1=zoo1:2888:3888 server.2=0.0.0.0:2888:3888 server.3=zoo3:2888:3888
networks:
- pinpoint

zoo3:
image: zookeeper:3.4.13
restart: always
hostname: zoo3
expose:
- "2181"
- "2888"
- "3888"
ports:
- "2181"
environment:
ZOO_MY_ID: 3
ZOO_SERVERS: server.1=zoo1:2888:3888 server.2=zoo2:2888:3888 server.3=0.0.0.0:2888:3888
networks:
- pinpoint

##flink
jobmanager:
build:
context: pinpoint-flink
dockerfile: Dockerfile
args:
- PINPOINT_VERSION=${PINPOINT_VERSION}

container_name: "${PINPOINT_FLINK_NAME}-jobmanager"
image: "pinpointdocker/pinpoint-flink:${PINPOINT_VERSION}"
expose:
  - "6123"
ports:
  - "${FLINK_WEB_PORT:-8081}:8081"
command: standalone-job -p 1 pinpoint-flink-job.jar -spring.profiles.active release
environment:
  - JOB_MANAGER_RPC_ADDRESS=jobmanager
  - PINPOINT_ZOOKEEPER_ADDRESS=${PINPOINT_ZOOKEEPER_ADDRESS}
networks:
  - pinpoint
depends_on:
  - zoo1

taskmanager:
build:
context: pinpoint-flink
dockerfile: Dockerfile
args:
- PINPOINT_VERSION=${PINPOINT_VERSION}

container_name: "${PINPOINT_FLINK_NAME}-taskmanager"
image: "pinpointdocker/pinpoint-flink:${PINPOINT_VERSION}"
expose:
  - "6121"
  - "6122"
  - "19994"
ports:
  - "6121:6121"
  - "6122:6122"
  - "19994:19994"
depends_on:
  - zoo1
  - jobmanager
command: taskmanager
links:
  - "jobmanager:jobmanager"
environment:
  - JOB_MANAGER_RPC_ADDRESS=jobmanager
networks:
  - pinpoint

pinpoint-quickstart:
build:
context: ./pinpoint-quickstart/
dockerfile: Dockerfile

container_name: "pinpoint-quickstart"
image: "pinpointdocker/pinpoint-quickstart"
ports:
  - "${APP_PORT:-8085}:8080"
volumes:
  - data-volume:/pinpoint-agent
environment:
  JAVA_OPTS: "-javaagent:/pinpoint-agent/pinpoint-bootstrap-${PINPOINT_VERSION}.jar -Dpinpoint.agentId=${AGENT_ID} -Dpinpoint.applicationName=${APP_NAME} -Dpinpoint.profiler.profiles.active=${SPRING_PROFILES}"
networks:
  - pinpoint
depends_on:
  - pinpoint-agent

pinpoint-batch:
build:
context: ./pinpoint-batch/
dockerfile: Dockerfile
args:
- PINPOINT_VERSION=${PINPOINT_VERSION}

container_name: "${PINPOINT_BATCH_NAME}"
image: "pinpointdocker/pinpoint-batch:${PINPOINT_VERSION}"
depends_on:
  - pinpoint-hbase
  - pinpoint-mysql
  - zoo1
restart: always
environment:
  - BATCH_SERVER_PORT=${BATCH_SERVER_PORT}
  - SPRING_PROFILES_ACTIVE=${SPRING_PROFILES}
  - PINPOINT_ZOOKEEPER_ADDRESS=${PINPOINT_ZOOKEEPER_ADDRESS}
  - CLUSTER_ENABLE=${CLUSTER_ENABLE}
  - ADMIN_PASSWORD=${ADMIN_PASSWORD}
  - CONFIG_SENDUSAGE=${CONFIG_SENDUSAGE}
  - LOGGING_LEVEL_ROOT=${BATCH_LOGGING_LEVEL_ROOT}
  - CONFIG_SHOW_APPLICATIONSTAT=${CONFIG_SHOW_APPLICATIONSTAT}
  - BATCH_FLINK_SERVER=${BATCH_FLINK_SERVER}
  - JDBC_DRIVERCLASSNAME=${JDBC_DRIVERCLASSNAME}
  - JDBC_URL=${JDBC_URL}
  - JDBC_USERNAME=${JDBC_USERNAME}
  - JDBC_PASSWORD=${JDBC_PASSWORD}
  - ALARM_MAIL_SERVER_URL=${ALARM_MAIL_SERVER_URL}
  - ALARM_MAIL_SERVER_PORT=${ALARM_MAIL_SERVER_PORT}
  - ALARM_MAIL_SERVER_USERNAME=${ALARM_MAIL_SERVER_USERNAME}
  - ALARM_MAIL_SERVER_PASSWORD=${ALARM_MAIL_SERVER_PASSWORD}
  - ALARM_MAIL_SENDER_ADDRESS=${ALARM_MAIL_SENDER_ADDRESS}
  - ALARM_MAIL_TRANSPORT_PROTOCOL=${ALARM_MAIL_TRANSPORT_PROTOCOL}
  - ALARM_MAIL_SMTP_PORT=${ALARM_MAIL_SMTP_PORT}
  - ALARM_MAIL_SMTP_AUTH=${ALARM_MAIL_SMTP_AUTH}
  - ALARM_MAIL_SMTP_STARTTLS_ENABLE=${ALARM_MAIL_SMTP_STARTTLS_ENABLE}
  - ALARM_MAIL_SMTP_STARTTLS_REQUIRED=${ALARM_MAIL_SMTP_STARTTLS_REQUIRED}
  - ALARM_MAIL_DEBUG=${ALARM_MAIL_DEBUG}
links:
  - "pinpoint-mysql:pinpoint-mysql"
networks:
  - pinpoint

#agent
pinpoint-agent:
build:
context: ./pinpoint-agent/
dockerfile: Dockerfile
args:
- PINPOINT_VERSION=${PINPOINT_VERSION}

container_name: "${PINPOINT_AGENT_NAME}"
image: "pinpointdocker/pinpoint-agent:${PINPOINT_VERSION}"
restart: unless-stopped
networks:
  - pinpoint
volumes:
  - data-volume:/pinpoint-agent
environment:
  - SPRING_PROFILES=${SPRING_PROFILES}
  - COLLECTOR_IP=${COLLECTOR_IP}
  - PROFILER_TRANSPORT_AGENT_COLLECTOR_PORT=${PROFILER_TRANSPORT_AGENT_COLLECTOR_PORT}
  - PROFILER_TRANSPORT_METADATA_COLLECTOR_PORT=${PROFILER_TRANSPORT_METADATA_COLLECTOR_PORT}
  - PROFILER_TRANSPORT_STAT_COLLECTOR_PORT=${PROFILER_TRANSPORT_STAT_COLLECTOR_PORT}
  - PROFILER_TRANSPORT_SPAN_COLLECTOR_PORT=${PROFILER_TRANSPORT_SPAN_COLLECTOR_PORT}
  - PROFILER_SAMPLING_TYPE=${PROFILER_SAMPLING_TYPE}
  - PROFILER_SAMPLING_COUNTING_SAMPLING_RATE=${PROFILER_SAMPLING_COUNTING_SAMPLING_RATE}
  - PROFILER_SAMPLING_PERCENT_SAMPLING_RATE=${PROFILER_SAMPLING_PERCENT_SAMPLING_RATE}
  - PROFILER_SAMPLING_NEW_THROUGHPUT=${PROFILER_SAMPLING_NEW_THROUGHPUT}
  - PROFILER_SAMPLING_CONTINUE_THROUGHPUT=${PROFILER_SAMPLING_CONTINUE_THROUGHPUT}
  - DEBUG_LEVEL=${AGENT_DEBUG_LEVEL}
  - PROFILER_TRANSPORT_MODULE=${PROFILER_TRANSPORT_MODULE}
depends_on:
  - pinpoint-collector

volumes:
data-volume:
mysql_data:
hbase_data:

networks:
pinpoint:
driver: bridge
ipam:
config:
- subnet: ${PINPOINT_NETWORK_SUBNET}
`

or if u have an quick and easy steps to deploy please share with me.

@ga-ram
Copy link
Contributor

ga-ram commented Mar 20, 2023

#156 (comment)
#158 (comment)

Please check if your pinot is up and running, and if mentioned tables are created.
After adding pinot into pinpoint cluster, it seems like it is too resource-heavy for one machine.
Any ideas or commits to improve current docker compose files are always welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants