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

SRS Failed to run #4285

Open
awangshandy03 opened this issue Jan 26, 2025 · 3 comments
Open

SRS Failed to run #4285

awangshandy03 opened this issue Jan 26, 2025 · 3 comments
Labels
EnglishNative This issue is conveyed exclusively in English.

Comments

@awangshandy03
Copy link

Hi, I must put a disclaimer that I'm not tech savvy
I encountered an error while attempting to run both of SRS version 5.0-r3 and 6.0-a1
I just installled it normally in my Windows 11 and run it from the created shortcut in my Desktop

  1. SRS Log
...
[2025-01-27 06:24:55.027][WARN][1078][997k5697][0] stats disk not configed, disk iops disabled.
[2025-01-27 06:24:55.030][INFO][1078][997k5697] write log to console
[2025-01-27 06:24:55.032][INFO][1078][997k5697] features, rch:on, dash:on, hls:on, hds:off, srt:off, hc:on, ha:on, hs:on, hp:on, dvr:on, trans:on, inge:on, stat:on, sc:on
[2025-01-27 06:24:55.033][INFO][1078][997k5697] SRS on amd64 x86_64, conf:conf\console.conf, limit:1000, writev:1024, encoding:little-endian, HZ:1000
[2025-01-27 06:24:55.034][INFO][1078][997k5697] mw sleep:350ms. mr enabled:on, default:0, sleep:350ms
[2025-01-27 06:24:55.035][INFO][1078][997k5697] gc:on, pq:30000ms, cscc:[0,16), csa:on, tn:on(may hurts performance), ss:auto(guess by merged write)
[2025-01-27 06:24:55.036][INFO][1078][997k5697] system default latency(ms): mw(0-350) + mr(0-350) + play-queue(0-30000)
[2025-01-27 06:24:55.037][WARN][1078][997k5697][0] SRS/6.0.155 is not stable
[2025-01-27 06:24:55.044][ERROR][1078][997k5697][13] Failed, code=1034(PidFileAcquire)(SRS process exists so that acquire pid file failed) : run : run thread pool : init thread pool : acquire pid file : open pid file=./objs/srs.pid
thread [1078][997k5697]: do_main() [./src/main/srs_main_server.cpp:248][errno=13]
thread [1078][997k5697]: run_directly_or_daemon() [./src/main/srs_main_server.cpp:418][errno=13]
thread [1078][997k5697]: run_in_thread_pool() [./src/main/srs_main_server.cpp:470][errno=13]
thread [1078][997k5697]: initialize() [./src/app/srs_app_threads.cpp:571][errno=13]
thread [1078][997k5697]: acquire_pid_file() [./src/app/srs_app_threads.cpp:595][errno=13](Permission denied)`
  1. SRS config
# main config for srs.
# @see full.conf for detail config.

listen              1935;
max_connections     1000;
#srs_log_tank        file;
#srs_log_file        ./objs/srs.log;
daemon              on;
http_api {
    enabled         on;
    listen          1985;
}
http_server {
    enabled         on;
    listen          8080;
    dir             ./objs/nginx/html;
}
rtc_server {
    enabled on;
    listen 8000; # UDP port
    # @see https://ossrs.net/lts/zh-cn/docs/v4/doc/webrtc#config-candidate
    candidate $CANDIDATE;
}
vhost __defaultVhost__ {
    hls {
        enabled         on;
    }
    http_remux {
        enabled     on;
        mount       [vhost]/[app]/[stream].flv;
    }
    rtc {
        enabled     on;
        # @see https://ossrs.net/lts/zh-cn/docs/v4/doc/webrtc#rtmp-to-rtc
        rtmp_to_rtc off;
        # @see https://ossrs.net/lts/zh-cn/docs/v4/doc/webrtc#rtc-to-rtmp
        rtc_to_rtmp off;
    }

    play{
        gop_cache_max_frames 2500;
    }
}

I don't know what's wrong, tried to run SRS as administrator didn't help either
Would someone assist me to get over this?

@winlinvip winlinvip added the EnglishNative This issue is conveyed exclusively in English. label Jan 26, 2025
@suzp1984
Copy link
Contributor

run both of SRS version 5.0-r3 and 6.0-a1

It seems a pid file conflict, try to edit srs_log_file ./objs/srs.log; to another path, e.g. srs_log_file ./objs/srs_2.log;

All the listen ports need to changed to avoid conflict also.

@awangshandy03
Copy link
Author

Sorry for the confusion.
I didn't mean to say I run both of them simultaneusly, but rather I run the version 5.0 first (got an error) and then I install version 6.0 but still the same.

@suzp1984
Copy link
Contributor

srs_log_file ./objs/srs.log
give it another path, and retry anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
EnglishNative This issue is conveyed exclusively in English.
Projects
None yet
Development

No branches or pull requests

3 participants