Nginx: What is this figure in error log mean ? *26924830 - nginx

I found this message in error log. I know what this whole error message means, but I couldn't find the information about '*26924830'.
error message below.
00 [warn] 3051#0: *26924830 a client request body is buffered to a temporary file /var/lib/nginx/tmp/client_body/

This answer contains an explanation of the nginx error log format, according to that you're looking at the connection id, which is ephemeral and probably only useful for correlating with other log messages.

Related

How to log "x-kong-proxy-latency" in custom log formatter in Kong

I would like to log values of "x-kong-proxy-latency" and "x-kong-upstream-latency" headers to Kong log. How can I get access to those value in log_format?
KONG_PROXY_ACCESS_LOG: /dev/stdout custom_formatter
KONG_NGINX_HTTP_LOG_FORMAT: custom_formatter 'xkpl $$x_kong_proxy_latency'
This gets me an error:
2022-11-20 00:13:18 Run with --v (verbose) or --vv (debug) for more details
2022-11-20 00:14:20 Error: could not prepare Kong prefix at /usr/local/kong: nginx configuration is invalid (exit code 1):
2022-11-20 00:14:20 nginx: [emerg] unknown "x_kong_proxy_latency" variable
2022-11-20 00:14:20 nginx: configuration file /usr/local/kong/nginx.conf test failed
Now, what is the correct way to get this data in a variable?
As the error implied, x_kong_proxy_latency is not a variable nginx knows by default.
x-kong-proxy-latency and x-kong-upstream-latency are HTTP headers that are sent to the client indicating kong latency and upstream latency respectively
Since these headers are created by Kong to send t clients, we can use $sent_http_ nginx's prefix to inject the header into access_log, for example:
KONG_PROXY_ACCESS_LOG:/dev/stdout latency
KONG_NGINX_HTTP_LOG_FORMAT:latency '$$sent_http_x_kong_proxy_latency $$sent_http_x_kong_upstream_latency'
will inject the value of both headers you're looking for.
In case you are looking for more configs, you can look at the nginx document here

How can I stop nginx failling over when openresty throws runtime error deploying cert

We are using openresty and the lua-resty-auto-ssl package to generate certificates from Lets Encrypt but lately the server keeps falling over. Im guessing its triggered when a certificate trys to auto renew as generating a certificate for first time works fine ... the error we are seeing is
2019/05/12 08:25:24 [error] 2623#2623: *1024227 lua entry thread aborted: runtime error: ...sty/luajit/share/lua/5.1/resty/auto-ssl/servers/hook.lua:40: assertion failed!
stack traceback:
coroutine 0:
[C]: in function 'assert'
...sty/luajit/share/lua/5.1/resty/auto-ssl/servers/hook.lua:40: in function 'server'
.../local/openresty/luajit/share/lua/5.1/resty/auto-ssl.lua:99: in function 'hook_server'
content_by_lua(nginx.conf:194):2: in function <content_by_lua(nginx.conf:194):1>, client: 127.0.0.1, server: , request: "POST /deploy-cert HTTP/1.1", host: "127.0.0.1:8999"
From what I can see in the error it is failing to assert something when trying to deploy the cert which could be any of 4 things
assert(params["domain"])
assert(params["fullchain"])
assert(params["privkey"])
assert(params["expiry"])
Im a bit stuck to what I can do, its no good having the server dropping out on use. Thats the last error thats reported before the server goes offline so im guessing thats the cause? but not 100% sure.
Is there anywhere I can look to find out more information what causes the crash. Im new to nginx/openresty so fumbling my round a bit. Has anyone come across a similar issue?
Wrap it all in a function and call it with pcall or xpcall and add some logic to deal with the error.

Frame size (352518912) larger than max length (15728640)! Exception while running sstableloader

I’m trying to migrate data between two clusters on different networks. Ports: 7001,7199,9046,9160 are open between them. But port:7000 is not open. When I run sstableloader command, got the following exception.
Command:
:/a/cassandra/bin# ./sstableloader -d 192.168.98.99/abc/cassandra/data/apps/ads-0fdd9ff0a7d711e89107ff9c3da22254
Error/Exception:
Could not retrieve endpoint ranges:
org.apache.thrift.transport.TTransportException: Frame size (352518912) larger than max length (15728640)!
java.lang.RuntimeException: Could not retrieve endpoint ranges:
at org.apache.cassandra.tools.BulkLoader$ExternalClient.init(BulkLoader.java:342)
at org.apache.cassandra.io.sstable.SSTableLoader.stream(SSTableLoader.java:156)
at org.apache.cassandra.tools.BulkLoader.main(BulkLoader.java:109)
Caused by: org.apache.thrift.transport.TTransportException: Frame size (352518912) larger than max length (15728640)!
at org.apache.thrift.transport.TFramedTransport.readFrame(TFramedTransport.java:137)
at org.apache.thrift.transport.TFramedTransport.read(TFramedTransport.java:101)
at org.apache.thrift.transport.TTransport.readAll(TTransport.java:86)
at org.apache.thrift.protocol.TBinaryProtocol.readAll(TBinaryProtocol.java:429)
at org.apache.thrift.protocol.TBinaryProtocol.readI32(TBinaryProtocol.java:318)
at org.apache.thrift.protocol.TBinaryProtocol.readMessageBegin(TBinaryProtocol.java:219)
at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:69)
at org.apache.cassandra.thrift.Cassandra$Client.recv_describe_partitioner(Cassandra.java:1368)
at org.apache.cassandra.thrift.Cassandra$Client.describe_partitioner(Cassandra.java:1356)
at org.apache.cassandra.tools.BulkLoader$ExternalClient.init(BulkLoader.java:304)
... 2 more
In yaml file, thrift_framed_transport_size_in_mb: is set to 15. So I have increased its value to 40. Even after increasing the thrift_framed_transport_size_in_mb: in yaml file, I’m getting the same error.
What could be the solution for this. Can somebody please help me with this??
This was the initial error of 2.1.x sstableloader headaches on a secured cluster.
in our case we first forgot to add:
-tf org.apache.cassandra.thrift.SSLTransportFactory
along with the keystore/truststore params.
Then we ran into this:
Cassandra sstableloader with ssl : PKIX error
Then it worked. This was for both internode and client encryption enabled cluster

How to make HTTP stream from RTSP

I have LRP camera which produces RTSP stream in rtsp://172.16.4.6. I use VLC to see this streaming. Then I need to use ALPR Daemon for passing stream in http:// to recognize registration plates captured by camera. According to documentation in should be only http://. So using VLC I am trying to convert/transcode it to proper format. What is the problem, that I am not familiar with this field and have no time to study basic.
I installed apache2 on ubuntu that has port 80 and http://127.0.0.1 address. Then I tried to use some of approaches from documentation https://wiki.videolan.org/Documentation:Streaming_HowTo/Command_Line_Examples/ , then I tried $vlc -I http rtsp://172.16.4.6:554/HighResolutionVideo :sout='#transcode{vcodec=MJPG,vb=800,fps=5}:std{access=http{mime=multipart/x-mixed-repace},mux=mpjpeg,dst=127.0.0.1:80/go.mjpg,delay=0}'
But then I have this error log:
[00007f5fb0001268] core access out error: socket bind error: Permission denied
[00007f5fb0001268] core access out error: cannot create socket(s) for HTTP host
[00007f5fb0001268] access_output_http access out error: cannot start HTTP server
[00007f5fb0003388] stream_out_standard stream out error: no suitable sout access module for `http{mine=multipart/x-mixed-repace}/mpjpeg://172.0.0.1:80/go.mjpg'
[00007f5fb0000b18] core stream output error: stream chain failed for `transcode{vcodec=MJPG,vb=800,fps=5}:std{access=http{mine=multipart/x-mixed-repace},mux=mpjpeg,dst=172.0.0.1:80/go.mjpg,delay=0}'
[00007f5fb42929f8] core input error: cannot start stream output instance, aborting
[00007f5fb0003388] access_output_http access out: Consider passing --http-host=IP on the command line instead.
[00007f5fb0003388] core access out error: socket bind error: Permission denied
[00007f5fb0003388] core access out error: cannot create socket(s) for HTTP host
[00007f5fb0003388] access_output_http access out error: cannot start HTTP server
[00007f5fb0001268] stream_out_standard stream out error: no suitable sout access module for `http{mine=multipart/x-mixed-repace}/mpjpeg://172.0.0.1:80/go.mjpg'
[00007f5fb0000b18] core stream output error: stream chain failed for `transcode{vcodec=MJPG,vb=800,fps=5}:std{access=http{mine=multipart/x-mixed-repace},mux=mpjpeg,dst=172.0.0.1:80/go.mjpg,delay=0}'
[00007f5fb42929f8] core input error: cannot start stream output instance, aborting
I think you have a typo in repace, Try this:
--sout #transcode{vcodec=MJPG,venc=ffmpeg{strict=1}}:standard{access=http{mime=multipart/x-mixed-replace;boundary=--7b3cc56e5f51db803f790dad720ed50a},mux=mpjpeg,dst=:80/go.mjpg}

Dcm4che Error Unrecognized PDU

I have the following error in a data retrieve on a Dcm4che Server:
2015-04-27 14:55:16,463 ERROR -> (TCPServer-1-2) [org.dcm4cheri.server.ServerImpl] org.dcm4che.net.PDUException: Unrecognized PDU[type=71, length=14113
95360]
org.dcm4che.net.PDUException: Unrecognized PDU[type=71, length=1411395360]
at org.dcm4cheri.net.FsmImpl$2.parse(FsmImpl.java:1051)
at org.dcm4cheri.net.FsmImpl.read(FsmImpl.java:512)
at org.dcm4cheri.net.AssociationImpl.accept(AssociationImpl.java:287)
at org.dcm4cheri.server.DcmHandlerImpl.handle(DcmHandlerImpl.java:248)
at org.dcm4cheri.server.ServerImpl.run(ServerImpl.java:288)
at org.dcm4cheri.util.LF_ThreadPool.join(LF_ThreadPool.java:174)
at org.dcm4cheri.util.LF_ThreadPool$1.run(LF_ThreadPool.java:221)
at java.lang.Thread.run(Thread.java:662)
Can somebody help me please?
Likely a mismatch in aet name or settings.
Imagine your dcmrcv server as a house. It has a mailbox address that is just listening for stuff.
Now when you use say dcmsnd from somewhere else you must make sure it sends its information to the correct address. If you get ip and port right you may see a blurb come out on dcmrcv but it won't accept it.
Simplify your test as much as possible. Here is a very simple dcmrcv:
dcmrcv TRANSFERTEST#10.1.50.75:104 -dest "C:\Temp"
call this from another cmd prompt:
dcmsnd CONI_STORAGE#dev.capsurecloud.com:11012 "C:\modalities\xa" -L WST
Note: That WST is not needed, but is the aet name of my application. Read the confluence documentation for more arguments.
Most the time i see your error is becuase the aetname#ip is mismatch or one side is sending or listening for tls and the other side doesn't match.

Resources