Missing mandatory element error in the uv4l streaming server - raspberry-pi

I'm trying to get the RPi streaming video to Janus server over the internet architecture.
Firstly, I have installed and configured the UV4L streaming server in the RPi zero, just like the linux project mentioned, and the ip:port/stream is working perfectly fine, and i can rtc the video in local network.
Now, I need the communication to happen over internet, so I have a janus server setup in the server.
In the RPi UV4L server, I first wanted to try the stream to the public Janus server first, so I tried doing it using the "Join the room with janus", but when I click start, I get logs
Oct 27 04:52:52 DevIoT uv4l[7990]: <notice> [server] HTTP/HTTPS Streaming & WebRTC Signalling Server v1.1.125 built on Sep 5 2019
Oct 27 04:52:52 DevIoT uv4l[7990]: <warning> [server] SSL is not enabled for the Streaming Server. Using unsecure HTTP.
Oct 27 04:52:52 DevIoT uv4l[7990]: <notice> [core] Streaming Server loaded!
Oct 27 04:52:52 DevIoT uv4l[7990]: <warning> [core] Cannot create /dev/video0 because file already exists
Oct 27 04:52:52 DevIoT uv4l[7990]: <notice> [core] Registering device node /dev/video1
Oct 27 04:52:52 DevIoT uv4l[7990]: <notice> [server] Web Streaming Server listening on port 8080
Oct 27 04:53:22 DevIoT uv4l[7990]: <notice> [webrtc] WebRTC Renderer extension successfully loaded
Oct 27 04:53:22 DevIoT uv4l[7990]: <notice> [server] WebRTC, Signalling Server and STUN Server extensions successfully loaded
Oct 27 04:53:26 DevIoT uv4l[7990]: <warning> [server] Missing mandatory element (admin_key)
Oct 27 04:53:33 DevIoT uv4l[7990]: <warning> [server] Janus session error: Missing mandatory element (admin_key)
Oct 27 04:53:33 DevIoT uv4l[7990]: <notice> [server] Waiting for 3 seconds before reconnecting to https://janus.conf.meetecho.com...
Please tell me how to resolve it? or What I'm doing wrong here? Or any alternative solutions, I need the RTC from rpi to a public server.

Related

Cannot access apache server from foreign ip address

I have a site running on my computer using Apache 2.4 which I can easily access by using my local ipv4 address and respective port 80. The port 80 is bound to port 22*** using portmap.io and is configured with OpenVpn/tcp on my computer.I have allowed access to Apache HTTP server and Apache Server Monitor through the firewall.I have also increased keepAlive timeout in apche server to 600s, max connections.i have Listen 80 and LISTEN 22*** and ServerName as http://awm-22***.portmap.host:22*** in my httpd.conf file.You can look into for more options here.Apache handler configuration
I am using PHP as backend language.
Since the port 80 is bound to port 22470, whenever I try access my site from another device(which also uses the same wifi network as the computer running the server) using the local ipv4 address of my computer(which is running the server) and port 80 i.e
192.168..:80, it automatically redirects the browser to 192.168..:22*** and I can access my site with no difficuty. Access log in apcache server:
192.168.**.** - - [15/Dec/2022:10:08:02 +0530] "GET /abc%20xyz%20klm/ HTTP/1.1" 200 12049
192.168.**.** - - [15/Dec/2022:10:08:02 +0530] "GET /SPR/b/get_captcha.php?rand=29842778 HTTP/1.1" 200 4057
But when I try access the same site from another device(which also uses the same wifi network as the computer running the server) using the ipv4 address provided by OpenVpn to my computer(which is running the server):10.9..* and port 80 i.e 10.9..*:80, it shows TOOK TOO LONG TO RESPPOND error on the browser.But the browser's header has the following:
http://10.9.**.**4:22470/abc%20xyz%20klm/
Then why is it not loading the page. No log in apache access log file.
When I try access the same site from another device(which also uses the same wifi network as the computer running the server) using the url provided to me by portmap.io i.e: http://awm-22***.portmap.host:22***/,
The server takes too long to respond error is shown in the browser.
Access log in apcache server:
10.9.0.1 - - [15/Dec/2022:10:21:33 +0530] "GET / HTTP/1.0" 302 -
10.9.0.1 - - [15/Dec/2022:10:21:34 +0530] "GET /abc%20xyz%20klm HTTP/1.0" 301 256
OpenVpn Log:
Thu Dec 15 10:32:30 2022 SIGHUP[hard,] received, process restarting
Thu Dec 15 10:32:30 2022 --cipher is not set. Previous OpenVPN version defaulted to BF-CBC as fallback when cipher negotiation failed in this case. If you need this fallback please add '--data-ciphers-fallback BF-CBC' to your configuration and/or add BF-CBC to --data-ciphers.
Thu Dec 15 10:32:30 2022 OpenVPN 2.5.7 [git:release/2.5/3d792ae9557b959e] Windows-MSVC [SSL (OpenSSL)] [LZO] [LZ4] [PKCS11] [AEAD] built on Oct 28 2022
Thu Dec 15 10:32:30 2022 Windows version 10.0 (Windows 10 or greater) 64bit
Thu Dec 15 10:32:30 2022 library versions: OpenSSL 1.1.1o 3 May 2022, LZO 2.10
Thu Dec 15 10:32:35 2022 TCP/UDP: Preserving recently used remote address: [AF_INET]193.161.193.99:1194
Thu Dec 15 10:32:35 2022 Attempting to establish TCP connection with [AF_INET]193.161.193.99:1194 [nonblock]
Thu Dec 15 10:32:35 2022 TCP connection established with [AF_INET]193.161.193.99:1194
Thu Dec 15 10:32:35 2022 TCP_CLIENT link local: (not bound)
Thu Dec 15 10:32:35 2022 TCP_CLIENT link remote: [AF_INET]193.161.193.99:1194
Thu Dec 15 10:32:41 2022 [193.161.193.99] Peer Connection Initiated with [AF_INET]193.161.193.99:1194
Thu Dec 15 10:32:42 2022 WARNING: INSECURE cipher (BF-CBC) with block size less than 128 bit (64 bit). This allows attacks like SWEET32. Mitigate by using a --cipher with a larger block size (e.g. AES-256-CBC). Support for these insecure ciphers will be removed in OpenVPN 2.7.
Thu Dec 15 10:32:42 2022 WARNING: INSECURE cipher (BF-CBC) with block size less than 128 bit (64 bit). This allows attacks like SWEET32. Mitigate by using a --cipher with a larger block size (e.g. AES-256-CBC). Support for these insecure ciphers will be removed in OpenVPN 2.7.
Thu Dec 15 10:32:42 2022 WARNING: cipher with small block size in use, reducing reneg-bytes to 64MB to mitigate SWEET32 attacks.
Thu Dec 15 10:32:42 2022 open_tun
Thu Dec 15 10:32:42 2022 tap-windows6 device [OpenVPN TAP-Windows6] opened
Thu Dec 15 10:32:42 2022 Notified TAP-Windows driver to set a DHCP IP/netmask of 10.9.**.234/255.255.255.252 on interface {798F492A-574C-4BC6-87C5-A62C6D058EC1} [DHCP-serv: 10.9.**.233, lease-time: 31536000]
Thu Dec 15 10:32:42 2022 Successful ARP Flush on interface [12] {798F492A-574C-4BC6-87C5-A62C6D058EC1}
Thu Dec 15 10:32:42 2022 IPv4 MTU set to 1500 on interface 12 using service
These are my firewall rules:
Inbound rules
Inbound rule for Port 80 Outbound rules
Firewall monitoring Domain and Private Profiles
Firewall monitoring Public Profile
What is causing the problem? Any solution will be of great help. Thanks in advance.

UV4L webRTC on RPi with USB webcam is not working...(Signaling server and STUN server is all successfully loaded)

I tried to realize a WebRTC communication, a RPi with a webcam to stream, and can be seen on web browser on another computer, both under the same WIFI
*RPi:
Collect streaming data.
WebRTC server
*Another computer: see the streaming image on web browser through WebRTC
*I choose UV4L to have WebRTC function.
After installing UV4L (I used uv4l-uvc) and
set the /etc/systemd/system/uv4l_raspicam.service
[Unit]
Description=UV4L Raspicam
[Service]
Type=simple
ExecStart=/usr/bin/uv4l -f -k --sched-fifo --mem-lock --config-file=/etc/uv4l/uv4l-uvc.conf --driver=uvc --device-path=001:007 --driver-config-file=/etc/uv4l/uv4l-uvc.conf --server-option=--editable-config-file=/etc/uv4l/uv4l-uvc.conf
Restart=on-abnormal
LimitNOFILE=65536
[Install]
WantedBy=multi-user.target
then start the uv4l_raspicam service
sudo service uv4l_raspicam status
then check the status
● uv4l_raspicam.service - UV4L Raspicam
Loaded: loaded (/etc/systemd/system/uv4l_raspicam.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2022-06-20 17:05:24 CST; 55min ago
Main PID: 3922 (uv4l)
Tasks: 11 (limit: 1936)
CGroup: /system.slice/uv4l_raspicam.service
└─3922 /usr/bin/uv4l -f -k --sched-fifo --mem-lock --config-file=/etc/uv4l/uv4l-uvc.conf --driver=uvc --device-path=001:007 --driver-config-file=/etc/uv4l/uv4l-uvc.conf --server-option=--editable-config-file=/etc/uv4l/uv4l-uvc.conf
Jun 20 17:05:24 raspberrypi uv4l[3922]: <notice> [server] HTTP/HTTPS Streaming & WebRTC Signalling Server v1.1.130 built on Jan 16 2022
Jun 20 17:05:24 raspberrypi uv4l[3922]: <warning> [server] SSL is not enabled for the Streaming Server. Using unsecure HTTP.
Jun 20 17:05:24 raspberrypi uv4l[3922]: <notice> [core] Streaming Server loaded!
Jun 20 17:05:24 raspberrypi uv4l[3922]: <warning> [core] Cannot create /dev/video0 because file already exists
Jun 20 17:05:24 raspberrypi uv4l[3922]: <notice> [core] Registering device node /dev/video1
Jun 20 17:05:24 raspberrypi uv4l[3922]: <notice> [server] Web Streaming Server listening on port 8090
Jun 20 17:06:06 raspberrypi uv4l[3922]: <notice> [webrtc] WebRTC Renderer extension successfully loaded
Jun 20 17:06:06 raspberrypi uv4l[3922]: <notice> [server] WebRTC, Signalling Server and STUN Server extensions successfully loaded
Jun 20 17:06:06 raspberrypi uv4l[3922]: <notice> [webrtc] STUN server listening to 0.0.0.0:3478
It seems that the service works fine.
I then tried to access http://rpihostname:8090/stream
it worked. The streaming from my webcam(on RPi) works.
However, when I tried http://rpihostname:8090/stream/webrtc
after pressing "call" button it stucked and nothing happened... then checked on the status of uv4l_raspicam, it still showed
● uv4l_raspicam.service - UV4L Raspicam
Loaded: loaded (/etc/systemd/system/uv4l_raspicam.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2022-06-20 17:05:24 CST; 55min ago
Main PID: 3922 (uv4l)
Tasks: 11 (limit: 1936)
CGroup: /system.slice/uv4l_raspicam.service
└─3922 /usr/bin/uv4l -f -k --sched-fifo --mem-lock --config-file=/etc/uv4l/uv4l-uvc.conf --driver=uvc --device-path=001:007 --driver-config-file=/etc/uv4l/uv4l-uvc.conf --server-option=--editable-config-file=/etc/uv4l/uv4l-uvc.
Jun 20 17:05:24 raspberrypi uv4l[3922]: <notice> [server] HTTP/HTTPS Streaming & WebRTC Signalling Server v1.1.130 built on Jan 16 2022
Jun 20 17:05:24 raspberrypi uv4l[3922]: <warning> [server] SSL is not enabled for the Streaming Server. Using unsecure HTTP.
Jun 20 17:05:24 raspberrypi uv4l[3922]: <notice> [core] Streaming Server loaded!
Jun 20 17:05:24 raspberrypi uv4l[3922]: <warning> [core] Cannot create /dev/video0 because file already exists
Jun 20 17:05:24 raspberrypi uv4l[3922]: <notice> [core] Registering device node /dev/video1
Jun 20 17:05:24 raspberrypi uv4l[3922]: <notice> [server] Web Streaming Server listening on port 8090
Jun 20 17:06:06 raspberrypi uv4l[3922]: <notice> [webrtc] WebRTC Renderer extension successfully loaded
Jun 20 17:06:06 raspberrypi uv4l[3922]: <notice> [server] WebRTC, Signalling Server and STUN Server extensions successfully loaded
Jun 20 17:06:06 raspberrypi uv4l[3922]: <notice> [webrtc] STUN server listening to 0.0.0.0:3478
Any comments on this? Thanks in advance!

failed to start ksql

I am trying to setup kafka and ksql using confluent platform, but ksql is unable to start.
I have followed the steps to install kafka and ksql from confluent using this link https://docs.confluent.io/current/installation/installing_cp/deb-ubuntu.html#systemd-ubuntu-debian-install
I have skipped zookeeper config, since we are not using multiple servers and Control center part.
After everything i started zookeeper, kafka, schema-registry, kafka-connect, kafka-rest, ksql in this order. While checking status using
command
_sudo systemctl status confluent*_
ksql failed to start, while everything else is running.
while going into cd /etc/ksql/ksql-server.properties
(#------ Endpoint config -------)
listeners=http://0.0.0.0:8088
ksql.logging.processing.topic.auto.create=true
ksql.logging.processing.stream.auto.create=true
bootstrap.servers=localhost:9092
NOTE: I deleted commented part from config file since for (#) it was showing it as a heading here.
Expected Result:
confluent-ksql.service - Streaming SQL engine for Apache Kafka
Loaded: loaded (/lib/systemd/system/confluent-ksql.service; disabled;
vendor preset: enabled) Active: active(running)
Actual Result:
confluent-ksql.service - Streaming SQL engine for Apache Kafka
Loaded: loaded (/lib/systemd/system/confluent-ksql.service; disabled;
vendor preset: enabled) Active: failed (Result: exit-code) since
Tue 2019-08-27 15:15:08 IST; 9s ago
Docs: http://docs.confluent.io/ Process: 13833 ExecStart=/usr/bin/ksql-server-start /etc/ksql/ksql-server.properties
(code=exited, status=255) Main PID: 13833 (code=exited, status=255)
Aug 27 15:15:07 Mayank-Vostro-3478 ksql-server-start[13833]:
(io.confluent.ksql.util.KsqlConfig:347) Aug 27 15:15:07
Mayank-Vostro-3478 ksql-server-start[13833]: [2019-08-27 15:15:07,722]
ERROR Failed to start KSQL (io.confluent.ksql.rest.serv Aug 27
15:15:07 Mayank-Vostro-3478 ksql-server-start[13833]:
io.confluent.ksql.util.KsqlServerException: Could not create the kafka
streams st Aug 27 15:15:07 Mayank-Vostro-3478
ksql-server-start[13833]: Make sure the directory exists and is
writable for KSQL server Aug 27 15:15:07 Mayank-Vostro-3478
ksql-server-start[13833]: or its parend directory is writbale by KSQL
server Aug 27 15:15:07 Mayank-Vostro-3478 ksql-server-start[13833]:
or change it to a writable directory by setting
'ksql.streams.state.dir' config Aug 27 15:15:07 Mayank-Vostro-3478
ksql-server-start[13833]: at
io.confluent.ksql.rest.server.KsqlServerMain.enforceStreamStateDirAvai
Aug 27 15:15:07 Mayank-Vostro-3478 ksql-server-start[13833]:
at
io.confluent.ksql.rest.server.KsqlServerMain.main(KsqlServerMain.java:
Aug 27 15:15:08 Mayank-Vostro-3478 systemd[1]: confluent-ksql.service:
Main process exited, code=exited, status=255/n/a Aug 27 15:15:08
Mayank-Vostro-3478 systemd[1]: confluent-ksql.service: Failed with
result 'exit-code'.
io.confluent.ksql.util.KsqlServerException: Could not create the kafka
streams st Aug 27 15:15:07 Mayank-Vostro-3478
ksql-server-start[13833]: Make sure the directory exists and is
writable for KSQL server Aug 27 15:15:07 Mayank-Vostro-3478
ksql-server-start[13833]: or its parend directory is writbale by KSQL
server Aug 27 15:15:07 Mayank-Vostro-3478 ksql-server-start[13833]: or
change it to a writable directory by setting 'ksql.streams.state.dir'
config Aug 27 15:15:07 Mayank-Vostro-3478 ksql-server-start[13833]: at
According to above error, it is permission issue. User running KSQL process doesn't have write permission to create state directory in the given location.
You have to give permission to that user to create directory or change the ksql.streams.state.dir to some path where user have write permission.

Transferring logs using syslog-ng `as is` without timestamp and hostname etc

Background
Apache server running on a machine and producing logs into /var/log/httpd/error_log
Using syslog-ng to send log to a port 5140
Eventually it will be consumed by kafka producer to be send to a topic
Settings
options {
flush_lines (0);
time_reopen (10);
log_fifo_size (1000);
long_hostnames (off);
use_dns (no);
use_fqdn (no);
create_dirs (no);
keep_hostname (no);
};
source s_apache2 {
file("/var/log/httpd/error_log" flags(no-parse));
}
destination loghost {
tcp("*.*.*.*" port(5140));
}
Problem
syslog-ng prepends timestamp and hostname to the log data which is undesirable
<13>Jan 10 11:01:03 hostname [Tue Jan 10 11:01:02 2017] [notice] Digest: generating secret for digest authentication ...
<13>Jan 10 11:01:03 hostname [Tue Jan 10 11:01:02 2017] [notice] Digest: done
<13>Jan 10 11:01:03 hostname [Tue Jan 10 11:01:02 2017] [notice] Apache/2.2.15 (Unix) DAV/2 PHP/5.4.30 mod_ssl/2.2.15 OpenSSL/1.0.0-fips configured -- resuming normal operations
Desired output (Each log line as is from error_log file)
[Tue Jan 10 11:01:02 2017] [notice] Digest: generating secret for digest authentication ...
[Tue Jan 10 11:01:02 2017] [notice] Digest: done
[Tue Jan 10 11:01:02 2017] [notice] Apache/2.2.15 (Unix) DAV/2 PHP/5.4.30 mod_ssl/2.2.15 OpenSSL/1.0.0-fips configured -- resuming normal operations
Platform
CentOS release 6.4 (Final)
syslog-ng #version:3.2
PS
Syslog-ng to Kafka Integration : Please let me know if anybody has tried this which will render my java Kafka producer redundant
when you use the flags(no-parse) option in syslog-ng, then syslog-ng does not try to parse the different fields of the message, but puts everything into the MESSAGE field of the incoming log message, and prepends a syslog header. To remove this header, use a template in your syslog-ng destination:
template t_msg_only { template("${MSG}\n"); };
destination loghost {
tcp("*.*.*.*" port(5140) template(t_msg_only) );
}
To use the Kafka destination of syslog-ng, you need a newer version of syslog-ng (I'd recommend 3.8 or 3.9). Peter Czanik has written a detailed post about installing new syslog-ng rpm for CentOS.

Can't get my webapp accessible using eclipse, apache2 and tomcat7 (Ubuntu)

I'm quite a rookie about servlets, but I should deploy an Eclipse web project running on a Tomcat server (only localhost).
The whole process worked fine on Windows but recently I had to move to Ubuntu 12.04 and I have this problem when I want to access the app:
If I start apache2 and tomcat7 first, the output of
sudo netstat -lpn |grep :80
looks like this:
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 12231/apache2
tcp6 0 0 127.0.0.1:8005 :::* LISTEN 12848/java
tcp6 0 0 :::8080 :::* LISTEN 12848/java
then I try to start the server in eclipse and face this error:
Several ports (8005, 8080) required by cdrserver are already in use. The server may already >be running in another process, or a system process may be using the port. To start this >server you will need to stop the other process or change the port number(s).
Alright, let's kill these processes (although it seems that Tomcat uses them since when i stop tomcat, the 2 tcp6 processes disappear).
Now I'm able to start the Eclipse server, without a single warning:
Nov 27, 2013 10:59:24 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Nov 27, 2013 10:59:24 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 869 ms
Nov 27, 2013 10:59:24 AM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Nov 27, 2013 10:59:24 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.26
Nov 27, 2013 10:59:24 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /home/aron/workspace/Text_manipulator
Nov 27, 2013 10:59:26 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /home/aron/workspace/.metadata
Nov 27, 2013 10:59:26 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /home/aron/workspace/Servers
Nov 27, 2013 10:59:26 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Nov 27, 2013 10:59:26 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 2101 ms
Now, if I type the usual (like on Windows) URL to the browser: localhost/cdr I get this:
Not Found
The requested URL /cdr was not found on this server.
Apache/2.2.22 (Ubuntu) Server at localhost Port 80
Same happens with localhost/manager (I got this tip lately).
Moreover, using localhost:8080/cdr results in a totally blank page.
Here are my Eclipse server settings: http://i.imgur.com/lV6FwTm.png
I also checked the web.xml file in the project, it has the following servlet classes and related mappings:
Faces Servlet
Trinidad Resource Servlet
Resources Servlet
Spring MVC Dispatcher Servlet
Am I missing something obvious?
The requested URL /cdr was not found on this server.
Apache/2.2.22 (Ubuntu) Server at localhost Port 80
Firstly your URL should be something like localhost:8080 , Not localhost since this defaults to localhost:80 and you have apache2 running on your system thats why you get the 404 message of the apache server.
Secondly , I am concerned about the resources being deployed as shown by your logs
Nov 27, 2013 10:59:24 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /home/aron/workspace/Text_manipulator
Nov 27, 2013 10:59:26 AM org.apache.catalina.startup.HostConfig deployDirectory
**INFO: Deploying web application directory /home/aron/workspace/.metadata** --> ?
Nov 27, 2013 10:59:26 AM org.apache.catalina.startup.HostConfig deployDirectory
**INFO: Deploying web application directory /home/aron/workspace/Servers** --> ?
Nov 27, 2013 10:59:26 AM org.apache.coyote.AbstractProtocol start
What is .metadata ? Isn't this one of the hidden folders created by eclipse to manage workspace. This shouldn't be deployed.
Also what is Servers ? This looks like the server project from eclipse.
I don't see any resource namely cdr being deployed from the logs. So first you need to verify that this particular resource is deployed at all. Secondly, I would advise you to do some reading on how Tomcat works here.