{"action":"created","issue":{"url":"https://api.github.com/repos/simple-rtmp-server/srs/issues/452","labels_url":"https://api.github.com/repos/simple-rtmp-server/srs/issues/452/labels{/name}","comments_url":"https://api.github.com/repos/simple-rtmp-server/srs/issues/452/comments","events_url":"https://api.github.com/repos/simple-rtmp-server/srs/issues/452/events","html_url":"https://github.com/simple-rtmp-server/srs/issues/452","id":100680959,"number":452,"title":"发布端srs.librtmp发布SRS2失败","user":{"login":"backylee","id":2766315,"avatar_url":"https://avatars.githubusercontent.com/u/2766315?v=3","gravatar_id":"","url":"https://api.github.com/users/backylee","html_url":"https://github.com/backylee","followers_url":"https://api.github.com/users/backylee/followers","following_url":"https://api.github.com/users/backylee/following{/other_user}","gists_url":"https://api.github.com/users/backylee/gists{/gist_id}","starred_url":"https://api.github.com/users/backylee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/backylee/subscriptions","organizations_url":"https://api.github.com/users/backylee/orgs","repos_url":"https://api.github.com/users/backylee/repos","events_url":"https://api.github.com/users/backylee/events{/privacy}","received_events_url":"https://api.github.com/users/backylee/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/simple-rtmp-server/srs/labels/feature","name":"feature","color":"159818"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/simple-rtmp-server/srs/milestones/2","html_url":"https://github.com/simple-rtmp-server/srs/milestones/srs%202.0%20release","labels_url":"https://api.github.com/repos/simple-rtmp-server/srs/milestones/2/labels","id":1089158,"number":2,"title":"srs 2.0 release","description":"搞懂st，性能优化到10k播放，4k推流。srs-librtmp支持推h.264和aac裸码流。wiki翻译为en。其他必要的外围功能支持。","creator":{"login":"winlinvip","id":2777660,"avatar_url":"https://avatars.githubusercontent.com/u/2777660?v=3","gravatar_id":"","url":"https://api.github.com/users/winlinvip","html_url":"https://github.com/winlinvip","followers_url":"https://api.github.com/users/winlinvip/followers","following_url":"https://api.github.com/users/winlinvip/following{/other_user}","gists_url":"https://api.github.com/users/winlinvip/gists{/gist_id}","starred_url":"https://api.github.com/users/winlinvip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/winlinvip/subscriptions","organizations_url":"https://api.github.com/users/winlinvip/orgs","repos_url":"https://api.github.com/users/winlinvip/repos","events_url":"https://api.github.com/users/winlinvip/events{/privacy}","received_events_url":"https://api.github.com/users/winlinvip/received_events","type":"User","site_admin":false},"open_issues":10,"closed_issues":145,"state":"open","created_at":"2015-04-29T12:32:27Z","updated_at":"2015-08-13T05:16:50Z","due_on":"2015-12-30T16:00:00Z","closed_at":null},"comments":4,"created_at":"2015-08-13T03:20:13Z","updated_at":"2015-08-13T08:05:55Z","closed_at":null,"body":"[root@localhost srs]# ./objs/srs -v\r\n2.0.178\r\n\r\nOS:\r\n[root@localhost srs]# cat /etc/redhat-release \r\nCentOS release 6.6 (Final)\r\n\r\nsrs.librtmp发布给srs的时候，如果发布失败，会再次尝试，不断循环。经常性碰到这个bug\r\n\r\nsrs的log里，循环出现发布，然后说发布失败，重复了，实际上没有重复的：\r\n```\r\n[2015-08-13 11:02:30.017][trace][4168][113] RTMP client ip=10.10.5.201\r\n[2015-08-13 11:02:30.025][trace][4168][113] simple handshake success.\r\n[2015-08-13 11:02:30.068][trace][4168][113] http hook on_connect success. client_id=113, url=http://127.0.0.1:9999/httphook, request={\"action\":\"on_connect\",\"client_id\":113,\"ip\":\"10.10.5.201\",\"vhost\":\"__defaultVhost__\",\"app\":\"live\",\"tcUrl\":\"rtmp://10.10.5.102/live\",\"pageUrl\":\"\"}, response=0, ret=0\r\n[2015-08-13 11:02:30.068][trace][4168][113] connect app, tcUrl=rtmp://10.10.5.102/live, pageUrl=, swfUrl=, schema=rtmp, vhost=__defaultVhost__, port=1935, app=live, args=null\r\n[2015-08-13 11:02:30.111][trace][4168][113] client identified, type=publish(FMLEPublish), stream_name=00f12e12d21c49b97, duration=-1.00\r\n[2015-08-13 11:02:30.111][trace][4168][113] out chunk size to 60000\r\n[2015-08-13 11:02:30.111][trace][4168][113] source url=/live/00f12e12d21c49b97, ip=10.10.5.201, cache=0, is_edge=0, source_id=105[105]\r\n[2015-08-13 11:02:30.146][trace][4168][113] http hook on_publish success. client_id=113, url=http://127.0.0.1:9999/httphook, request={\"action\":\"on_publish\",\"client_id\":113,\"ip\":\"10.10.5.201\",\"vhost\":\"__defaultVhost__\",\"app\":\"live\",\"stream\":\"00f12e12d21c49b97\"}, response=0, ret=0\r\n[2015-08-13 11:02:30.146][warn][4168][113][9] stream /live/00f12e12d21c49b97 is already publishing. ret=1028\r\n[2015-08-13 11:02:30.146][error][4168][113][9] stream service cycle failed. ret=1028(Bad file descriptor)\r\n\r\n[2015-08-13 11:02:33.055][trace][4168][115] RTMP client ip=10.10.5.201\r\n[2015-08-13 11:02:33.061][trace][4168][115] simple handshake success.\r\n[2015-08-13 11:02:33.105][trace][4168][115] http hook on_connect success. client_id=115, url=http://127.0.0.1:9999/httphook, request={\"action\":\"on_connect\",\"client_id\":115,\"ip\":\"10.10.5.201\",\"vhost\":\"__defaultVhost__\",\"app\":\"live\",\"tcUrl\":\"rtmp://10.10.5.102/live\",\"pageUrl\":\"\"}, response=0, ret=0\r\n[2015-08-13 11:02:33.105][trace][4168][115] connect app, tcUrl=rtmp://10.10.5.102/live, pageUrl=, swfUrl=, schema=rtmp, vhost=__defaultVhost__, port=1935, app=live, args=null\r\n[2015-08-13 11:02:33.152][trace][4168][115] client identified, type=publish(FMLEPublish), stream_name=00f12e12d21c49b97, duration=-1.00\r\n[2015-08-13 11:02:33.152][trace][4168][115] out chunk size to 60000\r\n[2015-08-13 11:02:33.152][trace][4168][115] source url=/live/00f12e12d21c49b97, ip=10.10.5.201, cache=0, is_edge=0, source_id=105[105]\r\n[2015-08-13 11:02:33.186][trace][4168][115] http hook on_publish success. client_id=115, url=http://127.0.0.1:9999/httphook, request={\"action\":\"on_publish\",\"client_id\":115,\"ip\":\"10.10.5.201\",\"vhost\":\"__defaultVhost__\",\"app\":\"live\",\"stream\":\"00f12e12d21c49b97\"}, response=0, ret=0\r\n[2015-08-13 11:02:33.186][warn][4168][115][9] stream /live/00f12e12d21c49b97 is already publishing. ret=1028\r\n[2015-08-13 11:02:33.186][error][4168][115][9] stream service cycle failed. ret=1028(Bad file descriptor)\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/simple-rtmp-server/srs/issues/comments/130569823","html_url":"https://github.com/simple-rtmp-server/srs/issues/452#issuecomment-130569823","issue_url":"https://api.github.com/repos/simple-rtmp-server/srs/issues/452","id":130569823,"user":{"login":"winlinvip","id":2777660,"avatar_url":"https://avatars.githubusercontent.com/u/2777660?v=3","gravatar_id":"","url":"https://api.github.com/users/winlinvip","html_url":"https://github.com/winlinvip","followers_url":"https://api.github.com/users/winlinvip/followers","following_url":"https://api.github.com/users/winlinvip/following{/other_user}","gists_url":"https://api.github.com/users/winlinvip/gists{/gist_id}","starred_url":"https://api.github.com/users/winlinvip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/winlinvip/subscriptions","organizations_url":"https://api.github.com/users/winlinvip/orgs","repos_url":"https://api.github.com/users/winlinvip/repos","events_url":"https://api.github.com/users/winlinvip/events{/privacy}","received_events_url":"https://api.github.com/users/winlinvip/received_events","type":"User","site_admin":false},"created_at":"2015-08-13T08:05:55Z","updated_at":"2015-08-13T08:05:55Z","body":"日志写到文件吧。"}}