Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - vaidyamanishjoshi

Pages: [1]
1
E-Mail / lfd - Excessive resource usage: memcached alerts
« on: September 13, 2021, 01:57:51 PM »
I am using centos 7

 I am getting email alerts per hour as follows :

Time:         Sat Sep 11 19:00:40 2021 +0530
Account:      memcached
Resource:     Process Time
Exceeded:     358754 > 1800 (seconds)
Executable:   /usr/bin/memcached
Command Line: /usr/bin/memcached -u memcached -p 11211 -m 64 -c 1024
PID:          18586 (Parent PID:18586)
Killed:       No

I have added exe and cmd in /etc/csf/csf.pignore as

cmd:/usr/bin/memcached -u memcached -p 11211 -m 64 -c 1024

and

exe:/usr/sbin/memcached
exe:/usr/bin/memcached

and restarted lfd firewall and all processes, apache server too.

But till I am getting email per hour. How  to disable it ?

2
Information / Live streaming link in html5 not working....
« on: August 21, 2021, 05:52:24 AM »
I am on centos 7 cwp

I have installed nginx RTMP.

Added rtmp://serverlink:1935/stream in OBS studio.

I am trying HLS

In mnt/hls, test.m3u8 and other .ts files getting generated.

But when I am trying to live stream them in html5, it is not loading.

Codes are as follows...

etc/nginx/nginx.config is :

Code: [Select]
user nobody;
worker_processes auto;
#worker_rlimit_nofile    65535;
error_log               /var/log/nginx/error.log crit;
pid                     /var/run/nginx.pid;

events {
worker_connections  1024;
use                 epoll;
multi_accept        on;

}
http {
sendfile on;
tcp_nopush on;
tcp_nodelay on;
client_header_timeout 3m;
client_body_timeout 3m;
client_max_body_size 256m;
client_header_buffer_size 4k;
client_body_buffer_size 256k;
large_client_header_buffers 4 32k;
send_timeout 3m;
keepalive_timeout 60 60;
reset_timedout_connection       on;
server_names_hash_max_size 1024;
server_names_hash_bucket_size 1024;
ignore_invalid_headers on;
connection_pool_size 256;
request_pool_size 4k;
output_buffers 4 32k;
postpone_output 1460;

include mime.types;
default_type application/octet-stream;

# Compression gzip
gzip on;
gzip_vary on;
gzip_disable "MSIE [1-6]\.";
gzip_proxied any;
gzip_min_length 512;
gzip_comp_level 6;
gzip_buffers 8 64k;
gzip_types text/plain text/xml text/css text/js application/x-javascript application/xml image/png image/x-icon image/gif image/jpeg image/svg+xml application/xml+rss text/javascript application/atom+xml application/javascript application/json application/x-font-ttf font/opentype;

# Proxy settings
proxy_redirect      off;
proxy_set_header    Host            $host;
proxy_set_header    X-Real-IP       $remote_addr;
proxy_set_header    X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass_header   Set-Cookie;
proxy_connect_timeout   300;
proxy_send_timeout  300;
proxy_read_timeout  300;
proxy_buffers       32 4k;
proxy_cache_path /var/cache/nginx levels=2 keys_zone=cache:10m inactive=60m max_size=512m;
proxy_cache_key "$host$request_uri $cookie_user";
proxy_temp_path  /var/cache/nginx/temp;
proxy_ignore_headers Expires Cache-Control;
proxy_cache_use_stale error timeout invalid_header http_502;
proxy_cache_valid any 1d;

open_file_cache_valid 120s;
open_file_cache_min_uses 2;
open_file_cache_errors off;
open_file_cache max=5000 inactive=30s;
open_log_file_cache max=1024 inactive=30s min_uses=2;

# SSL Settings
ssl_session_cache   shared:SSL:10m;
ssl_protocols       TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_ciphers        "EECDH+ECDSA+AESGCM:EECDH+aRSA+AESGCM:EECDH+ECDSA+SHA384:EECDH+ECDSA+SHA256:EECDH+aRSA+SHA384:EECDH+aRSA+SHA256:EECDH+aRSA!RC4:EECDH:!RC4:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!SRP:!DSS";

# Logs
log_format  main    '$remote_addr - $remote_user [$time_local] $request '
                '"$status" $body_bytes_sent "$http_referer" '
                '"$http_user_agent" "$http_x_forwarded_for"';
log_format  bytes   '$body_bytes_sent';
#access_log          /var/log/nginx/access.log main;
access_log off;

# Cache bypass
map $http_cookie $no_cache {
default 0;
~SESS 1;
~wordpress_logged_in 1;
}

# Include additional configuration
include /etc/nginx/cloudflare.inc;
include /etc/nginx/conf.d/*.conf;



server {
        listen 8080;

        location / {
            # Disable cache
            add_header 'Cache-Control' 'no-cache';

            # CORS setup
           add_header 'Access-Control-Allow-Origin' '*';
            add_header 'Access-Control-Expose-Headers' 'Content-Length';

            # allow CORS preflight requests
            if ($request_method = 'OPTIONS') {
                add_header 'Access-Control-Allow-Origin' '*';
                add_header 'Access-Control-Max-Age' 1728000;
                add_header 'Content-Type' 'text/plain charset=UTF-8';
                add_header 'Content-Length' 0;
                return 204;
            }

            types {
                application/dash+xml mpd;
                application/vnd.apple.mpegurl m3u8;
                video/mp2t ts;
            }

            root /mnt/;
        }
    }

}


# RTMP configuration
rtmp {
    server {
        listen 1935; # Listen on standard RTMP port
       chunk_size 4000;

       application stream {
         live on;
        # Turn on HLS
        hls on;
        hls_path /mnt/hls/;
        hls_fragment 3;
        hls_playlist_length 60;
       # disable consuming the stream from nginx as rtmp
        deny play all;
         }
    }
}




Code in my html page to display live stream is :

Code: [Select]
<script src="https://cdn.jsdelivr.net/npm/hls.js@latest"></script>
<video id="video"></video>
<script>
  if(Hls.isSupported()) {
    var video = document.getElementById('video');
    var hls = new Hls();
    hls.loadSource('https://server.xxxxxxserver.in:8080/test.m3u8');
    hls.attachMedia(video);
    hls.on(Hls.Events.MANIFEST_PARSED,function() {
      video.play();
  });
 }
</script>
 


I tried following links in hls.loadSource

 - https://server.xxxxxxserver.in:8080/test.m3u8
 - https://server.xxxxxxserver.in:8080/stream/test.m3u8
 - https://server.xxxxxxserver.in:8080/hls/test.m3u8
 - https://server.xxxxxxserver.in:8080/mnt/hls/test.m3u8
 - https://server.xxxxxxserver.in/test.m3u8
 - https://server.xxxxxxserver.in/stream/test.m3u8
 - https://server.xxxxxxserver.in/hls/test.m3u8
 - https://server.xxxxxxserver.in/mnt/hls/test.m3u8


also tried video.js and other few video player plugins.... but no success

3
CentOS 7 Problems / No option for undo in file edit
« on: August 19, 2021, 02:18:46 PM »
When we open any file from file manager, there are only two options... 1. Search and 2. Save. But if I want to undo changes on save, no option to go back is there.

4
Installation / Apache + Nginx
« on: August 14, 2021, 02:47:09 PM »
I am using CWP Pro

I have selected webserver = Apache + Nginx

I want to install RTMP and want to live stream on my website with obs studio.

My queries are =

1. Do I need to install NGINX even if I am using Apache+Nginx server ?

2. Maximum tutorials are showing NGINX + RTMP installation guide. Do I need to install NGINX too ? Or only RTMP module ?

3. After installing RTMP, I have created url for streaming  (e.g. rtmp://<my ip>/<live>/<stream_key>, and added it in OBS studio. Started OBS streaming. But I am stuck at Code To Embed this live streaming in my html page of my website. How Can I EMbed it with video player lie video.js or other suggestions ?

Pages: [1]