red5-web.properties getting reset when antmedia is restarted

360 views
Skip to first unread message

Daniel B

unread,
Feb 24, 2021, 1:04:14 PM2/24/21
to Ant Media Server

I'm using enterprise edition in cluster mode. I need to make changes in all apps to set:

settings.maxResolutionAccept=1080
tokenHashSecret=hash
settings.hashControlPublishEnabled=true

Every time antmedia restarts all three settings get reset to:

settings.maxResolutionAccept=0
tokenHashSecret=
settings.hashControlPublishEnabled=false

There is only one app that keeps these changes. And on that app when it was first created I made these changes before restarting antmedia. That's the only difference I can see. How can I make these changes stick?

FYI the same thing happens if I change a setting for an app in the admin area so I don't change anything there.

And I see this in the logs when I restart:

2021-02-24 11:25:23,346 [vert.x-eventloop-thread-3] INFO  i.a.enterprise.cluster.TcpCluster - Update settings from cluster for app:APPNAME
2021-02-24 11:25:23,348 [vert.x-eventloop-thread-3] WARN  i.a.AntMediaApplicationAdapter - app settings updated for APPNAME

So where is it updating from?

Selim Emre

unread,
Feb 24, 2021, 1:54:13 PM2/24/21
to Ant Media Server
Hi Daniel,

Thank you for the great question!

You just need to change these settings in MongoDB. But please also update "updateTime" parameter in MongoDB app settings. 

I hope, I could help you.

Best Regards,
Selim

Daniel B

unread,
Feb 24, 2021, 3:17:58 PM2/24/21
to Ant Media Server
All the docs say to make these changes in red5-web.properties and restart. I don't know anything about MongoDB. Can you give me an example of how I could make these changes via mongo command line? 

Thank you for your help.

Selim Emre

unread,
Feb 24, 2021, 5:59:55 PM2/24/21
to Ant Media Server
Hi Daniel,

Our documents refer to standalone mode by default. You can use Mongo DB GUI(Robo 3T) for your requirements.
Here are the steps:
1- Install Robo 3T.
2- Login MongoDB with your mongo db credentials
3- Double click clustertab/Collections/AppSettings tabs.
4- Select the setting which is you are using. 
5- Change settings what you want.

PS: After changes settings, please update "updateTime" parameter with the current timestamp.

I have attached some details about the GUI. I believe you can do it. 

Let me know if there is anything I can help you with.

Best Regards,
Selim

Screenshot from 2021-02-25 01-47-00.png
Screenshot from 2021-02-25 01-50-16.png
Screenshot from 2021-02-25 01-54-34.png

Daniel B

unread,
Feb 25, 2021, 6:03:53 AM2/25/21
to Ant Media Server
Thank you Selim that was very helpful. The last app I added (the one where red5-web.properties doesn't get reset) is not in the database under app settings. It seems to be working as it should. But should I somehow add it to the database? Or if it's not needed can I remove the others so they will use the red5-web.properties files? I don't know why the last app I added is not in there but liveapp and WebRTCAppEE are also missing.

Daniel B

unread,
Feb 25, 2021, 9:57:17 AM2/25/21
to Ant Media Server
Ok I understand how it works now. When you save settings in the admin panel it adds/updates the settings in the db for that app. The one app I had that wasn't in the DB wasn't in the DB because I never saved settings in the admin area for that app. I made all the changes I needed in red5-web.properties

Selim Emre

unread,
Feb 25, 2021, 11:28:03 AM2/25/21
to Ant Media Server
Hi Daniel,

Have a good day. 

When you save settings in the admin panel it adds/updates the settings in the db for that app
Absolutely right!

The one app I had that wasn't in the DB wasn't in the DB because I never saved settings in the admin area for that app
Just go Ant Media Server Dashboard Application settings and click save button. After that, please check MongoDB again.

I made all the changes I needed in red5-web.properties
If you add/change settings in Mongo DB settings, no need to change local red5-web.properties file. Server applications get the settings from Mongo DB.

I hope, it's clear.

Best Regards,
Selim
Reply all
Reply to author
Forward
0 new messages