question about admin API

1,083 views
Skip to first unread message

Andres Gonzalez

unread,
Jan 1, 2016, 9:40:44 PM1/1/16
to meetecho-janus
Hi,

I currently have janus running and is accessed using node.js configured as a proxy to janus. This appears to be working well as I am able to interact with the janus http API.

I am now trying to setup the /admin interface also using node.js as the proxy. When I give it   hostname/7088/admin I get the following response:

{
    janus: "error",
    error: {
        code: 454,
        reason: "Request payload missing"
    }
}

What is the missing request payload?

Thanks,

-Andres

Lorenzo Miniero

unread,
Jan 3, 2016, 6:17:25 AM1/3/16
to meetecho-janus
7088 is not a path, but a port. You're probably still contacting the Janus API webserver which always expects a POST with a payload, except for long polls on the session path (which /7088/admin isn't).

L.

Andres Gonzalez

unread,
Jan 4, 2016, 12:07:13 PM1/4/16
to meetecho-janus
This is a repost because it appears that I replyed incorrectly to the responder (Lorenzo) and not to this group. Hopefully this will not show up twice.


I am so sorry, my typo. I am using the URL:  hostname:7088/admin

I recognize this is a basic web/proxy issue but for some reason it still confuses me.

I am using node.js/express as my primary web server so I access it using the URL:  hostname:3000
I setup a proxy in node.js for Janus so now in my javascript code I use the URL:  hostname:8088/janus to access the janus server. This is all working fine and makes perfect sense to me. 

I then setup node.js the exact same way for the Janus admin API, so I thought the URL: hostname:7088/admin would be the correct usage. I think the node.js proxy config is correct because the janus logs do indeed show that a request was received by janus:

[Mon Jan  4 11:26:02 2016] Got an admin/monitor HTTP GET request on /admin...
[Mon Jan  4 11:26:02 2016] [(null)] Returning error 454 (Request payload missing)

The document "Understanding the Janus admin API" mentions an "admin.html" so I thought that it would be served when using the URL: hostname:7088/admin.

Lorenzo Miniero

unread,
Jan 4, 2016, 12:09:19 PM1/4/16
to meetecho-janus
As for the Janus API, the Admin API also always expects a POST with a payload:

L.

Andres Gonzalez

unread,
Jan 4, 2016, 1:44:04 PM1/4/16
to meetecho-janus
Thank you for your reply and clarifications.   I used the demo admin.html and admin.js as a guide and now I have the admin interface working fine now.  This is very nice and provides valuable insight into what is going on internally.  I cannot imagine debugging WebRTC code without it.  Very impressive--thank you!

-Andres

Minal Chotalal

unread,
Jul 30, 2022, 2:29:28 PM7/30/22
to meetecho-janus
Hi Andres, 

Can you explain what you did? Or give some guidelines please? 
I am getting the same error and don't understand how should I solve it ... 

Kind Regards, 

Minal 

Reply all
Reply to author
Forward
0 new messages