Realm Object Servers "Token expired warnings" normal? - react-native

After running the Realm Object Server for a few days with 1k users I find a lot of "Token expired" warnings in the logs like the following:
...
info: [http] 174.214.2.XXX - POST /auth HTTP/1.1 200 912 - 44.937 ms
info: [http] 127.0.0.1 - GET /realms/files/XXXXXXXXXXXXXXXX HTTP/1.1 200 73 - 19.172 ms
error: [sync] Sync Connection[41887]: Session[2]: Token expired (signed_user_token='...+1RFAMxHDevcmAl1ywSAAWnGS39w==').
error: [sync] Sync Connection[41887]: Session[2]: Token expired (message_type='bind', signed_user_token='...+1RFAMxHDevcmAl1ywSAAWnGS39w==').
info: [http] 174.214.2.XXX - POST /auth HTTP/1.1 200 912 - 48.745 ms
info: [http] 127.0.0.1 - GET /realms/files/XXXXXXXXXXXXXXXX HTTP/1.1 200 43 - 7.368 ms
...
Is that normal? Is it save to ignore? because I donĀ“t see a "Connection closed" or "terminated" error after these?

Related

API Umbrella is not accessible in docker giving 502 error

I have set up API Umbrella in my Ubuntu 20 cloud vm.
Try to access but got 502 Bad gateway like in here:
Obviously, the routing is a failure for some reason.
The output of /var/log/api-umbreall/nginx/current is the following:
2022-09-01T06:08:19.57992 starting nginx...
2022-09-01T06:08:27.48168 2022/09/01 06:08:27 [error] 319#0: *13 [lua] elasticsearch_setup.lua:106: create_aliases(): failed to create elasticsearch index: Unsuccessful response: {"error":{"root_cause":[{"type":"index_already_exists_exception","reason":"already exists","index":"api-umbrella-logs-v1-2022-09"}],"type":"index_already_exists_exception","reason":"already exists","index":"api-umbrella-logs-v1-2022-09"},"status":400}, context: ngx.timer
2022-09-01T06:21:45.17055 2022/09/01 06:21:45 [warn] 318#0: *39756 using uninitialized "x_api_umbrella_request_id" variable while logging request, client: 192.241.213.X, server: mydomain.city, request: "GET / HTTP/1.1", host: "150.230.240.y:443"
2022-09-01T06:32:42.70713 2022/09/01 06:32:42 [error] 318#0: *72162 connect() failed (111: Connection refused) while connecting to upstream, client: 185.14.196.Z, server: mydomain.city, request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:14009/", host: "mydomain.city"

Error: read ECONNRESET && node js do not make any post request

i have this issue in my API my node js do not make any post request
that what is shown in console
GET /api/user 200 37.328 ms - 195
GET /api/user 200 5.662 ms - 195
POST /api/category - - ms - -
POST /api/user/register - - ms - -
POST /api/user/login - - ms - -
like you see the all request but in the POST is not working I have this issue in POSTMAN when I make a post request
I don`t think that issue is cuz of code cuz I have build many post request
when I make a restart that message shown in POSTMAN console
Error: read ECONNRESET
Request Headers
x-auth-token: this is my token
Content-Type: application/json
User-Agent: PostmanRuntime/7.29.0
Accept: */*
Postman-Token: 2b4d5bc9-8bfc-4dc5-8608-24666dc5e754
Host: localhost:3000
Accept-Encoding: gzip, deflate, br
Connection: keep-alive

Gatling: WebSocketHandshakeException: Invalid handshake response getStatus: 400 Bad Request

I'm trying to open ws connection, but get the error:
val openConnection = exec( ws("Connect -> WS").wsName("user").connect("wss://socket.develop.test.com?access_token=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9"))
Then, I get:
09:49:53.343 [DEBUG] i.g.h.c.i.DefaultHttpClient - Installing SslHandler for wss://socket.develop.test.com?access_token=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9
09:49:53.381 [DEBUG] i.n.h.s.u.InsecureTrustManagerFactory - Accepting a server certificate: CN=Kubernetes Ingress Controller Fake Certificate, O=Acme Co
09:49:53.418 [DEBUG] i.n.h.c.h.w.WebSocketClientHandshaker13 - WebSocket version 13 client handshake key: YndmXwIGgZseWyRlmXBoyw==, expected response: H2YGNn6p+DyLyudnc1JCluHjj7E=
09:49:53.419 [DEBUG] i.g.h.c.i.WebSocketHandler - ctx.write msg=DefaultFullHttpRequest(decodeResult: success, version: HTTP/1.1, content: EmptyByteBufBE)
GET ?access_token=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9
HTTP/1.1
accept: */*
upgrade: websocket
connection: upgrade
sec-websocket-key: YndmXwIGgZseWyRlmXBoyw==
host: socket.develop.test.com
origin: https://socket.develop.test.com
sec-websocket-version: 13
09:49:53.423 [DEBUG] i.n.h.s.SslHandler - [id: 0xfa53644a, L:/192.168.150.134:54082 - R:socket.develop.test.com/78.47.16.48:443] HANDSHAKEN: TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
09:49:53.450 [DEBUG] i.g.h.c.i.WebSocketHandler - Read msg=HttpObjectAggregator$AggregatedFullHttpResponse(decodeResult: success, version: HTTP/1.1, content: CompositeByteBuf(ridx: 0, widx: 163, cap: 163, components=1))
HTTP/1.1 400 Bad Request
Server: openresty/1.15.8.1
Date: Tue, 10 Mar 2020 06:49:53 GMT
Content-Type: text/html
Content-Length: 163
Connection: close
09:49:53.452 [DEBUG] i.g.h.c.i.WebSocketHandler - Crash
io.netty.handler.codec.http.websocketx.WebSocketHandshakeException: Invalid handshake response getStatus: 400 Bad Request
at io.netty.handler.codec.http.websocketx.WebSocketClientHandshaker13.verify(WebSocketClientHandshaker13.java:267)
In gatling.conf, I set also:
enableSni = false
useOpenSsl = false
enableHostnameVerification = false
If I try to open connection with any WS clients like SmartWebsocketClient - everything is ok, but by means of gatling I can't to open connection. Any ideas to fix it?
wss://domain?access_token... is not a valid URL. The path component must start with a / and not a ?. This means that the request is invalid which can explain the response of 400 Bad Request.
The URL must be at least wss://domain/?access_token... (i.e. a / before the ?) but maybe the rest of the URL is unexpected by the server too. Please check the actual requirements of the server.
This is a bug in Netty that doesn't properly compute WebSocket handshake request url when path is empty.
I've just contributed a patch: https://github.com/netty/netty/pull/10095.
Sibling issue in Gatling: https://github.com/gatling/gatling/issues/3876

Written only dash in apache access log

A normal log looks like this:
111.111.111.111 222.222.222.222 - - [06/Jun/2017:02:19:00 +0900] "GET /monitor/l7check.nhn HTTP/1.1" 200 4 1222 "-" "-"
but some log looks like this:
111.111.111.111 333.333.333.333 - - [06/Jun/2017:02:18:58 +0900] "-" 408 - 13 "-" "-"
I can't understand the meaning of this log.
Why does it have only a 'dash' instead of a 'get URL'?
Is it possible to log to a URL without requesting a URL?
https://www.rfc-editor.org/rfc/rfc7231#section-6.5.7
6.5.7. 408 Request Timeout
The 408 (Request Timeout) status code indicates that the server did not receive a complete request message within the time that it was prepared to wait. A server SHOULD send the "close" connection option (Section 6.1 of [RFC7230]) in the response, since 408 implies that the server has decided to close the connection rather than continue waiting. If the client has an outstanding request in transit, the client MAY repeat that request on a new connection.
So, the client connected, but did not send any HTTP request. The server waited, and eventually closed the connection.

Getting Service Insight to connect to Management Service

My OS is a Windows 2012 Essentials.
I installed NServiceBus 4 using the installer, then installed Service Insight.
Accepted the default settings.
When I start up Service Insight, there is an error about connecting to the management service. I've tried putting in http://localhost:3333 but that errors out to a 404. I've verified that the service "particular management" is running.
EDIT
As per Hadi's instructions, I've pasted the url he listed: http://localhost:33333/api into the Connect to Management Service -> Service URL text box, but it still has a 404 not found error. When I try putting the URL into google chrome, I also get a 404 (with graphics courtesy of the oatmeal).
I've verified that a service named Particular Management is running. The description of the service is Particular Management Service for NServiceBus (Version 4.0.5).
I've ran the installer again to get to the modify/repair/remove options and verified in the modify option that the management service is installed.
Is there supposed to be a different service called Management Service? Is this maybe an issue introduced with version 4.0.5?
EDIT 2
I've appended the extra / to the end of the url, still no dice. This here is the logging information.
2013-10-11 09:15:58,488 - [INFO ] - IManagementService - HTTP GET http://localhost:33333/api//
2013-10-11 09:15:58,501 - [DEBUG] - IManagementService - HTTP Status NotFound (404) (http://localhost:33333/api//http://localhost:33333/api)
2013-10-11 09:15:58,506 - [DEBUG] - IManagementService - Response Header: Transfer-Encoding : chunked
2013-10-11 09:15:58,507 - [DEBUG] - IManagementService - Response Header: X-Particular-Version : 1.0.0-unstable122
2013-10-11 09:15:58,508 - [DEBUG] - IManagementService - Response Header: Cache-Control : private, max-age=300, must-revalidate
2013-10-11 09:15:58,509 - [DEBUG] - IManagementService - Response Header: Content-Type : text/html
2013-10-11 09:15:58,529 - [DEBUG] - IManagementService - Response Header: Date : Fri, 11 Oct 2013 14:15:58 GMT
2013-10-11 09:15:58,533 - [DEBUG] - IManagementService - Response Header: Server : Microsoft-HTTPAPI/2.0
2013-10-11 09:15:58,536 - [ERROR] - IManagementService - Error executing the request: , Status code is NotFound
You need the slash at the end:
http://localhost:33333/api/
The Url to Service Control (a.k.a Management Service) also needs /api, e.g. http://localhost:33333/api (you missed a 3?). At the end of the day, it is also a NServiceBus host process, so you need to check and make sure it is actually running (using Task Manager, or Services).