Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛Paperless ngx </sbin/docker-entrypoint.sh: line 157: PAPERLESS_OCR_LANGUAGES: unbound variable> #1178

Closed
Fritzandreasx opened this issue Jan 13, 2024 · 12 comments
Labels
bug Something isn't working

Comments

@Fritzandreasx
Copy link

Description

Start of application fails

Paperless-ngx docker container starting...
/sbin/docker-entrypoint.sh: line 157: PAPERLESS_OCR_LANGUAGES: unbound variable

Reproduction steps

Start Paperless
See Log

Addon Logs

�[34m Home Assistant Supervisor: 2023.12.0�[0m
�[34m-----------------------------------------------------------�[0m
�[34m Please, share the above information when looking for help�[0m
�[34m or support in, e.g., GitHub, forums�[0m
�[34m-----------------------------------------------------------�[0m
�[32m Provided by: https://github.com/alexbelgium/hassio-addons �[0m
�[34m-----------------------------------------------------------�[0m
�[32m Defining permissions for main user : �[0m
�[34mUser UID: 0�[0m
�[34mUser GID : 0�[0m
�[34m-----------------------------------------------------------�[0m
/etc/cont-init.d/00-global_var.sh: executing
�[34mCONFIG_LOCATION='/config/config.yaml'�[0m
�[34mOCRLANG='DEU'�[0m
�[34mPAPERLESS_CONSUMPTION_DIR='/mnt/dokumentenverwaltung/neue_dokumente'�[0m
�[34mPAPERLESS_DATA_DIR='/mnt/dokumentenverwaltung/data'�[0m
�[34mPAPERLESS_MEDIA_ROOT='/mnt/dokumentenverwaltung/media'�[0m
�[34mPAPERLESS_OCR_MODE='skip'�[0m
�[34mPGID='0'�[0m
�[34mPUID='0'�[0m
�[34mcertfile='chain.pem'�[0m
�[34mcifsdomain='192.168.x.x'�[0m
�[34mcifspassword='x'�[0m
�[34mcifsusername='x'�[0m
�[34mkeyfile='privkey.pem'�[0m
�[34mnetworkdisks='//x/dokumentenverwaltung'�[0m
�[34mssl='false'�[0m
Timezone set from Etc/UTC to Europe/Berlin
/etc/cont-init.d/00-local_mounts.sh: executing
/etc/cont-init.d/00-smb_mounts.sh: executing
[10:17:32] WARNING: �[33m------------------------�[0m
[10:17:32] WARNING: �[33mThis is a new code, please report any issues on https://github.com/alexbelgium/hassio-addons�[0m
Mounting smb share(s)...
[10:17:32] WARNING: �[33m------------------------�[0m
... using domain 192.168.x.x
... using PUID 0 and PGID 0
... mounting //192.168.x.x/dokumentenverwaltung
[10:17:34] INFO: �[32m...... //x/dokumentenverwaltung successfully mounted to /mnt/dokumentenverwaltung with options rw,file_mode=0775,dir_mode=0775,username=xxx,password=XXXXXXXXXX,nobrl,uid=0,gid=0,iocharset=utf8,domain=192.168.178.31�[0m
/etc/cont-init.d/01-config_yaml.sh: executing
Setting permissions for the config.yaml directory

�[32mLoad environment variables from /config/config.yaml if existing�[0m
�[32mIf accessing the file with filebrowser it should be mapped to /addon_configs/db21ed7f-paperless-ng/config.yaml�[0m
�[32m---------------------------------------------------------�[0m
�[32mWiki here on how to use : github.com/alexbelgium/hassio-addons/wiki/Add‐ons-feature-:-add-env-variables�[0m

�[34mPAPERLESS_TIKA_ENABLED='true'�[0m
�[34mTZ='Europe/Berlin'�[0m
�[34mPAPERLESS_OCR_LANGUAGE='deu'�[0m
�[34mPAPERLESS_TIKA_ENDPOINT='http://192.168.x.x:9998'�[0m
�[34mPAPERLESS_TIKA_GOTENBERG_ENDPOINT='http://192.168.x.x:3000'�[0m
�[34mPAPERLESS_FILENAME_FORMAT_REMOVE_NONE='true'�[0m
�[34mPAPERLESS_ADMIN_USER='x'�[0m
�[34mPAPERLESS_ADMIN_PASSWORD='x'�[0m
�[34mPAPERLESS_OCR_SKIP_ARCHIVE_FILE='always'�[0m
�[34mPAPERLESS_WORKER_TIMEOUT='30000'�[0m
�[34mPAPERLESS_CONSUMER_DELETE_DUPLICATES='true'�[0m
�[34mPAPERLESS_CONSUMER_RECURSIVE='true'�[0m
�[34mPAPERLESS_CONSUMER_SUBDIRS_AS_TAGS='true'�[0m
�[34mPAPERLESS_CONSUMER_POLLING='600'�[0m
�[34mPAPERLESS_FILENAME_DATE_ORDER='DMY'�[0m
/etc/cont-init.d/01-custom_script.sh: executing
�[32mExecute /addon_configs/db21ed7f-paperless-ng/paperless-ng.sh if existing�[0m
�[32mWiki here : github.com/alexbelgium/hassio-addons/wiki/Add-ons-feature-:-customisation�[0m
/etc/cont-init.d/20-migration_config.sh: executing
/etc/cont-init.d/31-nginx.sh: executing
/etc/cont-init.d/99-run.sh: executing
[10:17:38] INFO: �[32mDefining variables�[0m
Creating directory "/mnt/dokumentenverwaltung/data"
Creating directory "/mnt/dokumentenverwaltung/media"
Creating directory "/mnt/dokumentenverwaltung/neue_dokumente"
Creating directory "/config/export"
[10:17:47] INFO: �[32mDefining database�[0m
[10:17:47] INFO: �[32mUsing sqlite as database driver�[0m
�[34mPAPERLESS_DATA_DIR=/mnt/dokumentenverwaltung/data�[0m
�[34mPAPERLESS_MEDIA_ROOT=/mnt/dokumentenverwaltung/media�[0m
�[34mPAPERLESS_CONSUMPTION_DIR=/mnt/dokumentenverwaltung/neue_dokumente�[0m
�[34mPAPERLESS_EXPORT_DIR=/config/export�[0m
�[34mUSERMAP_UID=0�[0m
�[34mUSERMAP_GID=0�[0m
�[34mPAPERLESS_OCR_LANGUAGES=deu�[0m
�[34mPAPERLESS_OCR_MODE=skip�[0m
�[34mPAPERLESS_ADMIN_PASSWORD=admin�[0m
�[34mPAPERLESS_ADMIN_USER=admin�[0m
[10:17:48] INFO: �[32mStarting redis�[0m
[10:17:48] INFO: �[32mStarting nginx�[0m
770:C 13 Jan 2024 10:17:48.172 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
770:C 13 Jan 2024 10:17:48.172 # Redis version=7.0.11, bits=64, commit=00000000, modified=0, pid=770, just started
770:C 13 Jan 2024 10:17:48.172 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
770:M 13 Jan 2024 10:17:48.173 * monotonic clock: POSIX clock_gettime
770:M 13 Jan 2024 10:17:48.175 * Running mode=standalone, port=6379.
770:M 13 Jan 2024 10:17:48.175 # Server initialized
770:M 13 Jan 2024 10:17:48.175 # WARNING Memory overcommit must be enabled! Without it, a background save or replication may fail under low memory condition. Being disabled, it can can also cause failures without low memory condition, see https://github.com/jemalloc/jemalloc/issues/1328. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
770:M 13 Jan 2024 10:17:48.176 * Ready to accept connections
[10:17:48] INFO: �[32mInitial username and password are admin. Please change in the administration panel of the webUI after login.�[0m
 
�[0;32mStarting the upstream container�[0m
 
Paperless-ngx docker container starting...
/sbin/docker-entrypoint.sh: line 157: PAPERLESS_OCR_LANGUAGES: unbound variable

Architecture

No response

OS

Virtual Machine

@Fritzandreasx Fritzandreasx added the bug Something isn't working label Jan 13, 2024
@alexbelgium alexbelgium reopened this Jan 13, 2024
@Fritzandreasx
Copy link
Author

Still same, update and couple of restarts later:

�[34m-----------------------------------------------------------�[0m
�[34m Add-on: Paperless NGX�[0m
�[34m Scan, index and archive all your physical documents�[0m
�[34m-----------------------------------------------------------�[0m
�[34m Add-on version: 2.3.3-2�[0m
�[32m You are running the latest version of this add-on.�[0m
�[34m System: Home Assistant OS 11.4 (amd64 / qemux86-64)�[0m
�[34m Home Assistant Core: 2024.1.3�[0m
�[34m Home Assistant Supervisor: 2023.12.0�[0m
�[34m-----------------------------------------------------------�[0m
�[34m Please, share the above information when looking for help�[0m
�[34m or support in, e.g., GitHub, forums�[0m
�[34m-----------------------------------------------------------�[0m
�[32m Provided by: https://github.com/alexbelgium/hassio-addons �[0m
�[34m-----------------------------------------------------------�[0m
�[32m Defining permissions for main user : �[0m
�[34mUser UID: 0�[0m
�[34mUser GID : 0�[0m
�[34m-----------------------------------------------------------�[0m
/etc/cont-init.d/00-global_var.sh: executing
�[34mCONFIG_LOCATION='/config/config.yaml'�[0m
�[34mOCRLANG='DEU ENG'�[0m
�[34mPAPERLESS_CONSUMPTION_DIR='/mnt/dokumentenverwaltung/neue_dokumente'�[0m
�[34mPAPERLESS_DATA_DIR='/mnt/dokumentenverwaltung/data'�[0m
�[34mPAPERLESS_MEDIA_ROOT='/mnt/dokumentenverwaltung/media'�[0m
�[34mPAPERLESS_OCR_MODE='skip'�[0m
�[34mPGID='0'�[0m
�[34mPUID='0'�[0m
�[34mcertfile='chain.pem'�[0m
�[34mcifsdomain='192.168.x.x'�[0m
�[34mcifspassword='x'�[0m
�[34mcifsusername='x'�[0m
�[34mkeyfile='privkey.pem'�[0m
�[34mnetworkdisks='//192.168.x.x/dokumentenverwaltung'�[0m
�[34mssl='false'�[0m
Timezone set from Etc/UTC to Europe/Berlin
/etc/cont-init.d/00-local_mounts.sh: executing
/etc/cont-init.d/00-smb_mounts.sh: executing
[11:18:14] WARNING: �[33m------------------------�[0m
[11:18:14] WARNING: �[33mThis is a new code, please report any issues on https://github.com/alexbelgium/hassio-addons�[0m
[11:18:14] WARNING: �[33m------------------------�[0m
Mounting smb share(s)...
... using domain 192.168.x.x
... using PUID 0 and PGID 0
... mounting //192.168.x.x/dokumentenverwaltung
[11:18:16] INFO: �[32m...... //192.168.x.x/dokumentenverwaltung successfully mounted to /mnt/dokumentenverwaltung with options rw,file_mode=0775,dir_mode=0775,username=homeassistant,password=XXXXXXXXXX,nobrl,uid=0,gid=0,iocharset=utf8,domain=192.168.178.31�[0m
/etc/cont-init.d/01-config_yaml.sh: executing
Setting permissions for the config.yaml directory

�[32mLoad environment variables from /config/config.yaml if existing�[0m
�[32mIf accessing the file with filebrowser it should be mapped to /addon_configs/db21ed7f-paperless-ng/config.yaml�[0m
�[32m---------------------------------------------------------�[0m
�[32mWiki here on how to use : github.com/alexbelgium/hassio-addons/wiki/Add‐ons-feature-:-add-env-variables�[0m

�[34mPAPERLESS_TIKA_ENABLED='true'�[0m
�[34mTZ='Europe/Berlin'�[0m
�[34mPAPERLESS_OCR_LANGUAGE='deu'�[0m
�[34mPAPERLESS_TIKA_ENDPOINT='http://192.168.x.x:9998'�[0m
�[34mPAPERLESS_TIKA_GOTENBERG_ENDPOINT='http://192.168.x.x:3000'�[0m
�[34mPAPERLESS_FILENAME_FORMAT_REMOVE_NONE='true'�[0m
�[34mPAPERLESS_ADMIN_USER='Andreas'�[0m
�[34mPAPERLESS_ADMIN_PASSWORD='Fabian9.Simon7-pa'�[0m
�[34mPAPERLESS_OCR_SKIP_ARCHIVE_FILE='always'�[0m
�[34mPAPERLESS_WORKER_TIMEOUT='30000'�[0m
�[34mPAPERLESS_CONSUMER_DELETE_DUPLICATES='true'�[0m
�[34mPAPERLESS_CONSUMER_RECURSIVE='true'�[0m
�[34mPAPERLESS_CONSUMER_SUBDIRS_AS_TAGS='true'�[0m
�[34mPAPERLESS_CONSUMER_POLLING='600'�[0m
�[34mPAPERLESS_FILENAME_DATE_ORDER='DMY'�[0m
/etc/cont-init.d/01-custom_script.sh: executing
�[32mExecute /addon_configs/db21ed7f-paperless-ng/paperless-ng.sh if existing�[0m
�[32mWiki here : github.com/alexbelgium/hassio-addons/wiki/Add-ons-feature-:-customisation�[0m
/etc/cont-init.d/20-migration_config.sh: executing
/etc/cont-init.d/31-nginx.sh: executing
/etc/cont-init.d/99-run.sh: executing
[11:18:21] INFO: �[32mDefining variables�[0m
Creating directory "/mnt/dokumentenverwaltung/data"
Creating directory "/mnt/dokumentenverwaltung/media"
Creating directory "/mnt/dokumentenverwaltung/neue_dokumente"
Creating directory "/config/export"
[11:18:33] INFO: �[32mDefining database�[0m
[11:18:33] INFO: �[32mUsing sqlite as database driver�[0m
�[34mPAPERLESS_DATA_DIR="/mnt/dokumentenverwaltung/data"�[0m
�[34mPAPERLESS_MEDIA_ROOT="/mnt/dokumentenverwaltung/media"�[0m
�[34mPAPERLESS_CONSUMPTION_DIR="/mnt/dokumentenverwaltung/neue_dokumente"�[0m
�[34mPAPERLESS_EXPORT_DIR="/config/export"�[0m
�[34mUSERMAP_UID="0"�[0m
�[34mUSERMAP_GID="0"�[0m
�[34mPAPERLESS_OCR_LANGUAGES="deu eng"�[0m
�[34mPAPERLESS_OCR_MODE="skip"�[0m
�[34mPAPERLESS_ADMIN_PASSWORD="admin"�[0m
�[34mPAPERLESS_ADMIN_USER="admin"�[0m
[11:18:33] INFO: �[32mStarting redis�[0m
[11:18:33] INFO: �[32mStarting nginx�[0m
[11:18:33] INFO: �[32mInitial username and password are admin. Please change in the administration panel of the webUI after login.�[0m

�[0;32mStarting the upstream container�[0m

Paperless-ngx docker container starting...
/sbin/docker-entrypoint.sh: line 157: PAPERLESS_OCR_LANGUAGES: unbound variable

@tobilektri
Copy link

@alexbelgium is there anything we can do to solve the issue locally?
Or do we have to wait until you release the next update?

@Gedankenleser
Copy link

Same error here

@alexbelgium
Copy link
Owner

You could try to setting the value in the config.yaml file located in the configuration folder (normally) or at the location described in the log at start of the add-on. The upstream container has likely changed its logic and this broke my code...and as I don't use the addon I can't see that until someone highlights the issue, then I need to set an instance, troubleshoot and update

@alexbelgium
Copy link
Owner

alexbelgium commented Jan 13, 2024

Also my autoscript feature allows to modify scripts using sed and inject custom commands in the add-on (also describes in log) sometimes this allow for a custom patch prior to updates

Both are described in the wiki, with links described in the startup log

alexbelgium added a commit that referenced this issue Jan 13, 2024
@Gedankenleser
Copy link

After installing 2.3.3-3 another error is thrown
Log:
tarting...
/ha_entrypoint.sh: line 50: [: source: binary operator expected

The Addon does not start.

Starting the upstream container

Paperless-ngx docker container starting...
/sbin/docker-entrypoint.sh: line 157: PAPERLESS_OCR_LANGUAGES: unbound variable

my options Yml:
CONFIG_LOCATION: /config/config.yaml
OCRLANG: ENG DEU
PAPERLESS_OCR_MODE: skip
PGID: 0
PUID: 0
certfile: fullchain.pem
keyfile: privkey.pem
ssl: false
database: mariadb_addon

@alexbelgium
Copy link
Owner

alexbelgium commented Jan 13, 2024

Ahah you're fast I pushed a 2.3.3-4 that starts now!

@Fritzandreasx
Copy link
Author

Still not starting

...
Starting the upstream container

Paperless-ngx docker container starting...
Installing languages...
Hit:1 http://deb.debian.org/debian bookworm InRelease
Get:2 http://deb.debian.org/debian bookworm-updates InRelease [52.1 kB]
Hit:3 http://deb.debian.org/debian-security bookworm-security InRelease
Fetched 52.1 kB in 2s (25.0 kB/s)
Reading package lists...
Package tesseract-ocr-deu already installed!
Package tesseract-ocr-eng already installed!
Mapping UID and GID for paperless:paperless to 0:0

@alexbelgium
Copy link
Owner

Still not starting

... Starting the upstream container

Paperless-ngx docker container starting... Installing languages... Hit:1 http://deb.debian.org/debian bookworm InRelease Get:2 http://deb.debian.org/debian bookworm-updates InRelease [52.1 kB] Hit:3 http://deb.debian.org/debian-security bookworm-security InRelease Fetched 52.1 kB in 2s (25.0 kB/s) Reading package lists... Package tesseract-ocr-deu already installed! Package tesseract-ocr-eng already installed! Mapping UID and GID for paperless:paperless to 0:0

It is starting here. If I wait 30 seconds it moves on to the mapping of the folders. As I could replicate the previous error I am sure the initial "unbound variable" error is solved. I tried both with uid 0 and 1000

@donverse
Copy link

I confirm paperless ngx is starting with version 2.3.3-4 & ocr is working. Thanks!

@Gedankenleser
Copy link

After installing 2.3.3-3 another error is thrown Log: tarting... /ha_entrypoint.sh: line 50: [: source: binary operator expected

The Addon does not start.

Starting the upstream container

Paperless-ngx docker container starting... /sbin/docker-entrypoint.sh: line 157: PAPERLESS_OCR_LANGUAGES: unbound variable

my options Yml: CONFIG_LOCATION: /config/config.yaml OCRLANG: ENG DEU PAPERLESS_OCR_MODE: skip PGID: 0 PUID: 0 certfile: fullchain.pem keyfile: privkey.pem ssl: false database: mariadb_addon

It works now! Ty!

@Fritzandreasx
Copy link
Author

Fritzandreasx commented Jan 17, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants