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

in k8s start failed,but log no error #148

Open
chinaboy007 opened this issue Sep 13, 2023 · 1 comment
Open

in k8s start failed,but log no error #148

chinaboy007 opened this issue Sep 13, 2023 · 1 comment

Comments

@chinaboy007
Copy link

chinaboy007 commented Sep 13, 2023

日志如下:
kc logs -f rocketmq-exporter-5db66fbbd9-bv8xl -n test

. ____ _ __ _ _
/\ / ' __ _ () __ __ _ \ \ \
( ( )_
_ | '_ | '| | ' / ` | \ \ \
\/ )| |)| | | | | || (| | ) ) ) )
' |
| .__|| ||| |_, | / / / /
=========|
|==============|/=////
:: Spring Boot :: (v2.7.11)

[2023-09-13 07:28:04.643] INFO Starting RocketMQExporterApplication v0.0.2-SNAPSHOT using Java 1.8.0_342 on rocketmq-exporter-5db66fbbd9-bv8xl with PID 1 (/apps/rocketmq-exporter-master/target/rocketmq-exporter-0.0.2-SNAPSHOT-exec.jar started by root in /apps/rocketmq-exporter-master/target)
[2023-09-13 07:28:04.647] INFO No active profile set, falling back to 1 default profile: "default"
[2023-09-13 07:28:19.549] INFO Tomcat initialized with port(s): 5557 (http)
[2023-09-13 07:28:19.747] INFO Initializing ProtocolHandler ["http-nio-5557"]
[2023-09-13 07:28:19.748] INFO Starting service [Tomcat]
[2023-09-13 07:28:19.748] INFO Starting Servlet engine: [Apache Tomcat/9.0.74]
[2023-09-13 07:28:20.746] INFO Initializing Spring embedded WebApplicationContext
[2023-09-13 07:28:20.746] INFO Root WebApplicationContext: initialization completed in 15303 ms
[2023-09-13 07:28:24.145] INFO setNameSrvAddrByProperty nameSrvAddr=10.244.111.153:9876
[2023-09-13 07:28:24.148] INFO setRocketmqVersion rocketmqVersion=494
[2023-09-13 07:28:24.148] INFO setWebTelemetryPath webTelemetryPath=/metrics

#反复重启
rocketmq-exporter-5db66fbbd9-bv8xl 1/1 Running 3 4m11s

#yaml file

kind: Deployment
metadata:
  name: rocketmq-exporter
  namespace: test
spec:
  replicas: 1
  selector:
    matchLabels:
      app: rocketmq-exporter
  template:
    metadata:
      labels:
        app: rocketmq-exporter
    spec:
      #hostNetwork: true
      containers:
      - name: rocketmq-exporter
        #x86_64镜像
        #image: opcache/rabbitmq:rocketmq-exporter
        #arm64镜像
        #image: aiyowei/rocketmq-exporter
        #image: xiongburong/rocketmq-exporter:v1.0
        image: chinaboy007/rocketmq-exporter:test1
        resources:
          requests:
            cpu: 100m
            memory: 100Mi
          limits:
            cpu: 200m
            memory: 100Mi
        env:
        - name: rocketmq.config.namesrvAddr
          #value: "rocketmq-prod.ddplatform.svc.cluster.local:9876"
          value: "10.244.111.153:9876"
        - name: rocketmq.config.webTelemetryPath
          value: "/metrics"
        - name: server.port
          value: "5557"
        ports:
        - containerPort: 5557
        name: metric-port  #
---
apiVersion: v1
kind: Service
metadata:
  name: rocketmq-exporter
  namespace: test
spec:
  selector:
    app: rocketmq-exporter
  type: NodePort
  ports:
    - name: metric-port
      port: 5557
      targetPort: 5557
      protocol: TCP
@chinaboy007
Copy link
Author

已解决 kc logs -f rocketmq-exporter-fc794bc8b-wggl5 -n ddplatform

. ____ _ __ _ _
/\ / ' __ _ () __ __ _ \ \ \
( ( )_
_ | '_ | '| | ' / ` | \ \ \
\/ )| |)| | | | | || (| | ) ) ) )
' |
| .__|| ||| |_, | / / / /
=========|
|==============|/=////
:: Spring Boot :: (v2.7.11)

[2023-09-13 07:54:03.849] INFO Starting RocketMQExporterApplication v0.0.2-SNAPSHOT using Java 1.8.0_332 on rocketmq-exporter-fc794bc8b-wggl5 with PID 1 (/quickstart.jar started by root in /)
[2023-09-13 07:54:03.942] INFO No active profile set, falling back to 1 default profile: "default"
[2023-09-13 07:54:17.744] INFO Tomcat initialized with port(s): 5557 (http)
[2023-09-13 07:54:17.846] INFO Initializing ProtocolHandler ["http-nio-5557"]
[2023-09-13 07:54:17.847] INFO Starting service [Tomcat]
[2023-09-13 07:54:17.847] INFO Starting Servlet engine: [Apache Tomcat/9.0.74]
[2023-09-13 07:54:18.943] INFO Initializing Spring embedded WebApplicationContext
[2023-09-13 07:54:18.944] INFO Root WebApplicationContext: initialization completed in 14299 ms
[2023-09-13 07:54:22.144] INFO setNameSrvAddrByProperty nameSrvAddr=10.244.111.153:9876
[2023-09-13 07:54:22.146] INFO setRocketmqVersion rocketmqVersion=494
[2023-09-13 07:54:22.147] INFO setWebTelemetryPath webTelemetryPath=/metrics
[2023-09-13 07:54:25.643] INFO MetricsCollectTask init starting....
[2023-09-13 07:54:27.350] INFO cluster name= DefaultCluster, broker name = [rocketmq-prod-5dd8cd88ff-jj6ql]
broker name = rocketmq-prod-5dd8cd88ff-jj6ql, master broker address= 10.244.14.235:10911

[2023-09-13 07:54:27.350] INFO MetricsCollectTask init finished....cost:1706
[2023-09-13 07:54:32.346] INFO Starting ProtocolHandler ["http-nio-5557"]
[2023-09-13 07:54:32.548] INFO Tomcat started on port(s): 5557 (http) with context path ''
[2023-09-13 07:54:32.842] INFO Started RocketMQExporterApplication in 35.599 seconds (JVM running for 42.997)
^C

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

1 participant