rafi farchi
unread,12:30 PM (7 hours ago) 12:30 PMSign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
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!