Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A 502 error occurred after modifying the '/data/record' directory using 'ln'. #133

Closed
lukaixiao opened this issue Sep 14, 2023 · 2 comments
Labels
bug Something isn't working TransByAI Translated by AI/GPT.

Comments

@lukaixiao
Copy link

lukaixiao commented Sep 14, 2023

Describe the bug
502 error occurred after modifying the '/data/record' directory using 'ln'.
A 502 error occurred after modifying the "/data/record" directory using "ln".

Version

  • OS: Ubuntu 20.04.6 LTS x86_64(Py3.7.9)
  • Pagoda: Linux Official Version (Free Version) 8.0.2 (2023/08/23)
  • srs-stack/v5.8.31

To Reproduce

  1. Install the system, install Pagoda.
  2. Pagoda homepage pop-up box installs Nginx 1.22.1, MySQL 5.7.43, PHP-7.4.33, phpMyAdmin 5.2, etc.
  3. After success, install Docker Manager 3.9.2 from the Pagoda software store.
  4. After success, install SRS Audio and Video Server from the Pagoda software store, click on settings => input domain name => install, wait for completion.
  5. Pagoda homepage scans a bunch of "security risks" and fixes them according to the prompts.
  6. After clicking on "SRS Stack Management Panel" in the "SRS Audio and Video Server" panel, enter the password to log in to /mgmt/zh/routers-scenario normally.
  7. Application Scenario => Recording => Set Recording Rules => Check "Record All Streams" and submit.

  • Phenomenon 1:
  1. After setting the streaming address with EV screen recording, start streaming, and stop streaming after about 1 minute.
  2. Relevant recording files can appear in the system "/data/record" directory, this phenomenon is normal.

  • Phenomenon 2:
  1. After setting the "Service Status" to "Stop" in the "SRS Audio and Video Server" panel,
  2. In the Baota "File", cut and paste the "/data/record" directory as the "/www/wwwroot/srsDir/record" directory,
  3. In the Baota "File", use the Baota's "New => Soft Link File" function in the "/data/" directory to create a "record" link to "/www/wwwroot/srsDir/record".
  4. After setting the "Service Status" to "Start" in the "SRS Audio and Video Server" panel,
  5. Click on the "SRS Stack Management Panel" to open the mgmt page, an error message "You got an error!" appears,
  6. Click the browser refresh button to refresh the page, a "502" error message appears, other pages also have errors,
  7. Start streaming with EV screen recording, an error message "Error number -10053 occurred" appears indicating streaming failure.

  • Phenomenon 3:
  1. After setting the "Service Status" to "Stop" in the "SRS Audio and Video Server" panel,
  2. In the Baota "File", delete the "/data/record" directory and cut and paste the "/www/wwwroot/srsDir/record" directory back to the "/data/record" directory.
  3. In the Baota "File", cut and paste the "/data" directory as the "/www/wwwroot/srsDir/data" directory,
  4. In the Baota "File", use the Baota's "New => Soft Link File" function in the "/" directory to create a "data" link to the "/www/wwwroot/srsDir/data" directory.
  5. After setting the "Service Status" to "Start" in the "SRS Audio and Video Server" panel,
  6. Click on the "SRS Stack Management Panel" to open the mgmt page normally, refresh the page normally, and click on other pages normally,
  7. Streaming with EV screen recording is normal, stop streaming after about 1 minute,
  8. In the Baota "File", there is a recorded folder in the "/www/wwwroot/srsDir/data/record" directory and the recorded video files can be played normally.

Expected behavior
The 14th, 15th, and 16th steps of the expected Phenomenon 2 should be consistent with the 22nd, 23rd, and 24th steps of Phenomenon 3.

Screenshots
Screenshot of Step 12:
Screenshot of Step 12
Screenshot of Step 13:
Screenshot of Step 13
Screenshot of Step 14:
Screenshot of Step 14
Screenshot of Step 15:
Screenshot of Step 15
Screenshot of Step 16:
Screenshot of Step 16

TRANS_BY_GPT4

@lukaixiao lukaixiao added the bug Something isn't working label Sep 14, 2023
@winlinvip winlinvip changed the title 使用"ln"修改"/data/record"目录后出现502错误。502 error occurred after modifying the '/data/record' directory using 'ln'. A 502 error occurred after modifying the '/data/record' directory using 'ln'. Sep 14, 2023
@winlinvip winlinvip added the TransByAI Translated by AI/GPT. label Sep 14, 2023
@winlinvip
Copy link
Member

winlinvip commented Sep 14, 2023

In simple terms, because the /data directory is a mounted host machine's disk directory, after modifying the /data/record soft link to another directory, it cannot be accessed in the docker container.

If docker is started directly, you can mount the /data and /data/record directories, for example:

docker run -v $HOME/data:/data -v /tmp/record:/data/record ......

If it is installed via BaoTa, aaPanel, image, or script, you need to modify the /usr/local/srs-stack/mgmt/bootstrap startup script, which is not easy.

Need to modify the text prompt for the recording, you cannot directly create a symbolic link to the /data/record directory.

TRANS_BY_GPT4

@winlinvip
Copy link
Member

winlinvip commented Sep 21, 2023

Since you can't directly modify /data/record in Docker, a simpler way is to directly modify the /data directory. The text prompt has already been updated.

Of course, if you're using Docker, you can also use the -v /tmp/record:/data/record command to mount the directory. That works too.

TRANS_BY_GPT4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working TransByAI Translated by AI/GPT.
Projects
None yet
Development

No branches or pull requests

2 participants