Building Yottadb docker

20 views
Skip to first unread message

rafi farchi

unread,
12:30 PM (7 hours ago) 12:30 PM
to Hardhats
Subject: YottaDB UTF-8 Docker initialization loop: %YDB-E-ZGBLDIRACC / Cannot access global directory (No such file or directory)

Hi everyone,

I am building a Docker environment (Ubuntu 24.04 base) using YottaDB r2.06 UTF-8. The host directory `/home/u0_a410/hybrid_m_eval/m_core` is mounted as a volume into `/app/m_core` inside the container.

My goal is to dynamically generate the global directory file (`ydb.gld`) and database file (`ydb.dat`) on container startup inside the mounted volume if they don't exist yet, using a standard template.

However, I am stuck in a catch-22 loop. No matter what approach I try, when YottaDB launches in Direct Mode (`mumps -direct`), it crashes immediately with:
"%YDB-E-ZGBLDIRACC, Cannot access global directory /app/m_core/ydb.gld. Cannot continue.
%SYSTEM-E-ENO2, No such file or directory"

Here are my environment configurations inside the startup entrypoint script:
export ydb_dist=/usr/local/lib/yottadb/r206/utf8
export LD_LIBRARY_PATH=$ydb_dist:$LD_LIBRARY_PATH
export ydb_gbldir=/app/m_core/ydb.gld
export ydb_routines="/app/m_core( /app/m_core ) $ydb_dist"

The `ydb.gld.template` contains:
; GDE CONFIGURATION FILE
change -region DEFAULT -dynamic=4096 -key=255 -record=4080 -journal=(before,file="/app/m_core/ydb.mjl")
change -segment DEFAULT -file=/app/m_core/ydb.dat -access_method=BG
change -name * -region=DEFAULT

What we have tried so far:
1. Running GDE via stdin inside the entrypoint:
   `mumps -run %GDE < template`
   Result: It fails with `%YDB-E-FILENOTFND, File _GDE.m not found` because in this UTF-8 container setup, the internal utilities seem to behave differently when `ydb_gbldir` points to a missing file.

2. Executing wrapped commands using `ydb -gde < template` or `mupip gencat`:
   Result: The internal `ydb_env_set` script throws a realpath conflict status 1:
   "$ydb_dist="/usr/local/lib/yottadb/r206" has realpath /usr/local/lib/yottadb/r206 but prior $ydb_dist has realpath /usr/local/lib/yottadb/r206/utf8"

3. Changing directory permissions on the host/guest via chmod 777 / chown before running the commands.

It seems that since `ydb_gbldir` is pre-defined and the target file is missing, the MUMPS engine refuses to execute even the maintenance tools (%GDE / MUPIP) to create it under a non-interactive Docker boot layer.

What is the officially recommended way to create a brand new, empty, pre-configured UTF-8 global directory and dat file dynamically during a headless Docker container entrypoint boot?

Thanks in advance!

K.S. Bhaskar

unread,
12:41 PM (6 hours ago) 12:41 PM
to Hardhats
In a freshly booted Docker container with no ydb* or gtm* environment variables set, and assuming you installed YottaDB with ydbinstall --utf8 and other options defaulted, run the following:

export ydb_dir=/app/m_core
source /usr/local/etc/ydb_env_set

The above will create an environment if none exists, as well as recover it if needed (e.g., container or host shut down with processes updating the database).

Or just use a Docker container we provide, e.g., see https://yottadb.com/product/get-started/

Regards
- Bhaskar

rafi farchi

unread,
3:47 PM (3 hours ago) 3:47 PM
to Hardhats
Hi Bhaskar,
​I wanted to personally thank you for your invaluable help and guidance.
​Following your excellent recommendation, we fully adopted the official YottaDB Docker image and architecture. We successfully integrated it with PostgreSQL 16, and I'm happy to report that both environments are now working together in perfect harmony!
​All the data—including the YottaDB globals and the PostgreSQL databases—is completely persistent, and the dynamic linkage via the SQL gateway is running smoothly.
​Thank you again for steering us in the right direction and for your amazing support.
​Best regards,
Rafi Farchi
Reply all
Reply to author
Forward
0 new messages