Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

rest_api_httpd unit test

15 views
Skip to first unread message

Yotam Medini

<yotam.medini@gmail.com>
unread,
Feb 28, 2025, 7:38:09 PMFeb 28
to seastar-dev
In a docker based in seastar's docker/dev/Dockerfile
I successfully built seastar's
  tests/unit/rest_api_httpd.cc
When I run it gives some warnings:

# ./rest_api_httpd -c 2  
WARNING: unable to mbind shard memory; performance may suffer: Operation not permitted
INFO  2025-02-28 23:07:00,776 seastar - Reactor backend: linux-aio
WARN  2025-02-28 23:07:00,777 seastar - Creation of perf_event based stall detector failed: falling back to posix timer: std::system_error (error system:1, perf_event_open() failed: Operation not permitted)
WARNING: unable to mbind shard memory; performance may suffer: Operation not permitted
WARN  2025-02-28 23:07:00,799 seastar - Creation of perf_event based stall detector failed: falling back to posix timer: std::system_error (error system:1, perf_event_open() failed: Operation not permitted)
10000

It is still running, but is it OK ?
I "consulted" with tests/unit/json2code_test.py
that actually runs this server.

Trying to run some curl REST-API requests,
did not produce meaningful results
root@45d14e7fc9c9:lib 47:# curl http://localhost:10000/hello/world
{"message": "Not found", "code": 404}root@45d14e7fc9c9:lib 48:#
root@45d14e7fc9c9:lib 48:# curl -X GET http://localhost:10000/hello/world/myv1/myv2?query_enum=MyVal
{"var1": "/myv1", "var2": "/myv2", "enum_var": "Unknown"}root@45d14e7fc9c9:lib 49:#
root@45d14e7fc9c9:lib 49:# curl -X POST -H "Content-Type: application/json" -d '{"message": "Hello, Seastar!"}' http://localhost:10000/hello/world/myv1/myv2
{"message": "Not found", "code": 404}

Any hints - how to do some successful set/get REST-API requests ?

Dor Laor

<dor@scylladb.com>
unread,
Mar 2, 2025, 4:50:15 AMMar 2
to Yotam Medini, seastar-dev
On Sat, Mar 1, 2025 at 2:38 AM Yotam Medini <yotam....@gmail.com> wrote:
In a docker based in seastar's docker/dev/Dockerfile
I successfully built seastar's
  tests/unit/rest_api_httpd.cc
When I run it gives some warnings:

# ./rest_api_httpd -c 2  
WARNING: unable to mbind shard memory; performance may suffer: Operation not permitted
INFO  2025-02-28 23:07:00,776 seastar - Reactor backend: linux-aio
WARN  2025-02-28 23:07:00,777 seastar - Creation of perf_event based stall detector failed: falling back to posix timer: std::system_error (error system:1, perf_event_open() failed: Operation not permitted)
WARNING: unable to mbind shard memory; performance may suffer: Operation not permitted
WARN  2025-02-28 23:07:00,799 seastar - Creation of perf_event based stall detector failed: falling back to posix timer: std::system_error (error system:1, perf_event_open() failed: Operation not permitted)
10000

It is still running, but is it OK ?

I think so, you run w/o root permission
 

I "consulted" with tests/unit/json2code_test.py
that actually runs this server.

Trying to run some curl REST-API requests,
did not produce meaningful results
root@45d14e7fc9c9:lib 47:# curl http://localhost:10000/hello/world
{"message": "Not found", "code": 404}root@45d14e7fc9c9:lib 48:#
root@45d14e7fc9c9:lib 48:# curl -X GET http://localhost:10000/hello/world/myv1/myv2?query_enum=MyVal
{"var1": "/myv1", "var2": "/myv2", "enum_var": "Unknown"}root@45d14e7fc9c9:lib 49:#
root@45d14e7fc9c9:lib 49:# curl -X POST -H "Content-Type: application/json" -d '{"message": "Hello, Seastar!"}' http://localhost:10000/hello/world/myv1/myv2
{"message": "Not found", "code": 404}

Any hints - how to do some successful set/get REST-API requests ?


This example is raw, best to debug/trace  ;)
 

--
You received this message because you are subscribed to the Google Groups "seastar-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to seastar-dev...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/seastar-dev/107710a4-e2d7-493f-a328-b732606f811cn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages