Jacktrip hub server on AWS

43 views
Skip to first unread message

Daisuke Yoshida

unread,
Jul 8, 2021, 7:19:53 AMJul 8
to jacktri...@googlegroups.com
Hello there,

I am trying to host a jacktrip hub server on AWS but I am having a difficult time configuring the EC2 server and if you could give me some suggestions it would be very helpful.

The problem that I am having is that after running a server as an EC2 ubuntu instance a client  fails to connect but it seems that the log from the server indicates that it recognizes that the client attempts connecting to the server

This is the EC2 instance information:

Details:
- instance type: t2.micro
- os: ubuntu server 20.04 LTS (HVM), SSD 64 bit (x86)
- vCPUs: 1
- Memory (GiB): 1
- Instance Storage(GB) : EBS only
- Network Performance: Low to Moderate
Security:
inbound rules:
- 0-65535 TCP 0.0.0.0/0
- 0-65535 UDP 0.0.0.0/0
--1 ICMP 0.0.0.0/0
outbound rules:
- All All 0.0.0.0/0
Storage
8gb


By the way, I can ping the server's public IP address from the client.

And this is the log I have from the server:

jackd
ubuntu@ip-172-31-45-254:~$ jackd -R -t500 -ddummy -r48000 -p256
jackdmp 1.9.12
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2016 Grame.
Copyright 2016-2017 Filipe Coelho.
jackdmp comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details
Cannot create RT messagebuffer thread: Operation not permitted (1)
Retrying messagebuffer thread without RT scheduling
Messagebuffer not realtime; consider enabling RT scheduling for user
no message buffer overruns
Cannot create RT messagebuffer thread: Operation not permitted (1)
Retrying messagebuffer thread without RT scheduling
Messagebuffer not realtime; consider enabling RT scheduling for user
no message buffer overruns
Cannot create RT messagebuffer thread: Operation not permitted (1)
Retrying messagebuffer thread without RT scheduling
Messagebuffer not realtime; consider enabling RT scheduling for user
no message buffer overruns
JACK server starting in realtime mode with priority 10
self-connect-mode is "Don't restrict self connect requests"
Cannot lock down 82280346 byte memory area (Cannot allocate memory)
Cannot use real-time scheduling (RR/10)(1: Operation not permitted)
AcquireSelfRealTime error
JackTimedDriver::Process XRun = 89 usec

jacktrip
ubuntu@ip-172-31-45-254:~$ jacktrip -S
JackTrip MULTI-THREADED SERVER: TCP Server Listening in Port = 4464
JackTrip MULTI-THREADED SERVER: Waiting for client connections...
=======================================================
JackTrip MULTI-THREADED SERVER: Client Connection Received!
JackTrip MULTI-THREADED SERVER: Client Connect Received from Address : ::ffff:125.193.226.118
Reading UDP port from Server...
Ready To Read From Socket!
JackTrip MULTI-THREADED SERVER: Client UDP Port is = 4464
JackTrip MULTI-THREADED SERVER: Client TCP Socket Closed!
---> JackTrip MULTI-THREADED SERVER: Spawning Listener...
---> JackTrip MULTI-THREADED SERVER: Starting Thread...
---> JackTripWorker: Creating jacktip objects...
---> JackTripWorker: Connecting signals and slots...
---> JackTripWorker: setJackTripFromClientHeader...
--->JackTripWorker: getPeerBufferSize = 256
--->JackTripWorker: getPeerSamplingRate = 3
--->JackTripWorker: getPeerBitResolution = 16
--->JackTripWorker: getPeerNumChannels = 1
--->JackTripWorker: getPeerConnectionMode = 0
---> JackTripWorker: startProcess...
Cannot lock down 82280346 byte memory area (Cannot allocate memory)
Setting JACK Process Callback...
SUCCESS
---------------------------------------------------------
The Sampling Rate is: 48000
---------------------------------------------------------
The Audio Buffer Size is: 256 samples
                      or: 1024 bytes
---------------------------------------------------------
The Number of Channels is: 1
---------------------------------------------------------
Using UDP Protocol
---------------------------------------------------------
WARNING: SERVER mode: Peer Address was set but will be deleted.
Waiting for Connection From Client...
Client Connection Received from IP : ::ffff:125.193.226.118
---------------------------------------------------------
Cannot use real-time scheduling (RR/5)(1: Operation not permitted)
JackClient::AcquireSelfRealTime error
---> JackTripWorker: start...

could not activate scheduling with priority 99
JackTrip MULTI-THREADED SERVER: Total Running Threads:  1
===============================================================
JackTrip MULTI-THREADED SERVER: Waiting for client connections...
=======================================================
terminate called after throwing an instance of 'std::runtime_error'
  what():  The Jack Server was shut down!
Aborted (core dumped)


Please let me know if you have any suggestions ! 



Thanks,
Daisuke




Mike O'Connor

unread,
Jul 8, 2021, 9:28:45 AMJul 8
to Jacktrip-users
hi Daisuke,

i'm not any good at EC2 configuration, but i did notice that Jacktrip threw two interesting error messages:

Cannot lock down 82280346 byte memory area (Cannot allocate memory)

Cannot use real-time scheduling (RR/5)(1: Operation not permitted)

Jacktrip needs to have permission to use realtime priority when it is running.  it's possible that's what's causing one or both of the error messages.  this is addressed during the installation of jackd (not jacktrip).  if you have been saying "No" at this point in the jackd installation, try saying "Yes" instead.  here's the way that looks when i'm installing Jack on a Debian server:



--
You received this message because you are subscribed to the Google Groups "jacktrip-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jacktrip-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jacktrip-users/CAO8UB83VNKy9Ev_s-jyUgi5uBKz5UQL9bEnMV5rKPwRh85O-5A%40mail.gmail.com.

Chris Chafe

unread,
Jul 8, 2021, 10:08:20 AMJul 8
to jacktri...@googlegroups.com
Hi -- you'll want to start jackd with the "dummy" driver since there's no physical audio interface.
Here's the line I use:
nohup /usr/bin/jackd -ddummy -r48000 -p<FPP> > /dev/null 2>&1 &
...where <FPP> is your choice of frames per packet
Chris

Daisuke Yoshida

unread,
Jul 8, 2021, 4:57:34 PMJul 8
to jacktri...@googlegroups.com
Thank you Mike and Chris.

I followed Mike's suggestion and increased the server's RAM by adding 8GiB to it (it was only 1GiB).
It's still not able to connect although the message "Operation not permitted..." is now gone. Thank you!

I will attach a new jackd and jacktrip log here. There isn't much change. 

Now I am wondering if I am missing important commands. This is the history of commands I executed on ubuntu. 

History
ubuntu@ip-172-31-4-242:~$ history
    1  sudo apt-get install qjackctl
    2  sudo apt-get install wget
    3  wget https://ccrma.stanford.edu/software/jacktrip/linux/jacktrip_1.1-1.deb
    4  sudo apt-get update -y
    5  sudo apt-get install -y jackd
    6  ls
    7  sudo dpkg -i jacktrip_1.1-1.deb
    8  usermod -a -G audio ubuntu
    9  sudo usermod -a -G audio ubuntu
   10  exit
   11  exit
   12  sudo usermod -a -G audio ubuntu
   13  jackd -R -t500 -ddummy -r48000 -p256
   14  jacktrip -S
   15  history

Logs
ubuntu@ip-172-31-4-242:~$ jacktrip -S

JackTrip MULTI-THREADED SERVER: TCP Server Listening in Port = 4464
JackTrip MULTI-THREADED SERVER: Waiting for client connections...
=======================================================
JackTrip MULTI-THREADED SERVER: Client Connection Received!
JackTrip MULTI-THREADED SERVER: Client Connect Received from Address : ::ffff:125.193.226.118
Reading UDP port from Server...
Ready To Read From Socket!
JackTrip MULTI-THREADED SERVER: Client UDP Port is = 4464
JackTrip MULTI-THREADED SERVER: Client TCP Socket Closed!
---> JackTrip MULTI-THREADED SERVER: Spawning Listener...
---> JackTrip MULTI-THREADED SERVER: Starting Thread...
---> JackTripWorker: Creating jacktip objects...
---> JackTripWorker: Connecting signals and slots...
---> JackTripWorker: setJackTripFromClientHeader...
--->JackTripWorker: getPeerBufferSize = 256
--->JackTripWorker: getPeerSamplingRate = 3
--->JackTripWorker: getPeerBitResolution = 16
--->JackTripWorker: getPeerNumChannels = 1
--->JackTripWorker: getPeerConnectionMode = 0
---> JackTripWorker: startProcess...
Setting JACK Process Callback...
SUCCESS
---------------------------------------------------------
The Sampling Rate is: 48000
---------------------------------------------------------
The Audio Buffer Size is: 256 samples
                      or: 1024 bytes
---------------------------------------------------------
The Number of Channels is: 1
---------------------------------------------------------
Using UDP Protocol
---------------------------------------------------------
WARNING: SERVER mode: Peer Address was set but will be deleted.
Waiting for Connection From Client...
Client Connection Received from IP : ::ffff:125.193.226.118
---------------------------------------------------------
---> JackTripWorker: start...

could not activate scheduling with priority 99
JackTrip MULTI-THREADED SERVER: Total Running Threads:  1
===============================================================
JackTrip MULTI-THREADED SERVER: Waiting for client connections...
=======================================================

ubuntu@ip-172-31-4-242:~$ jackd -R -t500 -ddummy -r48000 -p256

jackdmp 1.9.12
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2016 Grame.
Copyright 2016-2017 Filipe Coelho.
jackdmp comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details
no message buffer overruns
no message buffer overruns

no message buffer overruns
JACK server starting in realtime mode with priority 10
self-connect-mode is "Don't restrict self connect requests"
Connection to 54.238.47.35 closed by remote host.
Connection to 54.238.47.35 closed.





Daisuke Yoshida

unread,
Jul 8, 2021, 7:32:37 PMJul 8
to jacktri...@googlegroups.com
Hi guys,

Chris suggested jacktrip v1.4 and it worked successfully :) 

Thank you and have a great day!

Daisuke

Mike O'Connor

unread,
Jul 8, 2021, 8:15:05 PMJul 8
to Jacktrip-users
ah.  i see from your wget command in history line-3 that you're pulling a file called jacktrip_1.1-1.deb.  i note (to documentation type people) that this is what appears on the CCRMA site as the most current version of Jacktrip for Linux.  here's the link i'm referring to -- https://ccrma.stanford.edu/software/jacktrip/linux/index.html

a couple questions for the community.

- is this really the latest version?  i would think the link would reference some version of jacktrip 1.2 or 1.3 rather than 1.1.  the GitHub source pull is returning v1.3 right now.
- is Hub Mode in v1.1?  my memory is cloudy but i don't think it is.
- is there a place where a person could find the change-log of the versions of Jacktrip?

a question for Daisuke

- are you trying to run a server in the newer Hub Mode or the older lower-case server (which is i think what was in v1.1)?  if you're trying for Hub Mode (which is implied by the capital-S in your jacktrip command line) i think you've got to get a newer version of Jacktrip.  

i'm hoping the attract the attention of Smart People with all my stumbles here.  :-)

mike



<Jackd-realtime.png>

Daisuke Yoshida

unread,
Jul 9, 2021, 8:08:00 AMJul 9
to jacktri...@googlegroups.com
Hi Mike,

Yes I also noticed that the instruction I was following on the website should be updated. I have emailed Chris about that and he says he will update it soon. 

I think I can answer a few of your questions. Please see inline below.

Daisuke

On Fri, Jul 9, 2021 at 9:15 AM Mike O'Connor <oconn...@gmail.com> wrote:
ah.  i see from your wget command in history line-3 that you're pulling a file called jacktrip_1.1-1.deb.  i note (to documentation type people) that this is what appears on the CCRMA site as the most current version of Jacktrip for Linux.  here's the link i'm referring to -- https://ccrma.stanford.edu/software/jacktrip/linux/index.html

a couple questions for the community.

- is this really the latest version?  i would think the link would reference some version of jacktrip 1.2 or 1.3 rather than 1.1.  the GitHub source pull is returning v1.3 right now.
[dy] yes. The stable version seems like 1.3 and 1.4 is the 
1.4 is beta 
From email from Chris 
----
these installers might be of interest: (beta v1.4.0)
and this emerging doc site
- is Hub Mode in v1.1?  my memory is cloudy but i don't think it is.
- is there a place where a person could find the change-log of the versions of Jacktrip?

a question for Daisuke

- are you trying to run a server in the newer Hub Mode or the older lower-case server (which is i think what was in v1.1)?  if you're trying for Hub Mode (which is implied by the capital-S in your jacktrip command line) i think you've got to get a newer version of Jacktrip.  

[dy] Yes. a big S server hub mode was what I wanted to do.
 

Mike O'Connor

unread,
Jul 9, 2021, 8:19:22 AMJul 9
to Jacktrip-users
hi Daisuke,

sorry about the emails crossing.  i hadn't gotten to your note when i wrote that last one.  i was delighted to see that Chris pointed you at version 1.4.  that implies that it's getting pretty close to release!  great news, that.  :-)

thanks for your reply,

mike

Reply all
Reply to author
Forward
0 new messages