[jitsi-users] REST API


#1

Hi,

I was wondering if anyone that is using REST API on jitsi-meet to point me
out how.

I have modified the videobridge/sip-comunicator.properties:
org.jitsi.videobridge.rest.jetty.port=8080 was 443 but that port was
ob-used by nginx.

So now I would like to try examples from:
https://github.com/jitsi/jitsi-videobridge/blob/master/doc/rest-videobridge.md

but I don't see any java service listening on 8080 port.
Searched the jvb.log and the only mention of the 8080 port is on the INFO
messages when reading onfigurations.

Do I have to use TLS or maybe TCP_HARVESTER_PORT (this one is listening
only on IPv6)

Any help to get more clearer picture will help me out.

···

--
Regards,
Mirko


#2

Hi,

I was wondering if anyone that is using REST API on jitsi-meet to point
me out how.

I have modified the videobridge/sip-comunicator.properties:
org.jitsi.videobridge.rest.jetty.port=8080 was 443 but that port was
ob-used by nginx.

So now I would like to try examples from:
https://github.com/jitsi/jitsi-videobridge/blob/master/doc/rest-videobridge.md

but I don't see any java service listening on 8080 port.
Searched the jvb.log and the only mention of the 8080 port is on the
INFO messages when reading onfigurations.

Did you add "rest" to the list of api in /etc/jitsi/videobridge/config?
JVB_OPTS="--apis=xmpp,rest"

Do I have to use TLS or maybe TCP_HARVESTER_PORT (this one is listening
only on IPv6)

No, this is something else.

Regards,
Boris

···

On 11/08/16 03:47, Mirko Brankovic wrote:


#3

Yes,
But somehow I think that what ever I put in there is not picked up.
I tried only rest also , but conferences work on xmpp still.

Mirko

···

On Thu, Aug 11, 2016 at 4:42 PM, Boris Grozev <boris@jitsi.org> wrote:

On 11/08/16 03:47, Mirko Brankovic wrote:

Hi,

I was wondering if anyone that is using REST API on jitsi-meet to point
me out how.

I have modified the videobridge/sip-comunicator.properties:
org.jitsi.videobridge.rest.jetty.port=8080 was 443 but that port was
ob-used by nginx.

So now I would like to try examples from:
https://github.com/jitsi/jitsi-videobridge/blob/master/doc/
rest-videobridge.md

but I don't see any java service listening on 8080 port.
Searched the jvb.log and the only mention of the 8080 port is on the
INFO messages when reading onfigurations.

Did you add "rest" to the list of api in /etc/jitsi/videobridge/config?
JVB_OPTS="--apis=xmpp,rest"

Do I have to use TLS or maybe TCP_HARVESTER_PORT (this one is listening
only on IPv6)

No, this is something else.

Regards,
Boris

_______________________________________________
users mailing list
users@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/users

--
Regards,
Mirko


#4

You can verify in the logs, look for "sun.java.command".

Boris

···

On 11/08/16 09:54, Mirko Brankovic wrote:

Yes,
But somehow I think that what ever I put in there is not picked up.


#5

Hi,

Seems ok:
JVB 2016-08-11 16:56:13.138 INFO: [20]
org.jitsi.impl.configuration.ConfigurationServiceImpl.info()
sun.java.command=org.jitsi.videobridge.Main --host=localhost
--domain=<hostname> --port=5347 --secret=X --apis=rest,xmpp

and I have this one:
org.jitsi.videobridge.rest.jetty.port=8080

But:
netstat -tlnp | grep 8080

gives me nothing.

I guess i'm doing something wrong.

I looked for 8080 in log and i have this:

JVB 2016-08-11 16:56:13.518 INFO: [1]
org.jitsi.impl.configuration.ConfigurationServiceImpl.info()
org.jitsi.videobridge.rest.jetty.port=8080
JVB 2016-08-11 16:56:13.518 INFO: [1]
org.jitsi.impl.configuration.ConfigurationServiceImpl.info()
org.jitsi.videobridge.rest.jetty.tls.port=443

so everything from config is picked up.

but also this:

JVB 2016-08-11 16:56:13.605 WARNING: [20]
org.eclipse.jetty.util.component.AbstractLifeCycle.setFailed() FAILED
MuxServerConnector@4f42abc9{SSL-http/1.1}{0.0.0.0:443}:
java.net.SocketException: Permission denied
java.net.SocketException: Permission denied

but this port is already in use by nginx.

THanks,
MIrko

···

On Thu, Aug 11, 2016 at 5:13 PM, Boris Grozev <boris@jitsi.org> wrote:

On 11/08/16 09:54, Mirko Brankovic wrote:

Yes,
But somehow I think that what ever I put in there is not picked up.

You can verify in the logs, look for "sun.java.command".

Boris

_______________________________________________
users mailing list
users@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/users

--
Regards,
Mirko


#6

Potentially it fails because of failing to use 443. You don't need any properties for jetty unless you want to serve files over HTTP. Try removing them.

Boris

···

On 11/08/16 10:32, Mirko Brankovic wrote:

Hi,

Seems ok:
JVB 2016-08-11 16:56:13.138 INFO: [20]
org.jitsi.impl.configuration.ConfigurationServiceImpl.info
<http://org.jitsi.impl.configuration.ConfigurationServiceImpl.info>()
sun.java.command=org.jitsi.videobridge.Main --host=localhost
--domain=<hostname> --port=5347 --secret=X --apis=rest,xmpp

and I have this one:
org.jitsi.videobridge.rest.jetty.port=8080

But:
netstat -tlnp | grep 8080

gives me nothing.

I guess i'm doing something wrong.

I looked for 8080 in log and i have this:

JVB 2016-08-11 16:56:13.518 INFO: [1]
org.jitsi.impl.configuration.ConfigurationServiceImpl.info
<http://org.jitsi.impl.configuration.ConfigurationServiceImpl.info>()
org.jitsi.videobridge.rest.jetty.port=8080
JVB 2016-08-11 16:56:13.518 INFO: [1]
org.jitsi.impl.configuration.ConfigurationServiceImpl.info
<http://org.jitsi.impl.configuration.ConfigurationServiceImpl.info>()
org.jitsi.videobridge.rest.jetty.tls.port=443


#7

Yes since nginx is serving 443 no need for jetty to do it or vice versa.
I'll try to remove it and see if it will start the socket.

Thanks Boris,
Mirko

···

On Aug 11, 2016 6:44 PM, "Boris Grozev" <boris@jitsi.org> wrote:

On 11/08/16 10:32, Mirko Brankovic wrote:

Hi,

Seems ok:
JVB 2016-08-11 16:56:13.138 INFO: [20]
org.jitsi.impl.configuration.ConfigurationServiceImpl.info
<http://org.jitsi.impl.configuration.ConfigurationServiceImpl.info>()
sun.java.command=org.jitsi.videobridge.Main --host=localhost
--domain=<hostname> --port=5347 --secret=X --apis=rest,xmpp

and I have this one:
org.jitsi.videobridge.rest.jetty.port=8080

But:
netstat -tlnp | grep 8080

gives me nothing.

I guess i'm doing something wrong.

I looked for 8080 in log and i have this:

JVB 2016-08-11 16:56:13.518 INFO: [1]
org.jitsi.impl.configuration.ConfigurationServiceImpl.info
<http://org.jitsi.impl.configuration.ConfigurationServiceImpl.info>()
org.jitsi.videobridge.rest.jetty.port=8080
JVB 2016-08-11 16:56:13.518 INFO: [1]
org.jitsi.impl.configuration.ConfigurationServiceImpl.info
<http://org.jitsi.impl.configuration.ConfigurationServiceImpl.info>()
org.jitsi.videobridge.rest.jetty.tls.port=443

Potentially it fails because of failing to use 443. You don't need any
properties for jetty unless you want to serve files over HTTP. Try removing
them.

Boris

_______________________________________________
users mailing list
users@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/users


#8

HI Boris,

I removed all jetty setting and seems now it is starting:

JVB 2016-08-12 10:11:48.172 INFO: [20]
org.jitsi.rest.MuxServerConnector.doStart() Started
MuxServerConnector@265898c8{HTTP/1.1}{0.0.0.0:8080}
JVB 2016-08-12 10:11:48.173 INFO: [20]
org.eclipse.jetty.server.Server.doStart() Started @815ms

and port 8080 is opened
tcp6 0 0 :::8080 :::* LISTEN
     29786/java

and now with GET request I get back stats, first step.

:8080/colibri/stats

{"used_memory":7139,"threads":74,"videochannels":0,"bit_rate_download":"0","graceful_shutdown":false,"videostreams":0,"rtp_loss":"0","total_memory":101135,"bit_rate_upload":"0","current_timestamp":"2016-08-12
08:20:02.070","cpu_usage":"0.03183","audiochannels":0,"conferences":0,"participants":0}

Thanks for help,

Mirko

···

On Thu, Aug 11, 2016 at 9:38 PM, Mirko Brankovic <mirkobrankovic@gmail.com> wrote:

Yes since nginx is serving 443 no need for jetty to do it or vice versa.
I'll try to remove it and see if it will start the socket.

Thanks Boris,
Mirko

On Aug 11, 2016 6:44 PM, "Boris Grozev" <boris@jitsi.org> wrote:

On 11/08/16 10:32, Mirko Brankovic wrote:

Hi,

Seems ok:
JVB 2016-08-11 16:56:13.138 INFO: [20]
org.jitsi.impl.configuration.ConfigurationServiceImpl.info
<http://org.jitsi.impl.configuration.ConfigurationServiceImpl.info>()
sun.java.command=org.jitsi.videobridge.Main --host=localhost
--domain=<hostname> --port=5347 --secret=X --apis=rest,xmpp

and I have this one:
org.jitsi.videobridge.rest.jetty.port=8080

But:
netstat -tlnp | grep 8080

gives me nothing.

I guess i'm doing something wrong.

I looked for 8080 in log and i have this:

JVB 2016-08-11 16:56:13.518 INFO: [1]
org.jitsi.impl.configuration.ConfigurationServiceImpl.info
<http://org.jitsi.impl.configuration.ConfigurationServiceImpl.info>()
org.jitsi.videobridge.rest.jetty.port=8080
JVB 2016-08-11 16:56:13.518 INFO: [1]
org.jitsi.impl.configuration.ConfigurationServiceImpl.info
<http://org.jitsi.impl.configuration.ConfigurationServiceImpl.info>()
org.jitsi.videobridge.rest.jetty.tls.port=443

Potentially it fails because of failing to use 443. You don't need any
properties for jetty unless you want to serve files over HTTP. Try removing
them.

Boris

_______________________________________________
users mailing list
users@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/users

--
Regards,
Mirko