2017-11-15 30 views
0

KMS 컨테이너를 내 서버에 설치하고 내 서버에 kurento hello world java 응용 프로그램을 다운로드했지만 내 서버 IP 주소를 사용하여 Java 웹 응용 프로그램으로 이동할 때 [정보]에서kurento 도커를 사용하는 원격 스트림이 없습니다 kurento hello world 예를 들어 호스트에

ICE failed, see about:webrtc for more details 

: 나는 원격 스트림과 (파이어 폭스) 다음 오류가 그것은 더 STUN 및 지정되지 TURN 서버 (그리고 다음과 같은 출력의 많은 분명이없는 없음을 알려줍니다 WebRTC가 to me) 문제는 WebRtcEndpoint.conf.ini에 STUN 서버를 지정했기 때문입니다.

{ 
"mediaServer" : { 
"resources": { 
// //Resources usage limit for raising an exception when an object creatio$ 
// "exceptionLimit": "0.8", 
// // Resources usage limit for restarting the server when no objects are $ 
// "killLimit": "0.7", 
    // Garbage collector period in seconds 
    "garbageCollectorPeriod": 240 
}, 

    "net" : { 
    "websocket": { 
    "port": 8888, 
    "secure": { 
     "port": 8433, 
     "certificate": "defaultCertificate.pem", 
     "password": "" 
    }, 
    //"registrar": { 
    // "address": "ws://localhost:9090", 
    // "localAddress": "localhost" 
    //}, 
    "path": "kurento", 
    "threads": 10 
     } 
    } 
    } 
} 

내 WebRtcEndpoint.conf.ini

; Only IP address are supported, not domain names for addresses 
; You have to find a valid stun server. You can check if it works 
; usin this tool: 
; http://webrtc.github.io/samples/src/content/peerconnection/trickle-ice/ 
stunServerAddress=62.71.2.168 
stunServerPort=3478 

; turnURL gives the necessary info to configure TURN for WebRTC. 
; 'address' must be an IP (not a domain). 
; 'transport' is optional (UDP by default). 
; turnURL=user:[email protected]:port(?transport=[udp|tcp|tls]) 

;pemCertificate is deprecated. Please use pemCertificateRSA instead 
;pemCertificate=<path> 
;pemCertificateRSA=<path> 
;pemCertificateECDSA=<path> 
: 여기
kurento: 
image: fiware/stream-oriented-kurento:latest 
volumes: 
    - ./kurento.conf.json:/etc/kurento/kurento.conf.json:ro 
    - ./defaultCertificate.pem:/etc/kurento/defaultCertificate.pem:ro 
    - ./WebRtcEndpoint.conf.ini:/etc/kurento/modules/kurento/WebRtcEndpoint$ 
ports: 
    - "8888:8888" 
    - "8433:8433" 

내 kurento.conf.json 파일입니다 : 여기

내 고정 표시기-compose.yml 파일입니다

인증서가 생성되었습니다 :

certtool --generate-privkey --outfile defaultCertificate.pem 
echo 'organization = your organization name' > certtool.tmpl 
certtool --generate-self-signed --load-privkey defaultCertificate.pem \ 
--template certtool.tmpl >> defaultCertificate.pem 

sudo chown kurento defaultCertificate.pem 

내가 가진 kurento 컨테이너 시작하면 내가 인증서

의 유효성을 검사하는 내 https://localhost:8433/kurento 갔다 내 conf의 로그에 볼 수있는 최대 고정 표시기를-구성한다.

kurento_1   |    "websocket": 
kurento_1   |    { 
kurento_1   |     "port": "8888", 
kurento_1   |     "secure": 
kurento_1   |     { 
kurento_1   |      "port": "8433", 
kurento_1   |      "certificate": 
"defaultCertificate.pem", 
kurento_1   |      "password": "" 
kurento_1   |     }, 
kurento_1   |     "path": "kurento", 
kurento_1   |     "threads": "10" 
kurento_1   |    } 

.....

kurento_1   |    "WebRtcEndpoint": 
kurento_1   |    { 
kurento_1   |     "stunServerAddress": "62.71.2.168", 
kurento_1   |     "stunServerPort": "3478", 
kurento_1   |     "configPath": 
"\/etc\/kurento\/modules\/kurento" 
kurento_1   |    }, 

을 난과 함께 안녕하세요 세계 예제 시작 : 파일이로드 된 아니, 모든 확인을 작동하는 것 같다이 시점에서

sudo mvn compile exec:java -Dkms.url=wss://localhost:8433/kurento 

을 오류 출력.

https : // : 8443으로 클라이언트에서 내 웹 응용 프로그램에 액세스하려고하면 웹 페이지가 올바르게로드되어 스트림을 시작할 수 있습니다. 하지만 원격 스트림이없고 처음에 인쇄 한 오류가 있습니다.

UPDATE 1

나는에

image: fiware/stream-oriented-kurento:latest 

에서 고정 표시기 - compose.yml의 kurento 이미지의 버전을 변경 :

image: fiware/stream-oriented-kurento:6.6.0 

그리고 지금은 가끔 노력하고 있습니다. 나는 동일한 오류가있다 (ICE 실패, about : webrtc에 대한 자세한 내용은). 그러나 페이지를 여러 번 다시로드하면 일부 재로드 후에 작업이 끝납니다. 내가 뭘 잘못하고 있는지에 대한 제안이 있니?

UPDATE 2

나는 내가 KMS를 다시 시작할 때까지 항상 작동합니다, 웹 응용 프로그램 (다중 다시로드 후) 작업을 시작할 때, 다음에 내가 웹 applicaiton에 액세스하는 것을 깨달았다.그런 다음 원격 스트림을 갖기 위해 페이지를 여러 번 다시로드해야합니다.

이제 깨달았으니 이미지로 다시 시도해 보았습니다. fiware/stream-oriented-kurento : latest 정확히 동일한 동작을합니다. 페이지를 여러 번 다시로드해야 제대로 작동합니다. 왜 그런 생각이 들지? 어떤 생각?

답변

1

문제를 조사한 결과 ICE 후보자가 양쪽에서 제대로 작성되지 않았다고 생각합니다.

webApplication (JS)에서 STUN/TURN을 구성 했습니까? 예를 수정하지 않은 경우 기본적으로 구성되지 않은 것 같습니다.

options.configuration을 확인하십시오. 예 :

Firefox ICE 후보 생성 및 KMS ICE 생성 모두에 대한 로그를 제공 할 수 있습니까?

또한 자습서와 동일한 컴퓨터에서 KMS를 실행하고 있습니까? 헬로 세계에서 사용