jacktrip server and client running on same machine?

579 views
Skip to first unread message

steve...@gmail.com

unread,
Jan 16, 2009, 1:31:12 PM1/16/09
to jacktrip-users
Hi all,

A friend and I are trying to get Jacktrip to work together...

I have setup jacktrip, jack, qjackctl etc and resolved all
dependencies on Slackware Linux 12.2.

My question is this:
Is it possible to have the Jacktrip server and Client running on the
same system?

If not that will explain why my friend could connect to my server
across the internet through my firewall, but couldn't hear me. On my
machine that had both jacktrip -s and jacktrip -c running, I saw the
connections in Qjackctl showing my sends and receives were connected
and since I didn't have the realtime kernel running at the time I
heard a slight delay - Thoughts?

Thanks in advance,
Steve.

Juan-Pablo Caceres

unread,
Jan 16, 2009, 2:16:48 PM1/16/09
to jacktri...@googlegroups.com
Hi Steve!

steve...@gmail.com wrote:
> Hi all,
>
> A friend and I are trying to get Jacktrip to work together...
>
> I have setup jacktrip, jack, qjackctl etc and resolved all
> dependencies on Slackware Linux 12.2.

That's good to hear, if you have the time, can you let me know or maybe
send me your Slackware port so we can make it public?

> My question is this:
> Is it possible to have the Jacktrip server and Client running on the
> same system?

Yes, it is, but you need to use different ports. The default is 4464,
and there is an offset option (-o) that you can use to increase (or
decrease) the default receiving port. For example, '-o 10' will make
the receiving port 4474 (4464+10)

> If not that will explain why my friend could connect to my server
> across the internet through my firewall, but couldn't hear me.

That is most probably happening because your friend has UDP port 4464
blocked. You have it open, so you could hear, but the packets never
reach him. When he connects to you, the last thing he sees is:

Waiting for Peer...

?
If that's true, try to check with iperf (intructions here
http://ccrma.stanford.edu/groups/soundwire/software/jacktrip-old/ under
'Testing your connection').

> On my
> machine that had both jacktrip -s and jacktrip -c running.

That's strange. If you run both at the same time, you should get an
error like:

terminate called after throwing an instance of 'std::runtime_error'
what(): Could not bind UDP socket. It may be already binded.
Aborted

Which is what I was explaining previously, you can only use once each
port, once the socket is binded, it can be re-binded by any other process.

> I saw the
> connections in Qjackctl showing my sends and receives were connected
> and since I didn't have the realtime kernel running at the time I
> heard a slight delay - Thoughts?

From what connection was that delay coming from? In qjackctl you can
tweak the Frames/Period to get lower local delay. The lower the better.
128 works usually fine in network connections.

Also, what version of JackTrip are you using? The latest one should tell
you with:
jacktrip -v

Let us know how it goes.
Best!
Juan-Pablo

steve...@gmail.com

unread,
Jan 16, 2009, 2:51:52 PM1/16/09
to jacktrip-users

Hi Juan-Pablo,

Thanks very much for your reply.

Re: Slackware port - I will see what I can do - this will take time
because I've never made a slackware package before but it gives me
good reason to do so.
To get all this working on Slackware required a lot of manual
dependency work because Slackware does not handle dependencies for
you, so I can post the package, but people will need to go out and get
all of the other packages from Slackbuilds.org or that type of
thing.

Thank you very much for all the info about port issues - yes I got
that error but I hadn't realized that it wasn't bound --hahah denial
perhaps because I saw connections in Qjackctl... anyhow - I will try
this out and experiment with the latency settings.

I am running Jacktrip 1.03.

Thank you very much for your prompt response and information and I'll
let you know how it goes.

Steve


On Jan 16, 11:16 am, Juan-Pablo Caceres <jcace...@ccrma.stanford.edu>
wrote:
> Hi Steve!

steve...@gmail.com

unread,
Jan 17, 2009, 3:54:05 AM1/17/09
to jacktrip-users
Update:

Ok, that info on the offset seemed to help me connect locally as did
it help my friend connect locally.
So jacktrip -s -o 10
and jacktrip -c myinternalip
all shows up in qjackctl for my local stuff:
JackTrip was always there, but now there is a JackTrip-01 shows with
the proper sends and receive linkage.

So thats 1 step in the right direction ...

So - the problem we are having now despite both opening the client
ports up on our pc's ... for me my offset was 10 so I opened 4464,
4474, 4484, 4494 - UDP ... He tried to connect to my external IP
address but gets stuck at Waiting for Peers - I've suggested for him
to install iperf and I installed it on my machine - any other
suggestions in the mean time while I wait for his output of iperf?

Thanks muchly,

Steve

On Jan 16, 11:51 am, "stevegb...@gmail.com" <stevegb...@gmail.com>
wrote:

Juan-Pablo Caceres

unread,
Jan 19, 2009, 5:11:26 PM1/19/09
to jacktri...@googlegroups.com
Hi Steve,

I am a little confused on what you're trying to achieve. It'll be great
if you can clarify it to me. The offset has to be the same on both the
client and server machine (BTW, client and server it's just the way the
connection is established, after it's running it's equivalent to
peer-to-peer). So both machines need to use the same ofset option. For
example:

jacktrip -s -o10

will listen on port 4474

jacktrip -c [IPofSERVER] -o10

will connect to the server on port 4474 and listen in port 4474 as well.
I actually have the ability to make this asymmetric, it's just that the
option is not included at the user level, but if you need this kind of
stuff I can add it. Something like:

jacktrip -s --localport 4474 --peerport 4464

for example, which will make the local machine listen on 4474 but
connect to a machine listening on 4464. On the client, you'll have to
write something like this:

jacktrip -c [IPofSERVER] --localport 4464 --peerport 4474

This asymmetry makes things more complicated for the user, but if people
need that I'll just add the option.

Best!
-- Juan-Pablo

steve...@gmail.com

unread,
Jan 26, 2009, 2:43:14 PM1/26/09
to jacktrip-users
Hi Juan-Pablo,

We are trying to achieve the following:
My PC is acting as jacktrip server and client for me, and server for
my friend connecting in.
So I guess on my server end I would issue:
jacktrip -s -o10
jacktrip -c localipaddress -o10

and my friend connecting to me across the internet would issue just:
jacktrip -c ExternalIPAddressForMyServer -o10

If this is correct we will try it like that.
From what I recall, I set the offest to 10, but i'm not sure if my
friend included the offset in his client connection to me so that
could be an issue. Also he told me something else that may or may not
also be a factor in his inability to properly connect as a client to
my server - I had him run jackd -d alsa -n 4, and it mentioned
something about libfreebob support missing - does he need that for
jacktrip (is it a essential dependancy for jack or jacktrip).

Thanks,
Steve



On Jan 19, 2:11 pm, Juan-Pablo Caceres <jcace...@ccrma.stanford.edu>
wrote:
> Hi Steve,
>
> I am a little confused on what you're trying to achieve. It'll be great
> if you can clarify it to me. The offset has to be the same on both the
> client and server machine (BTW, client and server it's just the way the
> connection is established, after it's running it's equivalent to
> peer-to-peer). So both machines need to use the same ofset option. For
> example:
>
> jacktrip -s -o10
>
> will listen on port 4474
>
> jacktrip -c [IPofSERVER] -o10
>
> will connect to the server on port 4474 and listen in port 4474 as well.
> I actually have the ability to make this asymmetric, it's just that the
> option is not included at the user level, but if you need this kind of
> stuff I can add it. Something like:
>
> jacktrip -s --localport 4474 --peerport 4464
>
> for example, which will make the local machine listen on 4474 but
> connect to a machine listening on 4464. On the client, you'll have to
> write something like this:
>
> jacktrip -c [IPofSERVER] --localport 4464 --peerport 4474
>
> This asymmetry makes things more complicated for the user, but if people
> need that I'll just add the option.
>
> Best!
> -- Juan-Pablo
>

Juan-Pablo Caceres

unread,
Feb 3, 2009, 1:14:43 PM2/3/09
to jacktri...@googlegroups.com
Hi Steve,

Sorry for the delay, I've been traveling.

On 1/26/09 11:43 AM, steve...@gmail.com wrote:
> Hi Juan-Pablo,
>
> We are trying to achieve the following:
> My PC is acting as jacktrip server and client for me, and server for
> my friend connecting in.

I think the confusion is here. You don't need to act as server AND
client and the same time (unless you want to do something else that a
normal peer to peer connection). You just decide who's the server and
who's the client, and that's it. You don't need the offsets unless you
want to change the default port 4464.

For example, just fire jacktrip on your machine with:

jacktrip -s

and in your friend's machine:

jacktrip -c [YOUR-IP-ADDRESS]


I doesn't really matter who starts the server and the client, and for
that matter, you can both be clients, you do:
jacktrip -c [YOUR-FRIENDS-IP]

and your friend:
jacktrip -c [YOUR-IP-ADDRESS]


The server mode is kind of an easier way to wait for any client, but
both configurations do the same. Of course, UDP port 4464 needs to be
open on both machines.


> Also he told me something else that may or may not
> also be a factor in his inability to properly connect as a client to
> my server - I had him run jackd -d alsa -n 4, and it mentioned
> something about libfreebob support missing - does he need that for
> jacktrip (is it a essential dependancy for jack or jacktrip).

Maybe it's easier if you start jack with qjackctl?

-- Juan-Pablo

Reply all
Reply to author
Forward
0 new messages