AVideo-Encoder icon indicating copy to clipboard operation
AVideo-Encoder copied to clipboard

Streamer not filling the "user/password" fields when connecting to Encoder

Open mcorvo opened this issue 1 year ago • 5 comments

Dear all,

I decided to go for a docker-compose driven installation of AVideo where the streamer sits on a VM and the Encoder on another one. To perform this installation I took the docker-compose.yml of AVideo and extract the part for the Encoder. On the Encoder VM I created a new docker-compose.yml, basically replicating the setup for AVideo, and started the service.

Starting from a fresh installation, everything works fine and I'm able to connect to the VM hosting the Encoder and encode new videos, but I'd need to migrate an old instance of Avideo, so I restored this instance database and mounted the NFS share with the "videos" directory on the new VM hosting the streamer.

The issue I face is that now when I click on the link "Encode video and audio", AVideo keeps landing correctly on the Encoder web service but the user/password fields are not filled. If I repeat the procedure, that is I click again on "Encode video and audio", this time the fields are filled.

It's pretty clear to me that the difference is that in the first setup I have a freshly installed database, while in the second I have a database restored from a different Avideo instance, but cannot figure out why the first time I click on the link, the fields are not filled.

Given that I'd like to keep the two services separated, could someone help me understand why the first time I click on the link the fields are not filled while the second time they are?

I can provide the full setup (Dockerfile, docker-compose.yml, docker-entrypoint) in case it could help.

Thanks in advance for any hints.

Regards,

Marco

mcorvo avatar Dec 10 '24 13:12 mcorvo

Just an addendum: in the configuration with a separate VM for Encoder and a restored DB it looks like the function for the login is not called the first time I try to connect to the Encoder, but it is called the second time:

First attempt clicking on "encode videos" link in the Streamer:

127.0.0.1 - - [13/Dec/2024:09:24:11 +0000] "GET / HTTP/1.1" 200 474787 "-" "curl/8.5.0" 131.154.49.32 - - [13/Dec/2024:09:24:21 +0000] "GET /node_modules/jquery-toast-plugin/dist/jquery.toast.min.css HTTP/1.1" 200 2934 "https://mediawall-test-encoder-03-9.infn.it/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36" 131.154.49.32 - - [13/Dec/2024:09:24:21 +0000] "GET /node_modules/jquery-toast-plugin/dist/jquery.toast.min.js HTTP/1.1" 200 2186 "https://mediawall-test-encoder-03-9.infn.it/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36" 131.154.49.32 - - [13/Dec/2024:09:24:21 +0000] "GET /node_modules/sweetalert/dist/sweetalert.min.js HTTP/1.1" 200 12379 "https://mediawall-test-encoder-03-9.infn.it/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36" 131.154.49.32 - - [13/Dec/2024:09:24:21 +0000] "GET /view/js/script.js HTTP/1.1" 200 35348 "https://mediawall-test-encoder-03-9.infn.it/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36" 131.154.49.32 - - [13/Dec/2024:09:24:21 +0000] "GET /node_modules/@fortawesome/fontawesome-free/css/all.min.css HTTP/1.1" 200 33039 "https://mediawall-test-encoder-03-9.infn.it/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36" 131.154.49.32 - - [13/Dec/2024:09:24:21 +0000] "GET /node_modules/animate.css/animate.min.css HTTP/1.1" 200 5741 "https://mediawall-test-encoder-03-9.infn.it/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36" 131.154.49.32 - - [13/Dec/2024:09:24:21 +0000] "GET /view/js/jquery-ui/jquery-ui.min.css HTTP/1.1" 200 8411 "https://mediawall-test-encoder-03-9.infn.it/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36" 131.154.49.32 - - [13/Dec/2024:09:24:21 +0000] "GET /view/bootstrap/bootstrapSelectPicker/css/bootstrap-select.min.css HTTP/1.1" 200 2056 "https://mediawall-test-encoder-03-9.infn.it/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36" 131.154.49.32 - - [13/Dec/2024:09:24:21 +0000] "GET /node_modules/js-cookie/dist/js.cookie.js HTTP/1.1" 200 1874 "https://mediawall-test-encoder-03-9.infn.it/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36" 131.154.49.32 - - [13/Dec/2024:09:24:21 +0000] "GET /view/css/main.css HTTP/1.1" 200 8564 "https://mediawall-test-encoder-03-9.infn.it/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36" 131.154.49.32 - - [13/Dec/2024:09:24:21 +0000] "GET /view/bootstrap/bootstrapSelectPicker/js/bootstrap-select.js HTTP/1.1" 200 16173 "https://mediawall-test-encoder-03-9.infn.it/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36" 131.154.49.32 - - [13/Dec/2024:09:24:21 +0000] "GET /view/js/jquery-ui/jquery-ui.min.js HTTP/1.1" 200 68766 "https://mediawall-test-encoder-03-9.infn.it/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36" 131.154.49.32 - - [13/Dec/2024:09:24:21 +0000] "GET /view/theme.css.php HTTP/1.1" 200 1360 "https://mediawall-test-encoder-03-9.infn.it/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36" 131.154.49.32 - - [13/Dec/2024:09:24:21 +0000] "GET /view/theme.css.php HTTP/1.1" 200 1180 "https://mediawall-test-encoder-03-9.infn.it/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36" 131.154.49.32 - - [13/Dec/2024:09:24:21 +0000] "GET /view/css/flagstrap/css/flags.css HTTP/1.1" 200 2101 "https://mediawall-test-encoder-03-9.infn.it/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36" 131.154.49.32 - - [13/Dec/2024:09:24:21 +0000] "GET /videos/favicon.ico HTTP/1.1" 200 104124 "https://mediawall-test-encoder-03-9.infn.it/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36" 131.154.49.32 - - [13/Dec/2024:09:24:21 +0000] "GET /objects/getTimes.json.php HTTP/1.1" 200 1518 "https://mediawall-test-encoder-03-9.infn.it/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36" 131.154.49.32 - - [13/Dec/2024:09:24:28 +0000] "POST /plugin/Live/stats.json.php?live_servers_id=&Label HTTP/1.1" 200 3548 "https://mediawall-test-streamer-03-9.infn.it/liveNow?muted=1&isClosed=1" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36" 127.0.0.1 - - [13/Dec/2024:09:24:28 +0000] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.4.58 (Ubuntu) OpenSSL/3.0.13 (internal dummy connection)" 127.0.0.1 - - [13/Dec/2024:09:24:29 +0000] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.4.58 (Ubuntu) OpenSSL/3.0.13 (internal dummy connection)" 127.0.0.1 - - [13/Dec/2024:09:24:30 +0000] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.4.58 (Ubuntu) OpenSSL/3.0.13 (internal dummy connection)" 131.154.49.32 - - [13/Dec/2024:09:24:32 +0000] "GET /plugin/Live/stats.json.php?Menu HTTP/1.1" 200 903 "https://mediawall-test-streamer-03-9.infn.it/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36" 131.154.49.32 - - [13/Dec/2024:09:24:39 +0000] "POST /plugin/Live/stats.json.php?live_servers_id=&Label HTTP/1.1" 200 3548 "https://mediawall-test-streamer-03-9.infn.it/liveNow?muted=1&isClosed=1" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36" 127.0.0.1 - - [13/Dec/2024:09:24:46 +0000] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.4.58 (Ubuntu) OpenSSL/3.0.13 (internal dummy connection)" 131.154.49.32 - - [13/Dec/2024:09:24:48 +0000] "GET /plugin/Live/stats.json.php?Menu HTTP/1.1" 200 3549 "https://mediawall-test-streamer-03-9.infn.it/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36" 131.154.49.32 - - [13/Dec/2024:09:24:50 +0000] "POST /plugin/Live/stats.json.php?live_servers_id=&Label HTTP/1.1" 200 902 "https://mediawall-test-streamer-03-9.infn.it/liveNow?muted=1&isClosed=1" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36" 131.154.49.32 - - [13/Dec/2024:09:24:39 +0000] "POST /plugin/Live/stats.json.php?live_servers_id=&Label HTTP/1.1" 200 3548 "https://mediawall-test-streamer-03-9.infn.it/liveNow?muted=1&isClosed=1" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36" 127.0.0.1 - - [13/Dec/2024:09:24:46 +0000] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.4.58 (Ubuntu) OpenSSL/3.0.13 (internal dummy connection)" 131.154.49.32 - - [13/Dec/2024:09:24:48 +0000] "GET /plugin/Live/stats.json.php?Menu HTTP/1.1" 200 3549 "https://mediawall-test-streamer-03-9.infn.it/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36" 131.154.49.32 - - [13/Dec/2024:09:24:50 +0000] "POST /plugin/Live/stats.json.php?live_servers_id=&Label HTTP/1.1" 200 902 "https://mediawall-test-streamer-03-9.infn.it/liveNow?muted=1&isClosed=1" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36" [Fri Dec 13 09:24:54.836147 2024] [php:notice] [pid 284] [client 127.0.0.1:39000] AVideoLog::PERFORMANCE: Time: 0.875s | Limit: 0.7s | Location: /var/www/html/AVideo/view/index.php Line 686 [getTotalFromCategory_6_00] IP=127.0.0.1 BOT USER_AGENT=curl/8.5.0 SCRIPT_NAME: /view/index.php [Fri Dec 13 09:24:54.907815 2024] [php:notice] [pid 284] [client 127.0.0.1:39000] AVideoLog::PERFORMANCE: Time: 0.947s | Limit: 0.7s | Location: /var/www/html/AVideo/view/index.php Line 485 [getAllCategories] IP=127.0.0.1 BOT USER_AGENT=curl/8.5.0 SCRIPT_NAME: /view/index.php [Fri Dec 13 09:24:55.134796 2024] [php:notice] [pid 284] [client 127.0.0.1:39000] AVideoLog::ERROR: Time: 2.588s | Limit: 0.2s | Location: /var/www/html/AVideo/view/index.php Line 569 [navbarSidebar.php] IP=127.0.0.1 BOT USER_AGENT=curl/8.5.0 backtrace=[{"file":"\/var\/www\/html\/AVideo\/view\/include\/navbarSidebar.php","line":569,"function":"TimeLogEnd","args":["navbarSidebar.php",569,0.2]},{"file":"\/var\/www\/html\/AVideo\/objects\/functionsFile.php","line":869,"args":["\/var\/www\/html\/AVideo\/view\/include\/navbarSidebar.php"],"function":"include"},{"file":"\/var\/www\/html\/AVideo\/view\/include\/navbar.php","line":163,"function":"getIncludeFileContent","args":["\/var\/www\/html\/AVideo\/view\/include\/navbarSidebar.php",{"sidebarStyle":"display: none;"},true]},{"file":"\/var\/www\/html\/AVideo\/objects\/Page.php","line":162,"args":["\/var\/www\/html\/AVideo\/view\/include\/navbar.php"],"function":"include"},{"file":"\/var\/www\/html\/AVideo\/objects\/Page.php","line":205,"function":"getNavBar","class":"Page","object":{},"type":"->","args":[]},{"file":"\/var\/www\/html\/AVideo\/objects\/Page.php","line":233,"function":"getContent","class":"Page","object":{},"type":"->","args":[]},{"file":"\/var\/www\/html\/AVideo\/objects\/Page.php","line":243,"function":"getPage","class":"Page","object":{},"type":"->","args":[]},{"file":"\/var\/www\/html\/AVideo\/plugin\/Gallery\/view\/modeGallery.php","line":27,"function":"print","class":"Page","object":{},"type":"->","args":[]},{"file":"\/var\/www\/html\/AVideo\/view\/index_firstPage.php","line":58,"args":["\/var\/www\/html\/AVideo\/plugin\/Gallery\/view\/modeGallery.php"],"function":"require"},{"file":"\/var\/www\/html\/AVideo\/view\/index.php","line":25,"args":["\/var\/www\/html\/AVideo\/view\/index_firstPage.php"],"function":"include"}] SCRIPT_NAME: /view/index.php [Fri Dec 13 09:24:55.290705 2024] [php:notice] [pid 284] [client 127.0.0.1:39000] AVideoLog::ERROR: Time: 2.746s | Limit: 0.2s | Location: /var/www/html/AVideo/view/index.php Line 166 [navbar.php] IP=127.0.0.1 BOT USER_AGENT=curl/8.5.0 backtrace=[{"file":"\/var\/www\/html\/AVideo\/view\/include\/navbar.php","line":166,"function":"TimeLogEnd","args":["navbar.php",166,0.2]},{"file":"\/var\/www\/html\/AVideo\/objects\/Page.php","line":162,"args":["\/var\/www\/html\/AVideo\/view\/include\/navbar.php"],"function":"include"},{"file":"\/var\/www\/html\/AVideo\/objects\/Page.php","line":205,"function":"getNavBar","class":"Page","object":{},"type":"->","args":[]},{"file":"\/var\/www\/html\/AVideo\/objects\/Page.php","line":233,"function":"getContent","class":"Page","object":{},"type":"->","args":[]},{"file":"\/var\/www\/html\/AVideo\/objects\/Page.php","line":243,"function":"getPage","class":"Page","object":{},"type":"->","args":[]},{"file":"\/var\/www\/html\/AVideo\/plugin\/Gallery\/view\/modeGallery.php","line":27,"function":"print","class":"Page","object":{},"type":"->","args":[]},{"file":"\/var\/www\/html\/AVideo\/view\/index_firstPage.php","line":58,"args":["\/var\/www\/html\/AVideo\/plugin\/Gallery\/view\/modeGallery.php"],"function":"require"},{"file":"\/var\/www\/html\/AVideo\/view\/index.php","line":25,"args":["\/var\/www\/html\/AVideo\/view\/index_firstPage.php"],"function":"include"}] SCRIPT_NAME: /view/index.php 127.0.0.1 - - [13/Dec/2024:09:24:49 +0000] "GET / HTTP/1.1" 200 477305 "-" "curl/8.5.0" 131.154.49.32 - - [13/Dec/2024:09:25:01 +0000] "POST /plugin/Live/stats.json.php?live_servers_id=&Label HTTP/1.1" 200 3548 "https://mediawall-test-streamer-03-9.infn.it/liveNow?muted=1&isClosed=1" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36" Scheduler watchDog Scheduler watchDog done Scheduler sendEmails Scheduler sendEmails done Scheduler executeEveryMinute [13-Dec-2024 13:25:01 Europe/Saratov] AVideoLog::ERROR: Live::getStatsObject RTMP Server (http://live:8080/stat) is OFFLINE requestStatsTimout=15 we could not connect on it => live_servers_id = (0) SCRIPT_NAME: /var/www/html/AVideo/plugin/Scheduler/run.php public function setCache(live_servers_id_0_getStatsObject) name=live/8dfb3b9502462083f9343116c8cd060f_.cache public function getCache(live_servers_id_0_undefined_0) name=live/88231c2e72d639c6bb273affed3134df_.cache public function getCache(live_servers_id_0_getStatsObject) name=live/8dfb3b9502462083f9343116c8cd060f_.cache [13-Dec-2024 13:25:01 Europe/Saratov] AVideoLog::ERROR: Live::getStatsObject RTMP Server (http://live:8080/stat) is OFFLINE requestStatsTimout=4 we could not connect on it => live_servers_id = (0) SCRIPT_NAME: /var/www/html/AVideo/plugin/Scheduler/run.php public function setCache() name=live/37a6259cc0c1dae299a7866489dff0bd_.cache kill_ffmpeg_restream.php logFiles start. kill_ffmpeg_restream.php logFiles done. Scheduler executeEveryMinute done 131.154.49.32 - - [13/Dec/2024:09:25:04 +0000] "GET /plugin/Live/stats.json.php?Menu HTTP/1.1" 200 903 "https://mediawall-test-streamer-03-9.infn.it/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"

Second attempt. The function login.json.php is indeed called:

131.154.49.32 - - [13/Dec/2024:09:25:07 +0000] "GET /view/theme.css.php HTTP/1.1" 200 1180 "https://mediawall-test-encoder-03-9.infn.it/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36" 131.154.49.32 - - [13/Dec/2024:09:25:07 +0000] "GET /objects/getTimes.json.php HTTP/1.1" 200 1518 "https://mediawall-test-encoder-03-9.infn.it/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36" [Fri Dec 13 09:25:07.354978 2024] [php:notice] [pid 25227] [client 131.154.49.32:50896] AVideoLog::DEBUG: getPasswordFromUserHashIfTheItIsValid: string not decrypted _user_hash_dGpDL2l0d3dmdXI2dGg3enBFOHdGcmswU2Z6aVlMb2tqK1hEaTZWUzl0MlRLMithNzZ5S2doamw2 SCRIPT_NAME: /objects/login.json.php [Fri Dec 13 09:25:07.355048 2024] [php:notice] [pid 25227] [client 131.154.49.32:50896] AVideoLog::DEBUG: Password check Old encoded pass SCRIPT_NAME: /objects/login.json.php [Fri Dec 13 09:25:07.356747 2024] [php:notice] [pid 25227] [client 131.154.49.32:50896] AVideoLog::DEBUG: Password check Old not found SCRIPT_NAME: /objects/login.json.php [Fri Dec 13 09:25:07.358745 2024] [php:notice] [pid 25227] [client 131.154.49.32:50896] AVideoLog::DEBUG: getPasswordFromUserHashIfTheItIsValid: string not decrypted _user_hash_dGpDL2l0d3dmdXI2dGg3enBFOHdGcmswU2Z6aVlMb2tqK1hEaTZWUzl0MlRLMithNzZ5S2doamw2 SCRIPT_NAME: /objects/login.json.php [Fri Dec 13 09:25:07.358777 2024] [php:notice] [pid 25227] [client 131.154.49.32:50896] AVideoLog::DEBUG: Password check Old not encoded pass SCRIPT_NAME: /objects/login.json.php [Fri Dec 13 09:25:07.360629 2024] [php:notice] [pid 25227] [client 131.154.49.32:50896] AVideoLog::DEBUG: Password check Old not found SCRIPT_NAME: /objects/login.json.php [Fri Dec 13 09:25:07.360685 2024] [php:notice] [pid 25227] [client 131.154.49.32:50896] AVideoLog::DEBUG: loginFromRequest NOT FOUND admin SCRIPT_NAME: /objects/login.json.php [Fri Dec 13 09:25:07.362565 2024] [php:notice] [pid 25227] [client 131.154.49.32:50896] AVideoLog::DEBUG: getPasswordFromUserHashIfTheItIsValid: string not decrypted _user_hash_dGpDL2l0d3dmdXI2dGg3enBFOHdGcmswU2Z6aVlMb2tqK1hEaTZWUzl0MlRLMithNzZ5S2doamw2 SCRIPT_NAME: /objects/login.json.php [Fri Dec 13 09:25:07.362596 2024] [php:notice] [pid 25227] [client 131.154.49.32:50896] AVideoLog::DEBUG: Password check Old encoded pass SCRIPT_NAME: /objects/login.json.php [Fri Dec 13 09:25:07.364302 2024] [php:notice] [pid 25227] [client 131.154.49.32:50896] AVideoLog::DEBUG: Password check Old not found SCRIPT_NAME: /objects/login.json.php [Fri Dec 13 09:25:07.366277 2024] [php:notice] [pid 25227] [client 131.154.49.32:50896] AVideoLog::DEBUG: getPasswordFromUserHashIfTheItIsValid: string not decrypted _user_hash_dGpDL2l0d3dmdXI2dGg3enBFOHdGcmswU2Z6aVlMb2tqK1hEaTZWUzl0MlRLMithNzZ5S2doamw2 SCRIPT_NAME: /objects/login.json.php [Fri Dec 13 09:25:07.366308 2024] [php:notice] [pid 25227] [client 131.154.49.32:50896] AVideoLog::DEBUG: Password check Old not encoded pass SCRIPT_NAME: /objects/login.json.php [Fri Dec 13 09:25:07.368047 2024] [php:notice] [pid 25227] [client 131.154.49.32:50896] AVideoLog::DEBUG: Password check Old not found SCRIPT_NAME: /objects/login.json.php [Fri Dec 13 09:25:07.368085 2024] [php:notice] [pid 25227] [client 131.154.49.32:50896] AVideoLog::DEBUG: loginFromRequest NOT FOUND admin SCRIPT_NAME: /objects/login.json.php [Fri Dec 13 09:25:07.374767 2024] [php:notice] [pid 25227] [client 131.154.49.32:50896] AVideoLog::DEBUG: login.json.php user found [admin] SCRIPT_NAME: /objects/login.json.php [Fri Dec 13 09:25:07.379671 2024] [php:notice] [pid 25227] [client 131.154.49.32:50896] AVideoLog::DEBUG: User::find line= 1669 SCRIPT_NAME: /objects/login.json.php [Fri Dec 13 09:25:07.387062 2024] [php:notice] [pid 25227] [client 131.154.49.32:50896] AVideoLog::DEBUG: User:login finish with success users_id= 1 IP=131.154.49.34[{"file":"\/var\/www\/html\/AVideo\/objects\/login.json.php","line":206,"function":"login","class":"User","object":{},"type":"->","args":[false,"true"]}] SCRIPT_NAME: /objects/login.json.php 131.154.49.32 - - [13/Dec/2024:09:25:07 +0000] "POST /login?user=admin&pass=_user_hash_dGpDL2l0d3dmdXI2dGg3enBFOHdGcmswU2Z6aVlMb2tqK1hEaTZWUzl0MlRLMithNzZ5S2doamw2T3NoOVdVRmRpWk1xTTRmUnpaRjhaMWpYanVSR2c9PQ%3D%3D&encodedPass=true HTTP/1.1" 200 49409 "-" "-" 131.154.49.32 - - [13/Dec/2024:09:25:12 +0000] "POST /plugin/Live/stats.json.php?live_servers_id=&Label HTTP/1.1" 200 3548 "https://mediawall-test-streamer-03-9.infn.it/liveNow?muted=1&isClosed=1" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"

Again, if I stick to a brand new database and a separate VM, everything works fine.

mcorvo avatar Dec 13 '24 09:12 mcorvo

I am not sure what is the issue

DanielnetoDotCom avatar Dec 13 '24 17:12 DanielnetoDotCom

Hello Daniel,

honestly I'm also not sure where the issue lies: what I discovered is that the Streamer page loads correctly the information about user and password. This is what I get after I log into the Streamer:

<a href="#" onclick='postFormToTarget("https://mediawall-test-encoder-03-9.infn.it/", "encoder", {"webSiteRootURL":"https:\/\/mediawall-test-streamer-03-9.infn.it\/","user":"admin","pass":"_user_hash_YmFWODVGZDFDYWxxTGdZRi8ycC9WWHNzRmczbXQ5MmREYnMzMUwvdGdPZS80N205bzhhZ1N3eWJYUVUzUjgzY29RM2F6Y25ObjJjdmFUNDJjbFgzTVE9PQ=="});
--
  | return false;'  data-toggle="tooltip" title="Upload a file or download it from the Internet" data-placement="left"
  | class="faa-parent animated-hover" >
  | <span class="fas fa-cog faa-spin"></span> Encode video and audio                </a>

So the information passed to the postFormToTarget function are right. But when I click on the link and go the Encoder landing page, which is on a different VM, opens I get:

<html>
<body>
<!--StartFragment-->
<form class="form-compact well form-horizontal" id="loginForm">
--
  | <fieldset>
  | <legend>Please sign in</legend>
  | <div class="form-group">
  | <label class="col-md-4 control-label">Streamer Site</label>
  | <div class="col-md-8 inputGroupContainer">
  | <div class="input-group">
  | <span class="input-group-addon"><i class="glyphicon glyphicon-globe"></i></span>
  | <input id="siteURL" placeholder="http://www.your-tube-site.com" class="form-control" type="url" value="https://mediawall-test-streamer-03-9.infn.it/" required />
  | </div>
  | </div>
  | </div>
  | <div class="form-group">
  | <label class="col-md-4 control-label">User</label>
  | <div class="col-md-8 inputGroupContainer">
  | <div class="input-group">
  | <span class="input-group-addon"><i class="glyphicon glyphicon-user"></i></span>
  | **<input id="inputUser" placeholder="User" class="form-control" type="text" value="" required />**
  | </div>
  | </div>
  | </div>
  |  
  |  
  | <div class="form-group">
  | <label class="col-md-4 control-label">Password</label>
  | <div class="col-md-8 inputGroupContainer">
  | <div class="input-group">
  | <span class="input-group-addon"><i class="glyphicon glyphicon-lock"></i></span>
  | **<input id="inputPassword" placeholder="Password" class="form-control" type="password" value="" />**
  | </div>
  | </div>
  | </div>
  | <!-- Button -->
  | <div class="form-group">
  | <div class="col-md-12">
  | <button type="submit" class="btn btn-success  btn-block" id="mainButton"><span class="fas fa-sign-in"></span> Sign in</button>
  | </div>
  | </div>
  | </fieldset>
  |  
  | </form>

<!--EndFragment-->
</body>
</html>

where the User and Password fields are not filled. What really puzzles me is that if I click again on the link, then the fields are correctly filled:

<html>
<body>
<!--StartFragment-->
<form class="form-compact well form-horizontal" id="loginForm">
--
  | <fieldset>
  | <legend>Please sign in</legend>
  | <div class="form-group">
  | <label class="col-md-4 control-label">Streamer Site</label>
  | <div class="col-md-8 inputGroupContainer">
  | <div class="input-group">
  | <span class="input-group-addon"><i class="glyphicon glyphicon-globe"></i></span>
  | <input id="siteURL" placeholder="http://www.your-tube-site.com" class="form-control" type="url" value="https://mediawall-test-streamer-03-9.infn.it/" required />
  | </div>
  | </div>
  | </div>
  | <div class="form-group">
  | <label class="col-md-4 control-label">User</label>
  | <div class="col-md-8 inputGroupContainer">
  | <div class="input-group">
  | <span class="input-group-addon"><i class="glyphicon glyphicon-user"></i></span>
  | <input id="inputUser" placeholder="User" class="form-control" type="text" value="admin" required />
  | </div>
  | </div>
  | </div>
  |  
  |  
  | <div class="form-group">
  | <label class="col-md-4 control-label">Password</label>
  | <div class="col-md-8 inputGroupContainer">
  | <div class="input-group">
  | <span class="input-group-addon"><i class="glyphicon glyphicon-lock"></i></span>
  | <input id="inputPassword" placeholder="Password" class="form-control" type="password" value="_user_hash_YmFWODVGZDFDYWxxTGdZRi8ycC9WWHNzRmczbXQ5MmREYnMzMUwvdGdPZS80N205bzhhZ1N3eWJYUVUzUjgzY29RM2F6Y25ObjJjdmFUNDJjbFgzTVE9PQ==" />
  | </div>
  | </div>
  | </div>
  | <!-- Button -->
  | <div class="form-group">
  | <div class="col-md-12">
  | <button type="submit" class="btn btn-success  btn-block" id="mainButton"><span class="fas fa-sign-in"></span> Sign in</button>
  | </div>
  | </div>
  | </fieldset>
  |  
  | </form>

<!--EndFragment-->
</body>
</html>

The index.php of Encoder looks like:

<fieldset>
                            <legend><?php echo __('Please sign in'); ?></legend>
                            <div class="form-group">
                                <label class="col-md-4 control-label"><?php echo __('Streamer Site'); ?></label>
                                <div class="col-md-8 inputGroupContainer">
                                    <div class="input-group">
                                        <span class="input-group-addon"><i class="glyphicon glyphicon-globe"></i></span>
                                        <input id="siteURL" placeholder="http://www.your-tube-site.com" class="form-control" type="url" value="<?php echo $streamerURL; ?>" required />
                                    </div>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-md-4 control-label"><?php echo __('User'); ?></label>
                                <div class="col-md-8 inputGroupContainer">
                                    <div class="input-group">
                                        <span class="input-group-addon"><i class="glyphicon glyphicon-user"></i></span>
                                        <input id="inputUser" placeholder="<?php echo __('User'); ?>" class="form-control" type="text" value="<?php echo @$_REQUEST['user']; ?>" required />
                                    </div>
                                </div>
                            </div>


                            <div class="form-group">
                                <label class="col-md-4 control-label"><?php echo __('Password'); ?></label>
                                <div class="col-md-8 inputGroupContainer">
                                    <div class="input-group">
                                        <span class="input-group-addon"><i class="glyphicon glyphicon-lock"></i></span>
                                        <input id="inputPassword" placeholder="<?php echo __('Password'); ?>" class="form-control" type="password" value="<?php echo @$_REQUEST['pass']; ?>" />
                                    </div>
                                </div>
                            </div>
                            <!-- Button -->
                            <div class="form-group">
                                <div class="col-md-12">
                                    <button type="submit" class="btn btn-success  btn-block" id="mainButton"><span class="fas fa-sign-in"></span> <?php echo __('Sign in'); ?></button>
                                </div>
                            </div>
                        </fieldset>

so there is a different mechanism to retrieve the value of the streamer's URL ($streamerURL) and those of User and Password (@$_REQUEST['user'] abd @$_REQUEST['pass']) and this explains why the URL field is always filled while the User/Password fields are not.

So it's clear to me that the first time I click on the link either the information for the login are not passed to the Encoder, or the Encoder is not loading them correctly while the second time I click on the link everything works fine. Again this behaviour occurs only when Streamer and Encoder are on different VMs and the database is restored from a different instance of AVideo. Nothing happens when Streamer and Encoder are on the same VM or when I create a brand new instance of Streamer and Encoder on two different VMs.

Regards,

Marco

PS I can provide further hints running fiddler on my laptop to see what is actually passed by the Streamer to the Encoder, but I can perform this test tomorrow when I come back to work.

mcorvo avatar Dec 16 '24 09:12 mcorvo

Hello Daniel,

I further investigated my issue with Fiddler, a tool which records http/https traffic, and I discovered a weird behaviour. It looks like there is a first time when the Streamer sends the parameters correctly with a POST verb on the Encoder:

POST https://mediawall-test-encoder-03-9.infn.it/ HTTP/1.1
Host: mediawall-test-encoder-03-9.infn.it
Connection: keep-alive
Content-Length: 220
Cache-Control: max-age=0
sec-ch-ua: "Google Chrome";v="131", "Chromium";v="131", "Not_A Brand";v="24"
sec-ch-ua-mobile: ?0
sec-ch-ua-platform: "Windows"
Origin: https://mediawall-test-streamer-03-9.infn.it
DNT: 1
Upgrade-Insecure-Requests: 1
Content-Type: application/x-www-form-urlencoded
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7
Sec-Fetch-Site: same-site
Sec-Fetch-Mode: navigate
Sec-Fetch-User: ?1
Sec-Fetch-Dest: document
Referer: https://mediawall-test-streamer-03-9.infn.it/
Accept-Encoding: gzip, deflate, br, zstd
Accept-Language: en-US,en;q=0.9

webSiteRootURL=https%3A%2F%2Fmediawall-test-streamer-03-9.infn.it%2F&user=admin&pass=_user_hash_Rm9iOGFhZjk5dGZObUhWR2FvV3lJZ0VxQjRxb3oxUzl1R3U4eGFoRzlJVk14WFFXV3NnRC8rMGg4NElYRjZPdFhPYkxVd2JYT3hUdzByRFFZQzBIcmc9PQ

then there's a second time when the Encoder performs a GET and the page is reloaded without the information:

GET https://mediawall-test-encoder-03-9.infn.it/?timezone=Europe%2FRome HTTP/1.1
Host: mediawall-test-encoder-03-9.infn.it
Connection: keep-alive
sec-ch-ua: "Google Chrome";v="131", "Chromium";v="131", "Not_A Brand";v="24"
sec-ch-ua-mobile: ?0
sec-ch-ua-platform: "Windows"
DNT: 1
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7
Sec-Fetch-Site: same-origin
Sec-Fetch-Mode: navigate
Sec-Fetch-Dest: document
Referer: https://mediawall-test-encoder-03-9.infn.it/
Accept-Encoding: gzip, deflate, br, zstd
Accept-Language: en-US,en;q=0.9
Cookie: cross-site-cookie=name; timezone=Europe/Rome

and it's this page without the user/pass information that I see, not the first one. Put in another way it looks like the page is reloaded to get this timezone, but clearly it misses the information because the $_REQUEST variable haven't got the relative $_POST which carries the variable from the Streamer. I tried different browsers and it happens everytime.

Honestly I don't know if this hint could be useful to understand how to solve the issue.

Regards,

Marco

mcorvo avatar Dec 17 '24 15:12 mcorvo

in your AVideo configuration page, check if your encoder is set with or without https

image

DanielnetoDotCom avatar Dec 17 '24 17:12 DanielnetoDotCom