Seeking Assistance: OpenCast Container Shutdown Issue After System Restart

68 views
Skip to first unread message

Gedion Daniel

unread,
Mar 7, 2024, 7:30:46 AMMar 7
to Opencast Users
When I restart the system, the OpenCast container goes down after just 2 minutes. Any insights or assistance on resolving this issue would be greatly appreciated.

Here's the log:

root@netaxis-HP-ProBook-430-G3:/data/service/opencast# docker-compose -f docker-compose.yml up -d
opencast_pyca-capture_1 is up-to-date
opencast_opensearch_1 is up-to-date
Starting opencast_opencast_1 ...
opencast_pyca-schedule_1 is up-to-date
opencast_pyca-agentstate_1 is up-to-date
opencast_pyca-ingest_1 is up-to-date
opencast_pyca-ui_1 is up-to-date
Starting opencast_opencast_1 ... done
root@netaxis-HP-ProBook-430-G3:/data/service/opencast#

Greg Logan

unread,
Mar 7, 2024, 2:56:54 PMMar 7
to Opencast Users
Hi Gedion,

The docker logs for the Opencast container would probably tell you best. I could see memory exhaustion being a cause, depending on how much ram you have available, but without more information it's hard to tell what's going on. 

G

--
To unsubscribe from this group and stop receiving emails from it, send an email to users+un...@opencast.org.

Gedion Daniel

unread,
Mar 7, 2024, 3:19:44 PMMar 7
to us...@opencast.org
Hi there,

I checked the logs and solved the problem thanks, and I have another query. I want to customize the logo, name, and color of the Opencast admin interface and module series page, but I'm unable to locate the relevant files. For reference, I installed Opencast and PyCA using Docker. Could you please advise on where these files might be located?

Cheers, G

To unsubscribe from this topic, visit https://groups.google.com/a/opencast.org/d/topic/users/aI2FyyR29BI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to users+un...@opencast.org.

Matthias Neugebauer

unread,
Mar 8, 2024, 5:31:21 AMMar 8
to Opencast Users
Hi Gedion,

There are no configuration options for customizing the logo, name or color of the Admin UI. You would have to change the source files and build Opencast yourself. For Tobira (the modern Opencast video portal https://tobira.opencast.org/) there are some options for adapting the design.

Note that the pyCA container image hasn’t been updated for some time. We still have not created a GitHub Actions workflow to do so automatically. You may want to rebuild the image yourself. We run pyCA in a container, but I wasn’t expecting that others would do so as well. Glad to see that we have company :D I will try to write a GitHub workflow in the coming days.

– Matthias

Gedion Daniel

unread,
Mar 8, 2024, 5:44:54 AMMar 8
to us...@opencast.org
Hi,

Thanks for the details! I'm considering updating the source files for customization. However, since Opencast is currently within a container, I'm unsure where these files are located. Could you provide guidance on how to access and modify these source files within the container? Additionally, if I want to map images and other assets to the container for customization, how can I accomplish that?

Thanks,
Gedion

Gedion Daniel

unread,
Mar 8, 2024, 5:50:08 AMMar 8
to us...@opencast.org
I'm also encountering an issue with the database configuration. Despite configuring everything correctly with MariaDB, the data isn't being saved, and it's not appearing in the admin panel after restarting the container. Could you provide any insights on troubleshooting this database issue?

Thanks,
Gedion

Matthias Neugebauer

unread,
Mar 8, 2024, 6:58:50 AMMar 8
to us...@opencast.org
Hi Gedion,

Then Opencast is configured to use H2 as data store and data is located within in the container file system. When recreating the container, the data is lost. H2 is the default as no additional service needs to run besides Opencast, but it is only meant for testing purposes. You need to change the Opencast configuration and mount files you changed to /etc/opencast. From there they will be merged with the default configuration. You can also set some env variables, but typically Opencast installations change more settings and you can therefore directly mount files into the container.

Opencast is a Java application. Source files are compiled into JAR archives. You could extract the archives and change frontend assets, but it would be easier to download the source, change stuff there and compile Opencast yourself. Note that the Opencast community does not provide support for rebranding apart from provided configuration options.

– Matthias

Gedion Daniel

unread,
Mar 8, 2024, 7:43:26 AMMar 8
to us...@opencast.org
-> You need to change the Opencast configuration and mount files you changed to /etc/opencast.

I'm trying to set up the mapping, but I'm not sure where I'm making a mistake. Let me share my code with you.

this is docker-compose.yml 
  opencast:
    image: quay.io/opencast/allinone:15.1
    environment:
      ORG_OPENCASTPROJECT_SERVER_URL: http://192.168.60.236:8080
      ORG_OPENCASTPROJECT_DOWNLOAD_URL: http://192.168.60.236:8080/static
      ORG_OPENCASTPROJECT_SECURITY_ADMIN_USER: admin
      ORG_OPENCASTPROJECT_SECURITY_ADMIN_PASS: opencast
      ORG_OPENCASTPROJECT_SECURITY_DIGEST_USER: opencast_system_account
      ORG_OPENCASTPROJECT_SECURITY_DIGEST_PASS: CHANGE_ME
      ORG_OPENCASTPROJECT_DB_VENDOR: MariaDB
      ORG_OPENCASTPROJECT_DB_JDBC_URL: jdbc:mariadb://10.1.1.1/opencast?useMysqlMetadata=true
      ORG_OPENCASTPROJECT_DB_JDBC_USER: opencast
      ORG_OPENCASTPROJECT_DB_JDBC_PASS: opencast
      ELASTICSEARCH_SERVER_HOST: opensearch
    ports:
      - "8080:8080"
    volumes:
      - /data/service/opencast/data:/data
#      - /data/service/opencast/etc:/etc
      - /data/service/opencast/archive:/archive

this is custom.properties file inside the docker container

######### DATABASE #########

# Relational Database configuration.
# By default, Opencast uses an embedded H2 database.
# Use a standalone database server for production systems.

# Opencast comes with the jdbc drivers for MariaDB (org.mariadb.jdbc.Driver) and PostgreSQL (org.postgresql.Driver).
# To add other jdbcDrivers to the Opencast runtime, rebuild the db module with your desired drivers.
org.opencastproject.db.jdbc.driver=org.mariadb.jdbc.Driver

# The jdbc connection url, username, and password
# Defaults:
#  .url=jdbc:h2:${org.opencastproject.storage.dir}/db
#  .user=sa
#  .pass=sa
org.opencastproject.db.jdbc.url=jdbc:mariadb://10.1.1.1/opencast?useMysqlMetadata=true
org.opencastproject.db.jdbc.user=opencast
org.opencastproject.db.jdbc.pass=opencast

# The jdbc connection pool properties. See https://mchange.com/projects/c3p0/#basic_pool_configuration
# max.idle.time should be lower than the database server idle connection timeout duration (wait_timeout for MariaDB)
#org.opencastproject.db.jdbc.pool.max.size=15
#org.opencastproject.db.jdbc.pool.min.size=3
#org.opencastproject.db.jdbc.pool.acquire.increment=3
#org.opencastproject.db.jdbc.pool.max.statements=0
#org.opencastproject.db.jdbc.pool.login.timeout=1000
#org.opencastproject.db.jdbc.pool.max.idle.time=3600
#org.opencastproject.db.jdbc.pool.max.connection.age=0





Gedion Daniel

unread,
Mar 8, 2024, 7:45:33 AMMar 8
to us...@opencast.org
Also, I'm not sure where I should create the directory `/etc/opencast`. I'm a bit confused since I'm new to Opencast.

Gedion Daniel

unread,
Mar 8, 2024, 9:08:45 AMMar 8
to us...@opencast.org
root@netaxis-HP-ProBook-430-G3:/data/service/opencast# cat /etc/opencast/custom.properties
cat: /etc/opencast/custom.properties: No such file or directory
root@netaxis-HP-ProBook-430-G3:/data/service/opencast#

this path is not does not exist both in the container and in the local machine

this is the contanier
root@9efd3ae89e42:/opencast# cat /etc/opencast/custom.properties
cat: /etc/opencast/custom.properties: No such file or directory
root@9efd3ae89e42:/opencast#

Greg Logan

unread,
Mar 8, 2024, 11:21:31 PMMar 8
to us...@opencast.org
Hi Gedion,

Have you looked at the files in https://github.com/opencast/opencast-docker/tree/master/docker-compose ?  These are preconfigured, and use Docker volumes by default which will persist your data between testing sessions.  Or they're easily converted into writing to arbitrary directories on disk, which might be more what you're looking for.

If you're following our configuration guides on docs.opencast.org then you are following guides assuming you are installing Opencast from packages, or source/tarball.  /etc/opencast is where the config files normally live, but since you're using docker those files would live at /opencast/etc inside the container instead.  I would highly recommend modifying things in the docker compose file, since custom.properties is read at startup but does not get refreshed if you change it afterwards.  Modifying it might work, if you're fast.  It also might not do what you want :)

G

Jonathan Lee

unread,
Mar 10, 2024, 3:33:11 PMMar 10
to Opencast Users, Greg Logan
Gedion,

Historically, most adopters either compiled Opencast from source or installed via a repository, so the custom.properties file would be on the host computer's file system and could persist between reinstalling or recompiling Opencast. If running from a container, the configuration files are inside the container, so any time you run "docker-compose" commands that would recreate the container, the custom.properties file will be reset to the state of the file that comes with the container image. To allow users to set configuration for containers, the Opencast developers have exposed container environment variables that replace the need to edit the custom.properties file directly. For example, if you follow the link Greg provided, you will see within the sample docker-compose files (only the mariadb examples) the following environment variables set for the opencast-admin or opencast-allinone container:

      ORG_OPENCASTPROJECT_DB_VENDOR: MariaDB
      ORG_OPENCASTPROJECT_DB_JDBC_URL: jdbc:mariadb://mariadb/opencast?useMysqlMetadata=true

With these environment variables set in the container by docker-compose, the custom.properties file automatically is set to use MariaDB as your persistent database. The sample docker-compose yml files also provide volume mapping in the mariadb container to ensure that data persists on your host even after the containers are destroyed.

I can provide some guidance on using docker containers across multiple hosts if the community is interested in that approach.

Jonathan

Matthias Neugebauer

unread,
Mar 11, 2024, 9:33:46 AMMar 11
to us...@opencast.org
Hi all,

Some additions / corrections from me. I originally added the most important configuration options as environment variables such that a (local) Opencast cluster could be started very easily. In a production scenario, you typically change more settings so IMO it makes more sense to put the configuration files you change on the host system and mount those into the container. Now Opencast within the container will use the /opencast/etc folder for reading the configuration and this folder therefore needs to contain all config files even if not changed. I therefore adopted the init script to copy files from the folder /etc/opencast (within the container) into /opencast/etc and merge files with the default configuration. My suggestion is therefore to mount individual files

- ./host/custom.properties:/etc/opencast/custom.properties:ro

or a folder with files you changed

- ./host/opencast:/etc/opencast:ro

If you find the environment variables to be sufficient for your purposes, you are of course free to only use those.

Best regards
Matthias

---

shio solutions GmbH
Hafenweg 11a
48155 Münster

E-Mail: mtn...@shio.solutions
Fon: +49 251 97007987

Geschäftsführer: Matthias Neugebauer
Handelsregister: Amtsgericht Münster HRB 21404
Sitz: Münster

Jonathan Lee

unread,
Mar 12, 2024, 12:17:49 PMMar 12
to Opencast Users, mtn...@shio.solutions
Gedion,

If you choose to mount the configuration files on your host, you will need them to exist on your host before you attempt to mount them into your container. Otherwise, docker will create an empty directory in the container where the Opencast configuration should be.
One method for obtaining the configuration files would be to copy the files from the container before you mount a respective persistent volume.

For example: with Opencast running without a mapped configuration volume, check your container names:

docker ps

If you haven't specified a name in the compose file, you may get a generated name like opencast-opencast-1, in which case you would run this command to copy the configuration files to your host (I am using the host path /data/service/opencast/etc from your sample code):

docker cp opencast-opencast-1:/opencast/etc /data/service/opencast/etc

Now you can shut down your containers and update the compose file to map to that directory, e.g.:

    volumes:
      - /data/service/opencast/data:/data
      - /data/service/opencast/etc:/opencast/etc:ro

Now you can freely edit your custom.properties file (or any other configuration, including workflow definitions) from your host's file system. The next time you docker-compose up, opencast will read the configuration from your host file system.

Regards,
Jonathan

Matthias Neugebauer

unread,
Mar 12, 2024, 12:45:50 PMMar 12
to us...@opencast.org
Hi all,

Again, please don’t mount directly to /opencast/etc in the container. Please use /etc/opencast. Files will be synced and merged with default configs and put into /opencast/etc. In fact, I’m pretty sure mounting read-only to /opencast/etc will fail the current init script.

So something like

volumes:
- /data/service/opencast/data:/data
- /data/service/opencast/etc:/etc/opencast:ro

– Matthias

---

shio solutions GmbH
Hafenweg 11a
48155 Münster

E-Mail: mtn...@shio.solutions
Fon: +49 251 97007987

Geschäftsführer: Matthias Neugebauer
Handelsregister: Amtsgericht Münster HRB 21404
Sitz: Münster

Jonathan Lee

unread,
Mar 13, 2024, 10:01:51 AMMar 13
to Opencast Users, mtn...@shio.solutions
Matthias,


We may want to either link the two or expose the README notes directly on the wiki. In addition, neither one calls out the functionality of the OPENCAST_CUSTOM_CONFIG path, so unless adopters find this thread or parse the init scripts, they won't know to mount to /etc/opencast. I like the option you've provided of only mounting the customizations instead of a copy of every single configuration file, so that could be documented if you consider that to be "best practice". I noticed the script throws an error if the host machine has created hidden files in the mounted configuration folder, but this may be a non-issue for most adopters.

Regards,

Jonathan

Reply all
Reply to author
Forward
0 new messages