Jump to content
  • 0

Had issues updating a docker based instance from a previous version

Jinhyeok Lee



1. An existing docker volume ignores new AMS server apps
2. Manually executing install.sh script's -r option also fails
3. Under certain circumstances, creating an application fails without a detailed message

Hi team, last week I tried to update our AMS server from to 2.4.3 to make use of SRT ingestion, but it didn't work as expected.

My workflow is based on the official docker-compose case. (Even if there wasn't one, I have to come up with one) With Dockerfile that ADDs ams.zip file into the ubuntu image, it successfully "install"ed the latest version but always ended up staying at the previous version.

I checked the Dockerfile, saw the installation script, tried the `-r true` option, but failed. Because `docker-compose` has the `antmedia` directory mounted as a volume but the installation script tried to `mv` it as a backup, which docker disallows of course. I had to fiddle around the script (for example using `cp -r -p` instead of `mv` but it never completed for some reason?) but ended up wiping the docker volume and start anew. 

I think an official way to migrate a docker volume to the latest version that supports docker-compose would be really helpful in the long run.


One more thing,

I found out that one specific ec2 instance was flat rejecting any application creation in the dashboard, regardless of WAR or not. Without comprehensive error messages it just failed to create an application.

I digged into the container and found out that a `StreamApp-{version}.war` file is sitting alone in a directory I tried to create. Even `create.sh` didn't work with another cryptic message, 'jar command not found'. It turns out that very container was indeed missing `jar` command for whatever reasons. It had java SDK (not a runtime) installed. `java --version` worked totally fine with openjdk-11-sdk listed but checking `which jar` resulted none! So I re-installed openjdk-11-sdk again through `apt-get` and then I could create an application in the AMS dashboard as expected. Phew.

I am not a Java expert but yeah, that happened. 🤷‍♂️


Jinhyeok Lee

Edited by Jinhyeok Lee
Link to comment
Share on other sites

  • Answers 2
  • Created
  • Last Reply

Top Posters For This Question

Top Posters For This Question

2 answers to this question

Recommended Posts

  • 0
Posted (edited)

Oof, just spun up a fresh AMI ec2 instance and 'jar' was missing again.

ec2-user@ip-__ antmedia]$ docker container ls
CONTAINER ID   IMAGE               COMMAND                  CREATED         STATUS         PORTS     NAMES
9695576ebde6   antmedia_antmedia   "/usr/local/antmedia…"   5 minutes ago   Up 5 minutes             antmedia

[ec2-user@ip-__ antmedia]$ docker exec -it 969557 bash

root@ip-__:/# which java
root@ip-__:/# which jar

So obviously I did the same trick again:

root@ip-__:/# apt-get install openjdk-11-jdk
{... snip ...}
root@ip-__:/# which jar


Edited by Jinhyeok Lee
Link to comment
Share on other sites

  • 0

Thank you for your effort. The reason the jar could not be found is because we have migrated from JDK to JRE. You can temporarily install the JDK package again and create a webapp. For your first question, Mount is not enabled in the default compose file. So seeing the old version is only related to running the old image.

apt-get install openjdk-11-jdk


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...