Skip to content
This repository was archived by the owner on Oct 23, 2024. It is now read-only.

Commit 934af87

Browse files
committed
Refine document
1 parent 62d3f22 commit 934af87

File tree

2 files changed

+19
-9
lines changed

2 files changed

+19
-9
lines changed

doc/servermd/EnableGRPC.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ By default, OWT[Open WebRTC Toolkit](https://github.com/open-webrtc-toolkit/owt-
1010

1111
# 2 Enable gRPC for internal RPC
1212

13-
In OWT server package, you can turn on gRPC option by updating configuration files. This section in troduces the configuration settings for internal gRPC.
13+
In OWT server package, you can turn on gRPC option by updating configuration files. This section introduces the configuration settings for internal gRPC.
1414

1515
# 2.1 Configuration for gRPC
1616

@@ -34,17 +34,25 @@ Set the item `enable_grpc` to `true` in these configuration files.
3434

3535
enable_grpc = true
3636

37-
In `cluster_manager/cluster_manager.toml`, set `grpc_host` with `IP|hostname:port` of your own(when using TLS, only hostname is allowed).
37+
In `cluster_manager/cluster_manager.toml`, set `grpc_host` of section `[manager]` with `IP|hostname:port` of your own(when using TLS, only hostname is allowed).
3838

39+
[manager]
3940
grpc_host = "localhost:10080"
4041

41-
In other modules' toml files, edit `grpc_host` to the value of `cluster_manager`.
42+
In other modules' toml files, edit `host` of section `[cluster]` to the value of `cluster_manager`.
4243

43-
grpc_host = "localhost:10080"
44+
[cluster]
45+
host = "localhost:10080"
46+
47+
And to specify hostname of other modules' gRPC service, add following section in toml files.
48+
49+
[cluster.worker]
50+
ip="localhost" # You could also set hostname here. E.g, ip="myhost.com"
4451

4552
If you want to enable HTTP proxy for gRPC, set environment variable `GRPC_ARG_HTTP_PROXY` to `1`, then system proxy will be used.
4653

4754
Restart OWT service after above configuration files being updated.
55+
Note that RabbitMQ based RPC server will be disabled if gRPC is used.
4856

4957
# 2.2 Enable TLS for gRPC
5058

source/agent/conference/conference.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -503,11 +503,13 @@ var Conference = function (rpcClient, selfRpcId) {
503503
});
504504
});
505505
}).then(() => {
506-
return rpcReq.getClusterID(cluster);
507-
}).then((id) => {
508-
log.info("Get cluster id:", id);
509-
clusterID = id;
510-
return Promise.resolve('ok');
506+
rpcReq.getClusterID(cluster)
507+
.then((id) => {
508+
log.info('Get cluster id:', id);
509+
clusterID = id;
510+
}).catch((e) => {
511+
log.info('Failed to get cluster ID');
512+
});
511513
}).catch(function(err) {
512514
log.error('Init room failed, reason:', err);
513515
is_initializing = false;

0 commit comments

Comments
 (0)