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

nginx_quic编译问题 #9

Open
devckhe opened this issue Oct 28, 2020 · 1 comment
Open

nginx_quic编译问题 #9

devckhe opened this issue Oct 28, 2020 · 1 comment

Comments

@devckhe
Copy link

devckhe commented Oct 28, 2020

1 nginx编译configure参数是只有--add-module=/path/to/nginx-quic/quic_rtmp/nginx-rtmp-module吗,这样配置的话,编译报错:
ngx_http_quic_module.c:255:3: error: use of undeclared identifier 'ngx_http_ssl_srv_conf_t'
ngx_http_ssl_srv_conf_t *sscf;
^
ngx_http_quic_module.c:255:36: error: use of undeclared identifier 'sscf'; did you mean 'qscf'?
ngx_http_ssl_srv_conf_t *sscf;
^~~~
qscf
ngx_http_quic_module.c:250:36: note: 'qscf' declared here
ngx_http_quic_srv_conf_t *qscf;
似乎加上 --with-http_ssl_module可以编译通过

2 使用带--with-http_ssl_module编译的nginx,没有看到向client发包的过程,error.log提示进程挂掉,如下:
2020/10/28 21:04:55 [notice] 52964#0: signal 17 (SIGCHLD) received from 52972
2020/10/28 21:04:55 [alert] 52964#0: worker process 52972 exited on signal 11
2020/10/28 21:04:55 [notice] 52964#0: start worker process 52973
定位像是SSL_do_handshake挂掉,请问该如何继续定位呢

3 贴下nginx.conf
worker_processes 1;

error_log logs/error.log debug;
worker_rlimit_core 10000m;
working_directory /usr/local/nginx/logs;

events {
worker_connections 1024;
}

rtmp {
log_format rtmp_log '$remote_addr [$time_local] $command "$app" "$name" "$args" '
'$bytes_received $bytes_sent $session_time '
'"$pageurl" "$tcurl" "$swfurl" "$flashver"';
access_log logs/rtmp.log;
server {
listen 1935 so_keepalive=on;
listen 1935 quic reuseport;

    ssl_certificate     out/leaf_cert.pem;
    ssl_certificate_key out/leaf_cert.key;
    
    max_message 10M;
    publish_time_fix  on;
    chunk_size     4096;
    out_queue      17;

    application show {
        live on;

        idle_streams        off;
        drop_idle_publisher 1800s;
        sync                1s;
        wait_key            on;
        wait_video          off;
        notify_method       get;

        #record keyframes;
        #record_path /tmp;
        #record_max_size 128K;
        #record_interval 30s;
        #record_suffix .this.is.flv;

        #on_publish http://localhost:8080/publish;
        #on_play http://localhost:8080/play;
        #on_record_done http://localhost:8080/record_done;
    }
}

}

http {
server {
listen 8080;

    location /stat {
        rtmp_stat all;
        rtmp_stat_stylesheet stat.xsl;
    }

    location /stat.xsl {
        root /path/to/nginx-rtmp-module/;
    }

    location /control {
        rtmp_control all;
    }

    #location /publish {
    #    return 201;
    #}

    #location /play {
    #    return 202;
    #}

    #location /record_done {
    #    return 203;
    #}

    location /rtmp-publisher {
        root /home/jack/workspace/quic/server/nginx-rtmp-module/test;
    }

    location / {
        root /home/jack/workspace/quic/server/nginx-rtmp-module/test/www;
    }
}

}
crt和key文件都是chromium里的脚本生成的

感谢开源,求指导

@devckhe
Copy link
Author

devckhe commented Oct 29, 2020

1 需要添加--with-http_ssl_module
2 问题是自签证书没有添加推流域名,崩溃定位用gdb(其实最后是通过日志定位到问题的,感谢波神)
3 自签证书依旧没能认证成功(已加入根信任列表),爬坑中
再次感谢开源

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant