Comments (8)
Thanks, I fixed it before I saw your offer. Anyway, please try the PR and see if it works for you.
from zephyr.
Hi @mustafaabdullahk! We appreciate you submitting your first issue for our open-source project. 🌟
Even though I'm a bot, I can assure you that the whole community is genuinely grateful for your time and effort. 🤖💙
from zephyr.
@mustafaabdullahk Is there an easy way to replicate the issue? To me it looks like we might run out of network buffers at some point. Are you running plain http_sample as you seem to have the prometheus support enabled. What does your prj.conf file look like?
from zephyr.
@jukkar Can be used mustafaabdullahk:mustafaabdullahk/prometheus-library branch directly. I did use samples/net/sockets/http_server prj.conf just one diff. I did add just CONFIG_PROMETHEUS.
# General config
CONFIG_MAIN_STACK_SIZE=3072
CONFIG_SHELL=y
CONFIG_LOG=y
CONFIG_ENTROPY_GENERATOR=y
CONFIG_TEST_RANDOM_GENERATOR=y
CONFIG_INIT_STACKS=y
CONFIG_POSIX_MAX_FDS=32
CONFIG_POSIX_API=y
CONFIG_FDTABLE=y
CONFIG_NET_SOCKETS_POLL_MAX=32
CONFIG_REQUIRES_FULL_LIBC=y
CONFIG_HEAP_MEM_POOL_SIZE=2048
# Prometheus
CONFIG_PROMETHEUS=y
# Eventfd
CONFIG_EVENTFD=y
# Networking config
CONFIG_NETWORKING=y
CONFIG_NET_IPV4=y
CONFIG_NET_IPV6=y
CONFIG_NET_TCP=y
CONFIG_NET_SOCKETS=y
CONFIG_NET_CONNECTION_MANAGER=y
CONFIG_NET_SHELL=y
CONFIG_NET_LOG=y
CONFIG_NET_DHCPV4=y
# JSON
CONFIG_JSON_LIBRARY=y
# HTTP parser
CONFIG_HTTP_PARSER_URL=y
CONFIG_HTTP_PARSER=y
CONFIG_HTTP_SERVER=y
CONFIG_HTTP_SERVER_WEBSOCKET=y
CONFIG_HTTP_SERVER_MAX_CONTENT_TYPE_LENGTH=128
# Network buffers
CONFIG_NET_PKT_RX_COUNT=16
CONFIG_NET_PKT_TX_COUNT=16
CONFIG_NET_BUF_RX_COUNT=128
CONFIG_NET_BUF_TX_COUNT=128
CONFIG_NET_CONTEXT_NET_PKT_POOL=y
# IP address options
CONFIG_NET_IF_UNICAST_IPV6_ADDR_COUNT=3
CONFIG_NET_IF_MCAST_IPV6_ADDR_COUNT=4
CONFIG_NET_MAX_CONTEXTS=32
CONFIG_NET_MAX_CONN=32
# Network address config
CONFIG_NET_CONFIG_SETTINGS=y
CONFIG_NET_CONFIG_NEED_IPV4=y
CONFIG_NET_CONFIG_NEED_IPV6=y
CONFIG_NET_CONFIG_MY_IPV4_ADDR="192.0.2.1"
CONFIG_NET_CONFIG_PEER_IPV4_ADDR="192.0.2.2"
CONFIG_NET_CONFIG_MY_IPV4_GW="192.0.2.2"
CONFIG_NET_CONFIG_MY_IPV6_ADDR="2001:db8::1"
CONFIG_NET_CONFIG_PEER_IPV6_ADDR="2001:db8::2"
# TLS configuration
CONFIG_MBEDTLS=y
CONFIG_MBEDTLS_BUILTIN=y
CONFIG_MBEDTLS_ENABLE_HEAP=y
CONFIG_MBEDTLS_HEAP_SIZE=60000
CONFIG_MBEDTLS_SSL_MAX_CONTENT_LEN=2048
CONFIG_NET_SOCKETS_SOCKOPT_TLS=y
CONFIG_NET_SOCKETS_TLS_MAX_CONTEXTS=6
CONFIG_TLS_CREDENTIALS=y
CONFIG_TLS_MAX_CREDENTIALS_NUMBER=5
# Networking tweaks
# Required to handle large number of consecutive connections,
# e.g. when testing with ApacheBench.
CONFIG_NET_TCP_TIME_WAIT_DELAY=0
from zephyr.
I took your branch and I am assuming you mean the samples/net/prometheus
sample application, and not the http-server
one, as the latter does not have /metrics
resource handler in it?
By using the prometheus sample, I can connect to /metrics
but it seems to work just fine with simple curl -o /tmp/file.out http://192.0.2.1/metrics
command. How are you querying the data from the server?
from zephyr.
Yes i missed point, mean samples/net/prometheus. Can you see following content:
my curl output:
excepted output:
http_request_counter{http_request="request_count"} 6
wireshark packet detail:
last git activities:
from zephyr.
Thanks, I could replicate the issue, investigating...
from zephyr.
Your welcome, i apply some patch for solve issue and working. If you want to i create pull request for that, I can.
from zephyr.
Related Issues (20)
- RTC RV3028 clock output disabled by enabling alarm/update callback
- NXP's IMX RT1010 triggers assert on SPI Loopback test when EDMA enabled HOT 3
- bluetooth: audio: race hazard in bt_bap_unicast_client_discover() HOT 5
- spi: stm32 spi slave spi_read should return immediately after a spi transaction. HOT 1
- Reinit Systick when using S2RAM
- Automatically include references to a sample's relevant APIs
- intel_adsp: test_colors fails on tests/subsys/logging/log_output/logging.output.*
- Bluetooth: Controller: ISO: Providing incorrect broadcast code asserts instead of returning MIC failure
- [Backport v3.7-branch] Failed to backport #77008
- ESP32C3: Inconsistent flash erase times in ESP32-C3-MINI-1 (ESP32-C3FN4) modules [zephyr-v3.6.99] HOT 4
- [Backport v3.7-branch] Failed to backport #77054
- multi_heap: support for realloc HOT 1
- SCSI Read Capacity reports wrong capacity when used with USB Mass storage device HOT 1
- Devices using USB Mass storage function sometimes crash upon USB insertion, or during files manipulation from a host computer HOT 1
- RTC RV3028 driver does not disable minutes alarm correctly
- TFM: Nordic pinctrl consumers broken
- Sample USB-C Sink Not Working in Zephyr v3.7.0 on weact_stm32g431_core HOT 6
- Unaligned 32-bit reads following casts on dns_socket_dispatcher::local_addr (Cortex-M0) HOT 4
- off-by-one error on month counting in rtc rv8263 driver HOT 2
- drivers: spi: stm32: Broken device power management on SPI bus HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zephyr.