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

nginx with php-fpm bug #1681

Open
marunrun opened this issue Feb 20, 2025 · 0 comments
Open

nginx with php-fpm bug #1681

marunrun opened this issue Feb 20, 2025 · 0 comments

Comments

@marunrun
Copy link

marunrun commented Feb 20, 2025

I found a strange problem, when I use nginx + php-fpm on port 9000, if I access the root path (/), I get a strange path that starts with inde.

this is beyla trace log

[
    {
        "type": "HTTP",
        "ignoreSpan": "",
        "peer": "127.0.0.1",
        "peerPort": "38758",
        "host": "127.0.0.1",
        "hostPort": "9000",
        "traceID": "e72d0c3451a45b49321f9f357a2e4836",
        "spanID": "278ac7c0696bcc84",
        "parentSpanID": "79e9972d70fb3760",
        "flags": "0",
        "peerName": "127.0.0.1",
        "hostName": "127.0.0.1",
        "kind": "SPAN_KIND_SERVER",
        "start": "1739951397348679",
        "handlerStart": "1739951397348679",
        "end": "1739951397431794",
        "duration": "83.114781ms",
        "durationUSec": "83114",
        "handlerDuration": "83.114781ms",
        "handlerDurationUSec": "83114",
        "attributes": {
            "clientAddr": "127.0.0.1",
            "contentLen": "544",
            "method": "GET",
            "route": "/*",
            "serverAddr": "127.0.0.1",
            "serverPort": "9000",
            "status": "200",
            "url": "/indese\r\nV"
        }
    },
    {
        "type": "HTTPClient",
        "ignoreSpan": "",
        "peer": "127.0.0.1",
        "peerPort": "38758",
        "host": "127.0.0.1",
        "hostPort": "9000",
        "traceID": "e72d0c3451a45b49321f9f357a2e4836",
        "spanID": "79e9972d70fb3760",
        "parentSpanID": "8ecbcf9a40baf4ca",
        "flags": "0",
        "peerName": "127.0.0.1",
        "hostName": "127.0.0.1",
        "kind": "SPAN_KIND_CLIENT",
        "start": "1739951397348653",
        "handlerStart": "1739951397348653",
        "end": "1739951397431880",
        "duration": "83.226456ms",
        "durationUSec": "83226",
        "handlerDuration": "83.226456ms",
        "handlerDurationUSec": "83226",
        "attributes": {
            "clientAddr": "127.0.0.1",
            "method": "GET",
            "serverAddr": "127.0.0.1",
            "serverPort": "9000",
            "status": "200",
            "url": "/"
        }
    },
    {
        "type": "HTTP",
        "ignoreSpan": "",
        "peer": "172.22.69.92",
        "peerPort": "43880",
        "host": "172.22.71.199",
        "hostPort": "80",
        "traceID": "e72d0c3451a45b49321f9f357a2e4836",
        "spanID": "8ecbcf9a40baf4ca",
        "parentSpanID": "0000000000000000",
        "flags": "1",
        "peerName": "cn-hangzhou",
        "hostName": "",
        "kind": "SPAN_KIND_SERVER",
        "start": "1739951397348536",
        "handlerStart": "1739951397348536",
        "end": "1739951397431916",
        "duration": "83.379687ms",
        "durationUSec": "83379",
        "handlerDuration": "83.379687ms",
        "handlerDurationUSec": "83379",
        "attributes": {
            "clientAddr": "cn-hangzhou",
            "contentLen": "104",
            "method": "GET",
            "route": "/",
            "serverAddr": "linkbest-brand",
            "serverPort": "80",
            "status": "200",
            "url": "/"
        }
    }
    
]

As you can see, an error occurred in the URL within the first span.

It's not just a single occurrence; many similar traces can be seen on Jaeger.

Image


beyla 2.0.4

OS Alibaba Cloud Linux 3 (Soaring Falcon)

kernel 5.10.134-16.1.al8.x86_64

PHP 7.3.33


DaemonSet.yaml

kind: DaemonSet
apiVersion: apps/v1
metadata:
  name: beyla
  namespace: monitoring
  labels:
    app.kubernetes.io/component: workload
    app.kubernetes.io/instance: beyla
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: beyla
    app.kubernetes.io/part-of: beyla
    app.kubernetes.io/version: 2.0.2
    helm.sh/chart: beyla-1.7.2
spec:
  selector:
    matchLabels:
      app.kubernetes.io/instance: beyla
      app.kubernetes.io/name: beyla
  template:
    metadata:
      creationTimestamp: null
      labels:
        app.kubernetes.io/component: workload
        app.kubernetes.io/instance: beyla
        app.kubernetes.io/managed-by: Helm
        app.kubernetes.io/name: beyla
        app.kubernetes.io/part-of: beyla
        app.kubernetes.io/version: 2.0.2
        helm.sh/chart: beyla-1.7.2
    spec:
      volumes:
        - name: beyla-config
          configMap:
            name: beyla
            defaultMode: 420
        - name: cgroup
          hostPath:
            path: /sys/fs/cgroup
            type: ''
      containers:
        - name: beyla
          image: 'grafana/beyla:2.0.4'
          ports:
            - name: metrics
              hostPort: 9090
              containerPort: 9090
              protocol: TCP
          env:
            - name: BEYLA_CONFIG_PATH
              value: /etc/beyla/config/beyla-config.yml
            - name: BEYLA_KUBE_CLUSTER_NAME
              value: lkb
          volumeMounts:
            - name: beyla-config
              mountPath: /etc/beyla/config
            - name: cgroup
              mountPath: /sys/fs/cgroup
          securityContext:
            privileged: true
      restartPolicy: Always
      terminationGracePeriodSeconds: 30
      dnsPolicy: ClusterFirstWithHostNet
      serviceAccountName: beyla
      serviceAccount: beyla
      hostNetwork: true
      hostPID: true
      securityContext: {}
      schedulerName: default-scheduler

config.yaml

attributes:
  kubernetes:
    enable: true
  select:
    beyla_network_flow_bytes:
      include:
      - k8s.src.owner.type
      - k8s.dst.owner.type
      - direction
discovery:
  exclude_services:
  - exe_path: (envoy|pilot-agent)
  services:
  - k8s_pod_labels:
      instrumentation: beyla
ebpf:
  enable_context_propagation: true
filter:
  application:
    url_path:
      not_match: '{/healthcheck,/metrics,/status,/ready,/status,/health,/health_check,/healthCheck}'
  network:
    k8s_dst_owner_name:
      not_match: '{kube*,*jaeger-agent*,*prometheus*,*promtail*,*grafana-agent*}'
    k8s_src_owner_name:
      not_match: '{kube*,*jaeger-agent*,*prometheus*,*promtail*,*grafana-agent*}'
otel_traces_export:
  endpoint: http://otel-collector-opentelemetry-collector.monitoring.svc.cluster.local:4318
  instrumentations:
  - http
  - redis
  - grpc
  - sql
prometheus_export:
  path: /metrics
  port: 9090
routes:
  unmatched: heuristic
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