Unable to start server with default config

1,193 views
Skip to first unread message

Martin Dratva

unread,
Apr 14, 2017, 12:15:17 PM4/14/17
to meetecho-janus
Hi,

I have installed janus and can not seem to start it, using basically default configs. I am using Arch Linux on Raspberry Pi 3 and I can't tell, whether there is issue with my system or I have found some strange bug, because googling did not really found anyone else having this problem.

Error:
[FATAL] [transports/janus_http.c:janus_http_init:689] Couldn't start webserver on port 8088...
[FATAL] [transports/janus_http.c:janus_http_init:805] No HTTP/HTTPS server started, giving up...


Thanks for any help.

Mirko Brankovic

unread,
Apr 14, 2017, 12:55:36 PM4/14/17
to meetecho-janus
Maybe you can pastebin transport.http. config file?

--
You received this message because you are subscribed to the Google Groups "meetecho-janus" group.
To unsubscribe from this group and stop receiving emails from it, send an email to meetecho-janus+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Martin Dratva

unread,
Apr 14, 2017, 12:59:04 PM4/14/17
to meetecho-janus
I believe it is vanilla config: https://pastebin.com/Lc1yCmLp


On Friday, April 14, 2017 at 6:55:36 PM UTC+2, Mirko Brankovic wrote:
Maybe you can pastebin transport.http. config file?

On Apr 14, 2017 18:15, "Martin Dratva" <martin...@gmail.com> wrote:
Hi,

I have installed janus and can not seem to start it, using basically default configs. I am using Arch Linux on Raspberry Pi 3 and I can't tell, whether there is issue with my system or I 

To unsubscribe from this group and stop receiving emails from it, send an email to meetecho-janu...@googlegroups.com.

Alessandro Amirante

unread,
Apr 14, 2017, 3:08:56 PM4/14/17
to Martin Dratva, meetecho-janus
Maybe port 8088 already taken?

A.

To unsubscribe from this group and stop receiving emails from it, send an email to meetecho-janus+unsubscribe@googlegroups.com.

Martin Dratva

unread,
Apr 14, 2017, 3:55:46 PM4/14/17
to meetecho-janus, martin...@gmail.com
I have checked that. It is not taken. I could start Python's SimpleHTTPServer on that port without any issue. I also changed janus configuration to different port with the same result. 

Lorenzo Miniero

unread,
Apr 14, 2017, 4:06:23 PM4/14/17
to meetecho-janus, martin...@gmail.com
I guess MHD_start_daemon (from the library we use for the web server) is returning NULL for you. Check the documentation for possible causes: https://www.gnu.org/software/libmicrohttpd/manual/html_node/microhttpd_002dconst.html

L.

Bimalkant Lauhny

unread,
Apr 17, 2017, 8:43:11 AM4/17/17
to meetecho-janus
Hello Martin,

I'm having same error! Were you able to solve this error? If yes, please share you experience.

Thanks.

Martin Dratva

unread,
Apr 17, 2017, 8:51:07 AM4/17/17
to meetecho-janus
Hi, 

I had a brief look at what Lorenzo suggested, but most of the issues in that documentation did not apply to me. 
At least those, I understood did not apply. I did not understood some. 
I gave up on janus and did not follow through with it, because I have found other solution to what I wanted to achieve. 

Bimalkant Lauhny

unread,
Apr 17, 2017, 8:53:35 AM4/17/17
to meetecho-janus
Thanks for replying Martin,

I guess I'll have to figure this one out on my own!

Lorenzo Miniero

unread,
Apr 17, 2017, 9:10:07 AM4/17/17
to meetecho-janus
Try a different port, or specifying IP/interface to bind to in the settings. Maybe binding to all (default) fails for some reason in your setup.

L.

Mirko Brankovic

unread,
Apr 17, 2017, 4:20:34 PM4/17/17
to meetecho-janus
Probably is libmicrohttp problem on specific environment.
Maybe you should paste your OS details where you are trying to build janus, so that someone can try in in virtual env.

--
You received this message because you are subscribed to the Google Groups "meetecho-janus" group.
To unsubscribe from this group and stop receiving emails from it, send an email to meetecho-janus+unsubscribe@googlegroups.com.

Bimalkant Lauhny

unread,
Apr 18, 2017, 9:33:52 AM4/18/17
to meetecho-janus
I'm using Arch Linux.

This is the output of 'uname -a' command -

Linux BitBox 4.10.9-1-ARCH #1 SMP PREEMPT Sat Apr 8 12:39:59 CEST 2017 x86_64 GNU/Linux

Bimalkant Lauhny

unread,
Apr 18, 2017, 9:59:09 AM4/18/17
to meetecho-janus
One thing more!

I'm using janus from past 2 months. Earlier it worked. There wero no such errors.

This is the error -

[FATAL] [transports/janus_http.c:janus_http_init:686] Couldn't start webserver on port 8088...

Before it started giving this error, I had updated and downgraded janus a few times for development purposes.
As far as I remember, it suddenly stopped working, maybe 2 weeks ago.

Lorenzo Miniero

unread,
Apr 18, 2017, 10:50:49 AM4/18/17
to meetecho-janus
Try going back commits until you find the one that breaks it for you (just in case a commit's the cause).

L.

Ju Ju

unread,
Apr 18, 2017, 3:10:31 PM4/18/17
to meetecho-janus
I had the same pb once after a change in the config file (janus transport http conf file)  I have to re install (just a new make install) janus to solve it.
I couldn't see any issue in the config file but obviously there was...

Bimalkant Lauhny

unread,
Apr 19, 2017, 1:48:30 PM4/19/17
to meetecho-janus
Thanks for replying Lorenzo and Ju Ju,

For dev purposes, I'm constantly doing reinstallations for different commits....
I have been tracking the commits from version 0.2.1 (commit done in October 2016).

Still, no success!

So, I guess, installation is not the problem.
May be it's associated with dependencies.
Currently, I'm quite busy due to academics (exams and practicals!).. Therefore I'm not able to get into dependencies (Mirko's suggestion!).
I'll have a look into that this weekend and let u all know the results.

Thanks to all of you for your support...

Bimalkant Lauhny

unread,
Apr 20, 2017, 11:41:04 AM4/20/17
to meetecho-janus
As Mirko had suggested, I reinstalled libmicrohttpd. It didn't work.

Then I removed and reinstalled all the dependencies. Again, it didn't work.

There is one more error that I noticed :

'[ERR] [plugins/janus_voicemail.c:janus_voicemail_init:362] Unknown error -1'.

Are these related? I mean, is it like HTTP/HTTPS server start failure is related to this error??

Thanks...

Mirko Brankovic

unread,
Apr 20, 2017, 12:05:13 PM4/20/17
to meetecho-janus
Seems to me that you have some permitions issue. Not sure about http server, but voicemail plugin defenatelly can't create dir probably stated in conf file and returns -1. // No point of going further.
Try to change all dirs to /tmp maybe or run as root once as a test 

Bimalkant Lauhny

unread,
Apr 20, 2017, 2:34:28 PM4/20/17
to meetecho-janus
Thanks for reply Mirko.

I tried to run janus with root permissions. The 'voicemail' error is gone.
But, the server error is still there.

Should I try changing directories to '/tmp'?

Mirko Brankovic

unread,
Apr 21, 2017, 2:59:47 AM4/21/17
to meetecho-janus
Well it is not a good practice to ran anything as a root, so better think of a place where janus can have r+w permissions for voicemail.
Though http is still a problem

--

Lorenzo Miniero

unread,
Apr 21, 2017, 5:23:47 AM4/21/17
to meetecho-janus
Have you tried with a different OS? Try bringing this issue to the libmicrohttpd or Arch Linux forums, because I don't think it's Janus related.

L.

Eirik Sletteberg

unread,
Apr 23, 2017, 7:38:53 AM4/23/17
to meetecho-janus
I'm experiencing the same problem, on Mac OS. I've tried changing ports, interfaces or ip addresses, that doesn't help. Using v0.2.2 of the gateway, pretty much a vanilla config.
When I compile the same codebase in Ubuntu 17.04, inside a Docker container, it works like expected.
It could be a problem with libmicrohttpd...
To unsubscribe from this group and stop receiving emails from it, send an email to meetecho-janu...@googlegroups.com.

Lorenzo Miniero

unread,
Apr 23, 2017, 7:44:15 AM4/23/17
to Eirik Sletteberg, meetecho-janus
Have you guys tried playing with the interface/ip to bind to in the http plugin settings as I suggested? Just to check if it's a problem binding to one that causes all to fail, as by default it tries to bind to all available interfaces.

L.

To unsubscribe from this group and stop receiving emails from it, send an email to meetecho-janus+unsubscribe@googlegroups.com.

Eirik Sletteberg

unread,
Apr 23, 2017, 11:06:36 AM4/23/17
to meetecho-janus, eiriksl...@gmail.com
I tried to bind to ip addresses 127.0.0.1 and/or 0.0.0.0, port 1339/random numbers, interface eth0, eth1, lo0, in all combinations, with no luck.

Mirko Brankovic

unread,
Apr 24, 2017, 7:22:13 AM4/24/17
to meetecho-janus, eiriksl...@gmail.com
I have the same problem with latest code.
Same for any interface and for specific ones.

I'll try to trace which commit brakes it

Mirko Brankovic

unread,
Apr 24, 2017, 7:31:52 AM4/24/17
to meetecho-janus, eiriksl...@gmail.com
On Fedora
I see I have this microhttpd:
libmicrohttpd.x86_64                                             1:0.9.53-1.fc25 
and reverting back to:
libmicrohttpd.x86_64                                             0.9.46-2.fc24                                             

And I got it running, so something in those 2 are braking

HTTP webserver started (port 8088, /janus path listener)...

Lorenzo Miniero

unread,
Apr 24, 2017, 8:51:01 AM4/24/17
to meetecho-janus, eiriksl...@gmail.com
I am on Fedora too, and I'm still on 0.9.46, which might explain why it's working fine for me. From a quick look at the changelog, it looks like they renamed some MHD_ flags, that is those you pass when creating the daemon: anyway, the old names should still be valid, as they say "Old flag names are supported for backward compatibility", so it shouldn't be the cause.

Have you checked if configuring a thread pool size instead of "unlimited" works instead?

L.

Mirko Brankovic

unread,
Apr 24, 2017, 9:16:19 AM4/24/17
to meetecho-janus
Indeed, "unlimited" is braking it.

Using a thread pool of size 20 the Janus API HTTP webserver
Binding to IP '127.0.0.1' for the Janus API HTTP webserver

HTTP webserver started (port 8088, /janus path listener)... 

But how to use thread per connection now?

To unsubscribe from this group and stop receiving emails from it, send an email to meetecho-janus+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Regards,
Mirko

Lorenzo Miniero

unread,
Apr 24, 2017, 9:18:31 AM4/24/17
to meetecho-janus, eiriksl...@gmail.com
Just upgraded to make some tests myself, and apparently the cause is MHD_USE_POLL: when you remove that, the daemon starts. Anyway, that sucks, because if you don't use poll, you use select, which has several limitations. My guess is that the installed libmicrohttpd version has been compiled thinking poll is not available and so it fails, which shouldn't happen.

I'll write on the MHD library to notify this. For the time being, stick to older versions of the library, or try to compile/install the latest version manually to see if the MHD_USE_POLL error goes away (no time to make such tests myself).

L.

Lorenzo Miniero

unread,
Apr 24, 2017, 9:25:53 AM4/24/17
to meetecho-janus
It's not the "unlimited", it's MHD_USE_POLL. The thread pool works because we don't use MHD_USE_POLL there.

L.

Lorenzo Miniero

unread,
Apr 24, 2017, 9:47:40 AM4/24/17
to meetecho-janus

Lorenzo Miniero

unread,
Apr 26, 2017, 6:47:09 AM4/26/17
to meetecho-janus
Dear all,

please let me know if this PR fixes it for you:


If so (it works for me with 0.9.53 on Fedora 25) I'll merge soon.

Lorenzo

Mirko Brankovic

unread,
Apr 26, 2017, 12:20:26 PM4/26/17
to meetecho-janus
It is ok for me, but similar/same ENV:
- basic config
-  log
Using a thread per connection for the Janus API HTTP webserver
Binding to all interfaces for the Janus API HTTP webserver
HTTP webserver started
(port 8088, /janus path listener)...
- version of microhttpd
Installed Packages
Name        : libmicrohttpd
Arch        : x86_64
Epoch       : 1
Version     : 0.9.53


Regards,
Mirko

Eirik Sletteberg

unread,
Apr 26, 2017, 4:46:32 PM4/26/17
to meetecho-janus
I can confirm that the PR fixes the issue for me.

fredag 14. april 2017 18.15.17 UTC+2 skrev Martin Dratva følgende:
Hi,

I have installed janus and can not seem to start it, using basically default configs. I am using Arch Linux on Raspberry Pi 3 and I can't tell, whether there is issue with my system or I have found some strange bug, because googling did not really found anyone else having this problem.

Error:
[FATAL] [transports/janus_http.c:janus_http_init:689] Couldn't start webserver on port 8088...
[FATAL] [transports/janus_http.c:janus_http_init:805] No HTTP/HTTPS server started, giving up...


Thanks for any help.

Lorenzo Miniero

unread,
Apr 27, 2017, 5:54:44 AM4/27/17
to meetecho-janus
Merged!

L.

Bimalkant Lauhny

unread,
Apr 27, 2017, 11:10:19 AM4/27/17
to meetecho-janus
Thanks Guys. It's working for me too. I'm using 4.10.11-1-ARCH #1 SMP PREEMPT Tue Apr 18 08:39:42 CEST 2017 x86_64 GNU/Linux...
Reply all
Reply to author
Forward
0 new messages