skywalking php agent doesn't send data to oap server. The UI doesn't have data. #13039
-
Hello, everyone! My environment: PHP 8.3.17 (cli) (built: Feb 11 2025 22:03:03) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.3.17, Copyright (c) Zend Technologies
with Xdebug v3.3.2, Copyright (c) 2002-2024, by Derick Rethans
with Zend OPcache v8.3.17, Copyright (c), by Zend Technologie php.ini [skywalking_agent]
extension=skywalking_agent.so
skywalking_agent.enable = 1
skywalking_agent.log_level = "DEBUG"
skywalking_agent.reporter_type = "grpc"
skywalking_agent.service_name = "meu-servico"
skywalking_agent.server_addr = "127.0.0.1:11800"
skywalking_agent.instance_name = ${HOSTNAME} Local skywalking-agent installed from git clone https://github.com/apache/skywalking-php.git skywalking_agent.so is active # php -m | grep skywalking
skywalking_agent # php --ri skywalking_agent
skywalking_agent
version => 1.0.0-dev
authors => Apache Software Foundation:jmjoy <[email protected]>:Yanlong He <[email protected]>
Directive => Local Value => Master Value
skywalking_agent.enable => 1 => 1
skywalking_agent.skywalking_version => 8 => 8
skywalking_agent.server_addr => 127.0.0.1:11800 => 127.0.0.1:11800
skywalking_agent.instance_name => no value => no value
skywalking_agent.service_name => meu-servico => meu-servico
skywalking_agent.worker_threads => 0 => 0
skywalking_agent.log_level => DEBUG => DEBUG
skywalking_agent.log_file => /tmp/skywalking-agent.log => /tmp/skywalking-agent.log
skywalking_agent.runtime_dir => /tmp/skywalking-agent => /tmp/skywalking-agent
skywalking_agent.authentication => no value => no value
skywalking_agent.enable_tls => 0 => 0
skywalking_agent.ssl_trusted_ca_path => no value => no value
skywalking_agent.ssl_key_path => no value => no value
skywalking_agent.ssl_cert_chain_path => no value => no value
skywalking_agent.heartbeat_period => 30 => 30
skywalking_agent.properties_report_period_factor => 10 => 10
skywalking_agent.enable_zend_observer => 0 => 0
skywalking_agent.reporter_type => grpc => grpc
skywalking_agent.kafka_bootstrap_servers => no value => no value
skywalking_agent.kafka_producer_config => {} => {}
skywalking_agent.inject_context => 0 => 0
skywalking_agent.standalone_socket_path => no value => no value skywalking-oap, skywalking-ui and elasticsearch installed with docker version: "3.9"
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.17.13
container_name: elasticsearch
restart: unless-stopped
networks:
- skywalker-network
environment:
- discovery.type=single-node
- xpack.security.enabled=false
- bootstrap.memory_lock=true
- ES_JAVA_OPTS=-Xms512m -Xmx512m
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- es_data:/usr/share/elasticsearch/data
ports:
- "9200:9200"
skywalking-oap:
image: apache/skywalking-oap-server:latest
container_name: skywalking-oap
restart: unless-stopped
networks:
- skywalker-network
environment:
SW_STORAGE: elasticsearch
SW_STORAGE_ES_CLUSTER_NODES: elasticsearch:9200
JAVA_OPTS: -Xms512m -Xmx512m
ports:
- "12800:12800" # HTTP
- "11800:11800" # gRPC
extra_hosts:
- "host.docker.internal:host-gateway"
depends_on:
- elasticsearch
skywalking-ui:
image: apache/skywalking-ui:latest
container_name: skywalking-ui
restart: unless-stopped
networks:
- skywalker-network
environment:
SW_OAP_ADDRESS: "http://skywalking-oap:12800"
depends_on:
- skywalking-oap
ports:
- "9000:8080"
networks:
skywalker-network:
external: true
name: skywalker-network
volumes:
es_data: # docker-compose ps
NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS
elasticsearch docker.elastic.co/elasticsearch/elasticsearch:7.17.13 "/bin/tini -- /usr/l…" elasticsearch 2 hours ago Up 2 hours 0.0.0.0:9200->9200/tcp, 9300/tcp
skywalking-oap apache/skywalking-oap-server:latest "bash docker-entrypo…" skywalking-oap 2 hours ago Up 2 hours 0.0.0.0:11800->11800/tcp, 1234/tcp, 0.0.0.0:12800->12800/tcp
skywalking-ui apache/skywalking-ui:latest "bash docker-entrypo…" skywalking-ui 2 hours ago Up 2 hours 0.0.0.0:9000->8080/tcp
OAP is listening the correct ports # docker port skywalking-oap
11800/tcp -> 0.0.0.0:11800
12800/tcp -> 0.0.0.0:12800
# nc -zv 127.0.0.1 11800
Connection to 127.0.0.1 port 11800 [tcp/*] succeeded!
# curl -v http://127.0.0.1:12800
* Trying 127.0.0.1:12800...
* Connected to 127.0.0.1 (127.0.0.1) port 12800
> GET / HTTP/1.1
> Host: 127.0.0.1:12800
> User-Agent: curl/8.7.1
> Accept: */* # tail -f /tmp/skywalking-agent.log
2025-02-16T19:37:36.962364-03:00 INFO skywalking_agent::module: Starting skywalking agent service_name="meu-servico" service_instance="[email protected]" skywalking_version=8 heartbeat_period=30 properties_report_period_factor=10
2025-02-16T19:37:36.963357-03:00 DEBUG skywalking_php_worker: Starting worker...
2025-02-16T19:37:36.963401-03:00 DEBUG skywalking_php_worker: Bind unix stream socket_file="/tmp/skywalking-agent/62e4a0df606bb.sock"
2025-02-16T19:37:36.964503-03:00 DEBUG skywalking_php_worker::reporter::reporter_grpc: Create Endpoint url="http://127.0.0.1:11800"
2025-02-16T19:37:36.964531-03:00 DEBUG skywalking_php_worker::reporter::reporter_grpc: Skywalking TLS info enable_tls=false ssl_trusted_ca_path="" ssl_key_path="" ssl_cert_chain_path=""
2025-02-16T19:37:36.965008-03:00 INFO connect: skywalking_php_worker::reporter::reporter_grpc: Skywalking server connected uri="http://127.0.0.1:11800/"
2025-02-16T19:37:36.965035-03:00 INFO skywalking_php_worker::reporter::reporter_grpc: Worker is ready...
2025-02-16T19:37:36.965271-03:00 DEBUG skywalking_php_worker: Report instance properties props=Properties { inner:
{"Process No.": ["64055"], "OS Name": ["Mac OS X"], "language": ["php"], "hostname": ["KA00081"], "ipv4": ["192.168.0.15", "127.0.0.1", "127.0.2.2", "127.0.2.3", "172.16.0.2"]} }
2025-02-16T19:42:36.966095-03:00 DEBUG skywalking_php_worker: Report instance properties props=Properties { inner: {"Process No.": ["64055"], "OS Name": ["Mac OS X"], "language": ["php"], "hostname": ["KA00081"], "ipv4": ["192.168.0.15", "127.0.0.1", "127.0.2.2", "127.0.2.3", "172.16.0.2"]} }
skywalking-ui But with no data. Example generate log in a GET::endpoint to test, but don't send any data to skywalking-ui. Log::info("Loren ipsum, loren ipsum"); Has anyone experienced this? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
It seems that there is nothing unusual. Check whether the time in the upper right corner of SkyWalking UI is recent, or set |
Beta Was this translation helpful? Give feedback.
-
skywalking-ui conteiner log: Unexpected 4xx health check response: com.linecorp.armeria.client.endpoint.healthcheck.HttpHealthChecker 232 [armeria-common-worker-epoll-2-2] WARN [] - [creqId=baf73993, chanId=4b40e3d8, laddr=172.19.0.2:46256, raddr=skywalking-oap/172.19.0.4:12800][http://skywalking-oap:12800/healthcheck#HEAD] Unexpected 4xx health check response: [EOS, :status=404, content-type=text/plain; charset=utf-8, server=Armeria/1.29.3, date=Mon, 17 Feb 2025 13:53:46 GMT, content-length=35] A 4xx response generally indicates a misconfiguration of the client. Did you happen to forget to configure the HealthCheckedEndpointGroup's client options?
. # curl -X GET "http://localhost:9200/_cat/health?v"
epoch timestamp cluster status node.total node.data shards pri relo init unassign pending_tasks max_task_wait_time active_shards_percent
1739801643 14:14:03 docker-cluster yellow 1 1 46 46 0 0 5 0 - 90.2%
. # docker exec -it skywalking-oap curl -X GET "http://elasticsearch:9200"
{
"name" : "0ebfa61beb23",
"cluster_name" : "docker-cluster",
"cluster_uuid" : "mcUQ96x8R0-1J8F2C11Ykw",
"version" : {
"number" : "7.17.13",
"build_flavor" : "default",
"build_type" : "docker",
"build_hash" : "2b211dbb8bfdecaf7f5b44d356bdfe54b1050c13",
"build_date" : "2023-08-31T17:33:19.958690787Z",
"build_snapshot" : false,
"lucene_version" : "8.11.1",
"minimum_wire_compatibility_version" : "6.8.0",
"minimum_index_compatibility_version" : "6.0.0-beta1"
},
"tagline" : "You Know, for Search"
}
# docker exec -it skywalking-oap curl -X GET "http://elasticsearch:9200/_cat/indices?v"
health status index uuid pri rep docs.count docs.deleted store.size pri.store.size
green open sw_zipkin_span-20250216 AHtXH1xrQ7OmjDahWaf2Xw 5 0 0 0 1.1kb 1.1kb
green open sw_zipkin_span-20250217 mF6aCZ3TQxWrzJB7l-guYg 5 0 0 0 1.1kb 1.1kb
yellow open sw_metrics-all-20250216 veuhlqF2Q8myycDidKm6MQ 1 1 14 163 33.8kb 33.8kb
yellow open sw_metrics-all-20250217 VlsyVJ0ZSM-VBZ2Qx-PZFw 1 1 3 77 64.5kb 64.5kb
green open .geoip_databases gn4yAQ4qSHCna1bnazGsAQ 1 0 37 0 35.5mb 35.5mb
yellow open sw_records-all-20250216 l3JHFPLARi2EtuhZlueXeQ 1 1 0 0 227b 227b
yellow open sw_records-all-20250217 KBXMhAEaRpOleSbcTidhCw 1 1 0 0 227b 227b
green open sw_segment-20250216 gAx4eO2nQZq3vCykA39fhQ 5 0 0 0 1.1kb 1.1kb
green open sw_browser_error_log-20250217 w9PwpRe8QxCOUbLvRYC6Hg 5 0 0 0 1.1kb 1.1kb
green open sw_segment-20250217 zY-BcsA9RUabytR7h9ZgiA 5 0 0 0 1.1kb 1.1kb
yellow open sw_management O6PrLvS0Qw2BkrVqGDvepQ 1 1 117 0 334.1kb 334.1kb
green open sw_browser_error_log-20250216 YmFA2Ha3S66Y4-sQU6WW-Q 5 0 0 0 1.1kb 1.1kb
green open sw_log-20250217 zx2OvTqLTvq84S-jfyWXew 5 0 0 0 1.1kb 1.1kb
green open sw_log-20250216 K01txfcOQcuc8MqoTB5Qvw 5 0 0 0 1.1kb 1.1kb
|
Beta Was this translation helpful? Give feedback.
-
I had to leave for Plan B. With Laravel running locally and running via I think that's why a new php service appeared in the Activity Monitor in addition to php-fpm when it started Laravel App via But now, with the plan B, everything is working! @jmjoy Thank you so much for your attention! My project in GitHub to help anyone who needs some references in how to setup Skywalking in a Laravel/PHP application. |
Beta Was this translation helpful? Give feedback.
I had to leave for Plan B.
I created a new Laravel application with PHP-FPM and Nginx, this time via docker and added oap, ui and elasticsearch in the same docker-compose. And I installed the agent via Dockerfile.
With Laravel running locally and running via
php artisan serve
, the agent did not capture anything.Maybe because the
artisan serve
use his own built-in php.I think that's why a new php service appeared in the Activity Monitor in addition to php-fpm when it started Laravel App via
artisan serve
.But now, with the plan B, everything is working!
@jmjoy Thank you so much for your attention!
My project in GitHub to help anyone who needs some references in how to setup Skywalking in…