inventree / InvenTree

Open Source Inventory Management System
https://docs.inventree.org
MIT License
4.17k stars 754 forks source link

TypeError: '<' not supported between instances of 'int' and 'str' #3655

Closed CPBPILOT closed 2 years ago

CPBPILOT commented 2 years ago

Please verify that this bug has NOT been raised before.

Describe the bug*

I am unable to log in to the system after install. I installed this through truecharts on a truenas scale server/nas. After going through the install steps. When I open the login page and type in the admin credentials and I get a "Internal Server Error The server raised an internal error Refer to the error log in the admin interface for further details" There are 3 pods running, a postgresql , a redis and then the main container, when looking at the main container log there a line that says "TypeError: '<' not supported between instances of 'int' and 'str'" immediately after a line "allowed = len(history) < amount". It also there are some Unauthorized .js scripts I have had truecharts look at there implementation and they say the code that looks like is throwing a error is not their code. Snap3

Steps to Reproduce

Install inventree on a truenas scale nas go to the login page login with the admin credentials entered at install error is presented

Expected behavior

Expect that I would be able to login to the app.

Deployment Method

Version Information

0.8.2_4.08 please see truecharts issue 3684 https://github.com/truecharts/charts/issues/3684

Relevant log output

*****PostgreSQL container*****
2022-09-04T02:20:49.395339247Z �[38;5;6mpostgresql �[38;5;5m02:20:49.39 �[0m
2022-09-04T02:20:49.396694408Z �[38;5;6mpostgresql �[38;5;5m02:20:49.39 �[0m�[1mWelcome to the Bitnami postgresql container�[0m
2022-09-04T02:20:49.398112182Z �[38;5;6mpostgresql �[38;5;5m02:20:49.39 �[0mSubscribe to project updates by watching �[1mhttps://github.com/bitnami/containers�[0m
2022-09-04T02:20:49.399472729Z �[38;5;6mpostgresql �[38;5;5m02:20:49.39 �[0mSubmit issues and feature requests at �[1mhttps://github.com/bitnami/containers/issues�[0m
2022-09-04T02:20:49.400803468Z �[38;5;6mpostgresql �[38;5;5m02:20:49.40 �[0m
2022-09-04T02:20:49.416304112Z �[38;5;6mpostgresql �[38;5;5m02:20:49.41 �[0m�[38;5;2mINFO �[0m ==> ** Starting PostgreSQL setup **
2022-09-04T02:20:49.435330463Z �[38;5;6mpostgresql �[38;5;5m02:20:49.43 �[0m�[38;5;2mINFO �[0m ==> Validating settings in POSTGRESQL_* env vars..
2022-09-04T02:20:49.441161848Z �[38;5;6mpostgresql �[38;5;5m02:20:49.44 �[0m�[38;5;2mINFO �[0m ==> Loading custom pre-init scripts...
2022-09-04T02:20:49.446766239Z �[38;5;6mpostgresql �[38;5;5m02:20:49.44 �[0m�[38;5;2mINFO �[0m ==> Initializing PostgreSQL database...
2022-09-04T02:20:49.463407978Z �[38;5;6mpostgresql �[38;5;5m02:20:49.46 �[0m�[38;5;2mINFO �[0m ==> pg_hba.conf file not detected. Generating it...
2022-09-04T02:20:49.465088615Z �[38;5;6mpostgresql �[38;5;5m02:20:49.46 �[0m�[38;5;2mINFO �[0m ==> Generating local authentication configuration
2022-09-04T02:20:50.613208193Z �[38;5;6mpostgresql �[38;5;5m02:20:50.61 �[0m�[38;5;2mINFO �[0m ==> Starting PostgreSQL in background...
2022-09-04T02:20:54.654316827Z �[38;5;6mpostgresql �[38;5;5m02:20:54.65 �[0m�[38;5;2mINFO �[0m ==> Changing password of postgres
2022-09-04T02:20:54.694015648Z �[38;5;6mpostgresql �[38;5;5m02:20:54.69 �[0m�[38;5;2mINFO �[0m ==> Creating user inventree
2022-09-04T02:20:54.724146095Z �[38;5;6mpostgresql �[38;5;5m02:20:54.72 �[0m�[38;5;2mINFO �[0m ==> Granting access to "inventree" to the database "inventree"
2022-09-04T02:20:54.769982142Z �[38;5;6mpostgresql �[38;5;5m02:20:54.76 �[0m�[38;5;2mINFO �[0m ==> Setting ownership for the 'public' schema database "inventree" to "inventree"
2022-09-04T02:20:54.811254082Z �[38;5;6mpostgresql �[38;5;5m02:20:54.81 �[0m�[38;5;2mINFO �[0m ==> Configuring replication parameters
2022-09-04T02:20:54.838857998Z �[38;5;6mpostgresql �[38;5;5m02:20:54.83 �[0m�[38;5;2mINFO �[0m ==> Configuring synchronous_replication
2022-09-04T02:20:54.840864670Z �[38;5;6mpostgresql �[38;5;5m02:20:54.84 �[0m�[38;5;2mINFO �[0m ==> Configuring fsync
2022-09-04T02:20:54.863119162Z �[38;5;6mpostgresql �[38;5;5m02:20:54.86 �[0m�[38;5;2mINFO �[0m ==> Loading custom scripts...
2022-09-04T02:20:54.867394401Z �[38;5;6mpostgresql �[38;5;5m02:20:54.86 �[0m�[38;5;2mINFO �[0m ==> Enabling remote connections
2022-09-04T02:20:54.875190494Z �[38;5;6mpostgresql �[38;5;5m02:20:54.87 �[0m�[38;5;2mINFO �[0m ==> Stopping PostgreSQL...
2022-09-04T02:20:55.079016539Z waiting for server to shut down.... done
2022-09-04T02:20:55.079045944Z server stopped
2022-09-04T02:20:55.083965071Z 
2022-09-04T02:20:55.084002505Z �[38;5;6mpostgresql �[38;5;5m02:20:55.08 �[0m�[38;5;2mINFO �[0m ==> ** PostgreSQL setup finished! **
2022-09-04T02:20:55.104103115Z �[38;5;6mpostgresql �[38;5;5m02:20:55.10 �[0m�[38;5;2mINFO �[0m ==> ** Starting PostgreSQL **
2022-09-04T02:20:55.126384586Z 2022-09-04 02:20:55.126 GMT [1] LOG:  pgaudit extension initialized
2022-09-04T02:20:55.141600691Z 2022-09-04 02:20:55.141 GMT [1] LOG:  starting PostgreSQL 14.5 on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit
2022-09-04T02:20:55.142037857Z 2022-09-04 02:20:55.141 GMT [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
2022-09-04T02:20:55.142061684Z 2022-09-04 02:20:55.141 GMT [1] LOG:  listening on IPv6 address "::", port 5432
2022-09-04T02:20:55.165611717Z 2022-09-04 02:20:55.165 GMT [1] LOG:  listening on Unix socket "/tmp/.s.PGSQL.5432"
2022-09-04T02:20:55.190042634Z 2022-09-04 02:20:55.189 GMT [147] LOG:  database system was shut down at 2022-09-04 02:20:55 GMT
2022-09-04T02:20:55.224877485Z 2022-09-04 02:20:55.224 GMT [1] LOG:  database system is ready to accept connections
2022-09-04T02:21:22.537694633Z 2022-09-04 02:21:22.537 GMT [203] ERROR:  relation "common_inventreesetting" does not exist at character 112
2022-09-04T02:21:22.537773680Z 2022-09-04 02:21:22.537 GMT [203] STATEMENT:  SELECT "common_inventreesetting"."id", "common_inventreesetting"."value", "common_inventreesetting"."key" FROM "common_inventreesetting" WHERE UPPER("common_inventreesetting"."key"::text) = UPPER('SERVER_RESTART_REQUIRED') ORDER BY "common_inventreesetting"."id" ASC LIMIT 1
2022-09-04T02:21:25.851336209Z 2022-09-04 02:21:25.851 GMT [205] ERROR:  relation "common_inventreesetting" does not exist at character 112
2022-09-04T02:21:25.851407942Z 2022-09-04 02:21:25.851 GMT [205] STATEMENT:  SELECT "common_inventreesetting"."id", "common_inventreesetting"."value", "common_inventreesetting"."key" FROM "common_inventreesetting" WHERE UPPER("common_inventreesetting"."key"::text) = UPPER('SERVER_RESTART_REQUIRED') ORDER BY "common_inventreesetting"."id" ASC LIMIT 1

*****redis container*****
2022-09-04T02:20:49.387106082Z �[38;5;6mredis �[38;5;5m02:20:49.38 �[0m
2022-09-04T02:20:49.388424737Z �[38;5;6mredis �[38;5;5m02:20:49.38 �[0m�[1mWelcome to the Bitnami redis container�[0m
2022-09-04T02:20:49.389577772Z �[38;5;6mredis �[38;5;5m02:20:49.38 �[0mSubscribe to project updates by watching �[1mhttps://github.com/bitnami/containers�[0m
2022-09-04T02:20:49.390721663Z �[38;5;6mredis �[38;5;5m02:20:49.39 �[0mSubmit issues and feature requests at �[1mhttps://github.com/bitnami/containers/issues�[0m
2022-09-04T02:20:49.391828188Z �[38;5;6mredis �[38;5;5m02:20:49.39 �[0m
2022-09-04T02:20:49.393259893Z �[38;5;6mredis �[38;5;5m02:20:49.39 �[0m�[38;5;2mINFO �[0m ==> ** Starting Redis setup **
2022-09-04T02:20:49.406080074Z �[38;5;6mredis �[38;5;5m02:20:49.40 �[0m�[38;5;3mWARN �[0m ==> You set the environment variable ALLOW_EMPTY_PASSWORD=yes. For safety reasons, do not use this flag in a production environment.
2022-09-04T02:20:49.410545850Z �[38;5;6mredis �[38;5;5m02:20:49.41 �[0m�[38;5;2mINFO �[0m ==> Initializing Redis
2022-09-04T02:20:49.437485228Z �[38;5;6mredis �[38;5;5m02:20:49.43 �[0m�[38;5;2mINFO �[0m ==> Setting Redis config file
2022-09-04T02:20:49.463864640Z �[38;5;6mredis �[38;5;5m02:20:49.46 �[0m�[38;5;2mINFO �[0m ==> Configuring replication mode
2022-09-04T02:20:49.488041876Z �[38;5;6mredis �[38;5;5m02:20:49.48 �[0m�[38;5;2mINFO �[0m ==> ** Redis setup finished! **
2022-09-04T02:20:49.488066607Z 
2022-09-04T02:20:49.500381084Z �[38;5;6mredis �[38;5;5m02:20:49.49 �[0m�[38;5;2mINFO �[0m ==> ** Starting Redis **
2022-09-04T02:20:49.516133687Z 1:C 04 Sep 2022 02:20:49.515 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
2022-09-04T02:20:49.516164965Z 1:C 04 Sep 2022 02:20:49.516 # Redis version=7.0.4, bits=64, commit=00000000, modified=0, pid=1, just started
2022-09-04T02:20:49.516185435Z 1:C 04 Sep 2022 02:20:49.516 # Configuration loaded
2022-09-04T02:20:49.516528023Z 1:M 04 Sep 2022 02:20:49.516 * monotonic clock: POSIX clock_gettime
2022-09-04T02:20:49.517394027Z 1:M 04 Sep 2022 02:20:49.517 * Running mode=standalone, port=6379.
2022-09-04T02:20:49.517427700Z 1:M 04 Sep 2022 02:20:49.517 # Server initialized
2022-09-04T02:20:49.830050374Z 1:M 04 Sep 2022 02:20:49.829 * Creating AOF base file appendonly.aof.1.base.rdb on server start
2022-09-04T02:20:49.860049255Z 1:M 04 Sep 2022 02:20:49.859 * Creating AOF incr file appendonly.aof.1.incr.aof on server start
2022-09-04T02:20:49.860076094Z 1:M 04 Sep 2022 02:20:49.859 * Ready to accept connections
2022-09-04T02:25:50.020905809Z 1:M 04 Sep 2022 02:25:50.020 * 100 changes in 300 seconds. Saving...
2022-09-04T02:25:50.022003135Z 1:M 04 Sep 2022 02:25:50.021 * Background saving started by pid 599
2022-09-04T02:25:50.175465619Z 599:C 04 Sep 2022 02:25:50.175 * DB saved on disk
2022-09-04T02:25:50.175906032Z 599:C 04 Sep 2022 02:25:50.175 * Fork CoW for RDB: current 1 MB, peak 1 MB, average 0 MB
2022-09-04T02:25:50.224003753Z 1:M 04 Sep 2022 02:25:50.223 * Background saving terminated with success

*****vtrrt container*****
2022-09-04T02:23:45.409036014Z /home/inventree/data/config.yaml exists - skipping
2022-09-04T02:23:45.781663251Z InvenTree translation coverage: 19%
2022-09-04T02:23:46.135800007Z [2022-09-03 21:23:46 -0500] [12] [INFO] Starting gunicorn 20.1.0
2022-09-04T02:23:46.136202760Z [2022-09-03 21:23:46 -0500] [12] [INFO] Listening at: http://0.0.0.0:8000 (12)
2022-09-04T02:23:46.136248830Z [2022-09-03 21:23:46 -0500] [12] [INFO] Using worker: sync
2022-09-04T02:23:46.139284873Z [2022-09-03 21:23:46 -0500] [13] [INFO] Booting worker with pid: 13
2022-09-04T02:23:46.147900255Z [2022-09-03 21:23:46 -0500] [14] [INFO] Booting worker with pid: 14
2022-09-04T02:23:46.229498310Z [2022-09-03 21:23:46 -0500] [15] [INFO] Booting worker with pid: 15
2022-09-04T02:23:46.303245177Z [2022-09-03 21:23:46 -0500] [16] [INFO] Booting worker with pid: 16
2022-09-04T02:23:46.511241121Z 2022-09-03 21:23:46,510 INFO SECRET_KEY loaded by INVENTREE_SECRET_KEY
2022-09-04T02:23:46.511291186Z 2022-09-03 21:23:46,511 INFO SECRET_KEY loaded by INVENTREE_SECRET_KEY
2022-09-04T02:23:46.511307495Z 2022-09-03 21:23:46,511 INFO SECRET_KEY loaded by INVENTREE_SECRET_KEY
2022-09-04T02:23:46.538717773Z 2022-09-03 21:23:46,538 INFO SECRET_KEY loaded by INVENTREE_SECRET_KEY
2022-09-04T02:23:46.561531734Z 2022-09-03 21:23:46,561 DEBUG Configuring database backend:
2022-09-04T02:23:46.561554452Z 2022-09-03 21:23:46,561 INFO DB_ENGINE: django.db.backends.postgresql
2022-09-04T02:23:46.561634646Z 2022-09-03 21:23:46,561 INFO DB_NAME: inventree
2022-09-04T02:23:46.561666126Z 2022-09-03 21:23:46,561 INFO DB_HOST: inventree-postgresql
2022-09-04T02:23:46.561678506Z 2022-09-03 21:23:46,561 DEBUG Configuring database backend:
2022-09-04T02:23:46.561749194Z 2022-09-03 21:23:46,561 INFO DB_ENGINE: django.db.backends.postgresql
2022-09-04T02:23:46.561783005Z 2022-09-03 21:23:46,561 DEBUG Configuring database backend:
2022-09-04T02:23:46.561813200Z 2022-09-03 21:23:46,561 INFO DB_NAME: inventree
2022-09-04T02:23:46.561861082Z 2022-09-03 21:23:46,561 INFO DB_HOST: inventree-postgresql
2022-09-04T02:23:46.561874958Z 2022-09-03 21:23:46,561 INFO DB_ENGINE: django.db.backends.postgresql
2022-09-04T02:23:46.561915198Z 2022-09-03 21:23:46,561 INFO DB_NAME: inventree
2022-09-04T02:23:46.561961811Z 2022-09-03 21:23:46,561 INFO DB_HOST: inventree-postgresql
2022-09-04T02:23:46.589064320Z 2022-09-03 21:23:46,588 DEBUG Configuring database backend:
2022-09-04T02:23:46.589102716Z 2022-09-03 21:23:46,588 INFO DB_ENGINE: django.db.backends.postgresql
2022-09-04T02:23:46.589113937Z 2022-09-03 21:23:46,589 INFO DB_NAME: inventree
2022-09-04T02:23:46.589136311Z 2022-09-03 21:23:46,589 INFO DB_HOST: inventree-postgresql
2022-09-04T02:23:46.841261059Z 2022-09-03 21:23:46,841 DEBUG MEDIA_ROOT: '/home/inventree/data/media'
2022-09-04T02:23:46.841330728Z 2022-09-03 21:23:46,841 DEBUG STATIC_ROOT: '/home/inventree/data/static'
2022-09-04T02:23:46.844763694Z 2022-09-03 21:23:46,844 DEBUG MEDIA_ROOT: '/home/inventree/data/media'
2022-09-04T02:23:46.844808841Z 2022-09-03 21:23:46,844 DEBUG STATIC_ROOT: '/home/inventree/data/static'
2022-09-04T02:23:46.848799493Z 2022-09-03 21:23:46,848 DEBUG MEDIA_ROOT: '/home/inventree/data/media'
2022-09-04T02:23:46.848825096Z 2022-09-03 21:23:46,848 DEBUG STATIC_ROOT: '/home/inventree/data/static'
2022-09-04T02:23:46.856801647Z 2022-09-03 21:23:46,856 DEBUG MEDIA_ROOT: '/home/inventree/data/media'
2022-09-04T02:23:46.856826448Z 2022-09-03 21:23:46,856 DEBUG STATIC_ROOT: '/home/inventree/data/static'
2022-09-04T02:23:48.382484392Z Plugins not enabled - skipping loading sequence
2022-09-04T02:23:48.384251748Z Starting background tasks...
2022-09-04T02:23:48.385000156Z Scheduled task 'InvenTree.tasks.delete_successful_tasks' already exists - updating!
2022-09-04T02:23:48.385057566Z Plugins not enabled - skipping loading sequence
2022-09-04T02:23:48.386846516Z Starting background tasks...
2022-09-04T02:23:48.387503811Z Scheduled task 'InvenTree.tasks.delete_successful_tasks' already exists - updating!
2022-09-04T02:23:48.393221597Z Plugins not enabled - skipping loading sequence
2022-09-04T02:23:48.395741452Z Starting background tasks...
2022-09-04T02:23:48.396493939Z Scheduled task 'InvenTree.tasks.delete_successful_tasks' already exists - updating!
2022-09-04T02:23:48.403236358Z Plugins not enabled - skipping loading sequence
2022-09-04T02:23:48.405000375Z Starting background tasks...
2022-09-04T02:23:48.405709149Z Scheduled task 'InvenTree.tasks.delete_successful_tasks' already exists - updating!
2022-09-04T02:23:48.448345841Z Scheduled task 'InvenTree.tasks.check_for_updates' already exists - updating!
2022-09-04T02:23:48.481783196Z Scheduled task 'InvenTree.tasks.check_for_updates' already exists - updating!
2022-09-04T02:23:48.509772820Z Scheduled task 'InvenTree.tasks.heartbeat' already exists - updating!
2022-09-04T02:23:48.670533308Z Scheduled task 'InvenTree.tasks.check_for_updates' already exists - updating!
2022-09-04T02:23:48.817965194Z Scheduled task 'InvenTree.tasks.update_exchange_rates' already exists - updating!
2022-09-04T02:23:48.818025767Z Scheduled task 'InvenTree.tasks.heartbeat' already exists - updating!
2022-09-04T02:23:48.982288068Z Scheduled task 'InvenTree.tasks.check_for_updates' already exists - updating!
2022-09-04T02:23:49.121077205Z Scheduled task 'InvenTree.tasks.update_exchange_rates' already exists - updating!
2022-09-04T02:23:49.121350105Z Scheduled task 'InvenTree.tasks.delete_old_error_logs' already exists - updating!
2022-09-04T02:23:49.125677720Z Scheduled task 'InvenTree.tasks.heartbeat' already exists - updating!
2022-09-04T02:23:49.153317228Z Scheduled task 'InvenTree.tasks.heartbeat' already exists - updating!
2022-09-04T02:23:49.172647450Z Scheduled task 'InvenTree.tasks.delete_old_error_logs' already exists - updating!
2022-09-04T02:23:49.172832151Z Scheduled task 'common.tasks.delete_old_notifications' already exists - updating!
2022-09-04T02:23:49.173936874Z Scheduled task 'InvenTree.tasks.update_exchange_rates' already exists - updating!
2022-09-04T02:23:49.254424300Z Scheduled task 'InvenTree.tasks.update_exchange_rates' already exists - updating!
2022-09-04T02:23:49.353243524Z Scheduled task 'order.tasks.check_overdue_purchase_orders' already exists - updating!
2022-09-04T02:23:49.353548133Z Scheduled task 'common.tasks.delete_old_notifications' already exists - updating!
2022-09-04T02:23:49.353859148Z Scheduled task 'InvenTree.tasks.delete_old_error_logs' already exists - updating!
2022-09-04T02:23:49.475150677Z Scheduled task 'InvenTree.tasks.delete_old_error_logs' already exists - updating!
2022-09-04T02:23:49.532566424Z Scheduled task 'order.tasks.check_overdue_sales_orders' already exists - updating!
2022-09-04T02:23:49.532594488Z Scheduled task 'common.tasks.delete_old_notifications' already exists - updating!
2022-09-04T02:23:49.532605979Z Scheduled task 'order.tasks.check_overdue_purchase_orders' already exists - updating!
2022-09-04T02:23:49.573970923Z Scheduled task 'common.tasks.delete_old_notifications' already exists - updating!
2022-09-04T02:23:49.594091816Z Scheduled task 'order.tasks.check_overdue_purchase_orders' already exists - updating!
2022-09-04T02:23:49.594146363Z Scheduled task 'build.tasks.check_overdue_build_orders' already exists - updating!
2022-09-04T02:23:49.594218859Z Scheduled task 'order.tasks.check_overdue_sales_orders' already exists - updating!
2022-09-04T02:23:49.614219175Z Scheduled task 'order.tasks.check_overdue_purchase_orders' already exists - updating!
2022-09-04T02:23:49.626325969Z Scheduled task 'order.tasks.check_overdue_sales_orders' already exists - updating!
2022-09-04T02:23:49.626382102Z Scheduled task 'build.tasks.check_overdue_build_orders' already exists - updating!
2022-09-04T02:23:49.629793707Z collecting notification methods
2022-09-04T02:23:49.629832135Z found 1 notification methods
2022-09-04T02:23:49.632637574Z User cpbpilot already exists - skipping creation
2022-09-04T02:23:49.654577904Z Scheduled task 'order.tasks.check_overdue_sales_orders' already exists - updating!
2022-09-04T02:23:49.689346026Z Scheduled task 'build.tasks.check_overdue_build_orders' already exists - updating!
2022-09-04T02:23:49.693594717Z collecting notification methods
2022-09-04T02:23:49.693729316Z found 1 notification methods
2022-09-04T02:23:49.696747822Z User cpbpilot already exists - skipping creation
2022-09-04T02:23:49.720018026Z Scheduled task 'build.tasks.check_overdue_build_orders' already exists - updating!
2022-09-04T02:23:49.748689241Z collecting notification methods
2022-09-04T02:23:49.748735569Z found 1 notification methods
2022-09-04T02:23:49.750121250Z User cpbpilot already exists - skipping creation
2022-09-04T02:23:49.761200567Z collecting notification methods
2022-09-04T02:23:49.761256055Z found 1 notification methods
2022-09-04T02:23:49.763046788Z User cpbpilot already exists - skipping creation
2022-09-04T02:24:17.269104412Z EMAIL_HOST is not configured
2022-09-04T02:24:17.269160472Z EMAIL_HOST_USER is not configured
2022-09-04T02:24:17.269170441Z EMAIL_HOST_PASSWORD is not configured
2022-09-04T02:24:17.309307096Z Saving setting 'InvenTreeSetting:INVENTREE_INSTANCE_TITLE' to cache
2022-09-04T02:24:17.333912650Z Saving setting 'InvenTreeSetting:INVENTREE_INSTANCE_TITLE' to cache
2022-09-04T02:24:17.352823812Z Saving setting 'InvenTreeSetting:LOGIN_ENABLE_REG' to cache
2022-09-04T02:24:17.480470319Z Saving setting 'InvenTreeSetting:LOGIN_ENABLE_REG' to cache
2022-09-04T02:24:17.488073956Z Saving setting 'InvenTreeSetting:LOGIN_ENABLE_PWD_FORGOT' to cache
2022-09-04T02:24:17.504905691Z Saving setting 'InvenTreeSetting:LOGIN_ENABLE_PWD_FORGOT' to cache
2022-09-04T02:24:17.513654193Z Saving setting 'InvenTreeSetting:LOGIN_ENABLE_SSO' to cache
2022-09-04T02:24:17.525111837Z Saving setting 'InvenTreeSetting:LOGIN_ENABLE_SSO' to cache
2022-09-04T02:24:26.352591354Z Saving setting 'InvenTreeSetting:INVENTREE_BASE_URL' to cache
2022-09-04T02:24:26.406985344Z Saving setting 'InvenTreeSetting:INVENTREE_BASE_URL' to cache
2022-09-04T02:24:26.408779421Z /root/.local/lib/python3.9/site-packages/django/db/models/fields/__init__.py:1358: RuntimeWarning: DateTimeField NotificationEntry.updated received a naive datetime (2022-09-02 00:00:00) while time zone support is active.
2022-09-04T02:24:26.408870968Z   warnings.warn("DateTimeField %s.%s received a naive datetime "
2022-09-04T02:24:26.410215271Z Gathering users for notification 'inventree.error_log'
2022-09-04T02:24:26.411345418Z Sending notification 'inventree.error_log' for 'Error object (1)'
2022-09-04T02:24:26.411424902Z Triggering notification method 'ui_message'
2022-09-04T02:24:26.411458085Z Notify users via 'ui_message' for notification 'inventree.error_log' for 'Error object (1)'
2022-09-04T02:24:26.430397493Z Notified 1 users via 'ui_message' for notification 'inventree.error_log' for 'Error object (1)' successfully
2022-09-04T02:24:26.530960457Z Saving setting 'InvenTreeSetting:BARCODE_ENABLE' to cache
2022-09-04T02:24:26.544596005Z Saving setting 'InvenTreeSetting:BARCODE_ENABLE' to cache
2022-09-04T02:24:26.547740717Z Saving setting 'InvenTreeSetting:REPORT_ENABLE_TEST_REPORT' to cache
2022-09-04T02:24:26.560652414Z Saving setting 'InvenTreeSetting:REPORT_ENABLE_TEST_REPORT' to cache
2022-09-04T02:24:26.563785504Z Saving setting 'InvenTreeSetting:REPORT_ENABLE' to cache
2022-09-04T02:24:26.574976829Z Saving setting 'InvenTreeSetting:REPORT_ENABLE' to cache
2022-09-04T02:24:26.578183805Z Saving setting 'InvenTreeSetting:SERVER_RESTART_REQUIRED' to cache
2022-09-04T02:24:26.591128905Z Saving setting 'InvenTreeSetting:SERVER_RESTART_REQUIRED' to cache
2022-09-04T02:24:26.594304960Z Saving setting 'InvenTreeSetting:LABEL_ENABLE' to cache
2022-09-04T02:24:26.605481276Z Saving setting 'InvenTreeSetting:LABEL_ENABLE' to cache
2022-09-04T02:24:26.608687731Z Saving setting 'InvenTreeSetting:INVENTREE_RESTRICT_ABOUT' to cache
2022-09-04T02:24:26.621904285Z Saving setting 'InvenTreeSetting:INVENTREE_RESTRICT_ABOUT' to cache
2022-09-04T02:24:26.649366443Z Saving setting 'InvenTreeUserSetting:STICKY_HEADER_user:None' to cache
2022-09-04T02:24:26.664170738Z Saving setting 'InvenTreeUserSetting:STICKY_HEADER_user:None' to cache
2022-09-04T02:24:26.668202314Z Saving setting 'InvenTreeSetting:ENABLE_PLUGINS_NAVIGATION' to cache
2022-09-04T02:24:26.672807346Z Saving setting 'InvenTreeSetting:SERVER_RESTART_REQUIRED' to cache
2022-09-04T02:24:26.686496967Z Saving setting 'InvenTreeSetting:ENABLE_PLUGINS_NAVIGATION' to cache
2022-09-04T02:24:26.740660943Z Internal Server Error: /accounts/login/
2022-09-04T02:24:26.740693144Z Traceback (most recent call last):
2022-09-04T02:24:26.740703281Z   File "/root/.local/lib/python3.9/site-packages/django/core/handlers/exception.py", line 47, in inner
2022-09-04T02:24:26.740727917Z     response = get_response(request)
2022-09-04T02:24:26.740736647Z   File "/root/.local/lib/python3.9/site-packages/django/core/handlers/base.py", line 181, in _get_response
2022-09-04T02:24:26.740745417Z     response = wrapped_callback(request, *callback_args, **callback_kwargs)
2022-09-04T02:24:26.740759760Z   File "/root/.local/lib/python3.9/site-packages/django/views/generic/base.py", line 70, in view
2022-09-04T02:24:26.740769096Z     return self.dispatch(request, *args, **kwargs)
2022-09-04T02:24:26.740776893Z   File "/root/.local/lib/python3.9/site-packages/django/utils/decorators.py", line 43, in _wrapper
2022-09-04T02:24:26.740784896Z     return bound_method(*args, **kwargs)
2022-09-04T02:24:26.740798512Z   File "/root/.local/lib/python3.9/site-packages/django/views/decorators/debug.py", line 89, in sensitive_post_parameters_wrapper
2022-09-04T02:24:26.740807864Z     return view(request, *args, **kwargs)
2022-09-04T02:24:26.740815685Z   File "/root/.local/lib/python3.9/site-packages/allauth/account/views.py", line 149, in dispatch
2022-09-04T02:24:26.740828644Z     return super(LoginView, self).dispatch(request, *args, **kwargs)
2022-09-04T02:24:26.740837057Z   File "/root/.local/lib/python3.9/site-packages/allauth/account/views.py", line 77, in dispatch
2022-09-04T02:24:26.740845461Z     response = super(RedirectAuthenticatedUserMixin, self).dispatch(
2022-09-04T02:24:26.740853439Z   File "/root/.local/lib/python3.9/site-packages/django/views/generic/base.py", line 98, in dispatch
2022-09-04T02:24:26.740866535Z     return handler(request, *args, **kwargs)
2022-09-04T02:24:26.740875175Z   File "/root/.local/lib/python3.9/site-packages/allauth/account/views.py", line 104, in post
2022-09-04T02:24:26.740883059Z     if form.is_valid():
2022-09-04T02:24:26.740900695Z   File "/root/.local/lib/python3.9/site-packages/django/forms/forms.py", line 175, in is_valid
2022-09-04T02:24:26.740909407Z     return self.is_bound and not self.errors
2022-09-04T02:24:26.740917296Z   File "/root/.local/lib/python3.9/site-packages/django/forms/forms.py", line 170, in errors
2022-09-04T02:24:26.740925200Z     self.full_clean()
2022-09-04T02:24:26.740940856Z   File "/root/.local/lib/python3.9/site-packages/django/forms/forms.py", line 373, in full_clean
2022-09-04T02:24:26.740949423Z     self._clean_form()
2022-09-04T02:24:26.740957289Z   File "/root/.local/lib/python3.9/site-packages/django/forms/forms.py", line 400, in _clean_form
2022-09-04T02:24:26.740965111Z     cleaned_data = self.clean()
2022-09-04T02:24:26.740979589Z   File "/root/.local/lib/python3.9/site-packages/allauth/account/forms.py", line 178, in clean
2022-09-04T02:24:26.740989057Z     user = get_adapter(self.request).authenticate(self.request, **credentials)
2022-09-04T02:24:26.740997059Z   File "/root/.local/lib/python3.9/site-packages/allauth/account/adapter.py", line 585, in authenticate
2022-09-04T02:24:26.741010524Z     self.pre_authenticate(request, **credentials)
2022-09-04T02:24:26.741019051Z   File "/root/.local/lib/python3.9/site-packages/allauth/account/adapter.py", line 570, in pre_authenticate
2022-09-04T02:24:26.741026991Z     if not ratelimit.consume(
2022-09-04T02:24:26.741034625Z   File "/root/.local/lib/python3.9/site-packages/allauth/ratelimit.py", line 66, in consume
2022-09-04T02:24:26.741047820Z     allowed = len(history) < amount
2022-09-04T02:24:26.741056409Z TypeError: '<' not supported between instances of 'int' and 'str'
2022-09-04T02:24:26.873787270Z Unauthorized: /js/dynamic/calendar.js
2022-09-04T02:24:26.877413674Z Unauthorized: /js/dynamic/settings.js
2022-09-04T02:24:27.203884424Z Unauthorized: /js/dynamic/nav.js
CPBPILOT commented 2 years ago

Actually there are 3 pod, and 5 containers total. My password has a special character. for the sake of trying i uninstalled and reinstall with a simpler username and password. after trying to log in again I still get the same error.

CPBPILOT commented 2 years ago

Didnt mean to close this issue here are the 5 logs from the 5 containers inventree_inventree-5c9f8f967f-7bwbn_worker.log inventree_inventree-5c9f8f967f-7bwbn_nginx.log inventree_inventree-5c9f8f967f-7bwbn_inventree.log inventree_inventree-redis-0_inventree-redis.log inventree_inventree-postgresql-0_inventree-postgresql.log

SchrodingersGat commented 2 years ago

Looks like the django-allauth library is throwing an error here, as it has been passed a string amount parameter:

https://github.com/pennersr/django-allauth/blob/6315e25122f6f2ca25e9b4b3cc80bd4fa62df5d2/allauth/ratelimit.py#L46

@CPBPILOT have you configured any custom auth settings here? In particular, have you setup rate limiting?

@matmair you're more familiar with this part of the codebase - anything stand out to you?

CPBPILOT commented 2 years ago

I have not explicitly set anything, but this is being installed through truecharts on a trueNAS server. They are really doing all the installs of the different pods and containers. Stavros-k over at truecharts probably knows better what they are doing in the background. Not sure how to tag him in this comment the @ isn't pulling him up. Also just to ref I am not a Linux/docker/CLI expert so if you need me to get some information from the setup I have no problem helping but you might have to walk me through a little more than others

stavros-k commented 2 years ago

There not rate-limiting enabled when Installed without Ingress (aka reverse proxy). (Errors happen without Ingress, haven't tried with) There are only some resource limits, per pod. Those limits are pretty high. It's 4 vCores and 8GiB of RAM.

Here is also some logs from the browser console

login/ payload looks fine

image image

calendar.js,nav.js and settings.js respond with 401 Unauthorized.

The rest respond with 404 Not found. It tries to fetch something from /static/i18n/{lng}.something.js

the {lng} seems to be passed literal, and not substituted with the actual language.

Also this seems weird while sitting on the login screen

image
matmair commented 2 years ago

Not a supported install way and I do not have access to a true nas instance for reproducing so not sure how much we can do. I will take a look in the weekend (+3d).

matmair commented 2 years ago

@stavros-k is the command 'invoke update' run during the install? Seems like not all static data is pre-rendered correctly.

stavros-k commented 2 years ago

@stavros-k is the command 'invoke update' run during the install? Seems like not all static data is pre-rendered correctly.

After Redis and Postgres is up and running, An inventree container starts and runs (overriding main command of the container)

cd /home/inventree
invoke update

Once that is completed, then main inventree container starts, plus a worker container, along with the nginx container.

stavros-k commented 2 years ago

Just to make sure, I just exec'ed into the running Inventree container, run invoke update again. python packages all were installed already.

I had changed dir to /home/inventree

# invoke update
Installing required python packages from 'requirements.txt'
Requirement already satisfied: pip in /usr/local/lib/python3.9/site-packages (22.2.2)
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
Requirement already satisfied: arrow==1.2.2 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 7)) (1.2.2)
Requirement already satisfied: asgiref==3.5.2 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 9)) (3.5.2)
Requirement already satisfied: babel==2.10.3 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 11)) (2.10.3)
Requirement already satisfied: bleach[css]==5.0.1 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 13)) (5.0.1)
Requirement already satisfied: blessed==1.19.1 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 15)) (1.19.1)
Requirement already satisfied: brotli==1.0.9 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 17)) (1.0.9)
Requirement already satisfied: certifi==2022.6.15 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 19)) (2022.6.15)
Requirement already satisfied: cffi==1.15.1 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 23)) (1.15.1)
Requirement already satisfied: charset-normalizer==2.1.0 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 27)) (2.1.0)
Requirement already satisfied: coreapi==2.3.3 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 29)) (2.3.3)
Requirement already satisfied: coreschema==0.0.4 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 31)) (0.0.4)
Requirement already satisfied: cryptography==3.4.8 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 33)) (3.4.8)
Requirement already satisfied: cssselect2==0.6.0 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 37)) (0.6.0)
Requirement already satisfied: defusedxml==0.7.1 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 39)) (0.7.1)
Requirement already satisfied: diff-match-patch==20200713 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 43)) (20200713)
Requirement already satisfied: django==3.2.15 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 45)) (3.2.15)
Requirement already satisfied: django-allauth==0.51.0 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 70)) (0.51.0)
Requirement already satisfied: django-allauth-2fa==0.10.0 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 74)) (0.10.0)
Requirement already satisfied: django-cleanup==6.0.0 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 76)) (6.0.0)
Requirement already satisfied: django-cors-headers==3.13.0 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 78)) (3.13.0)
Requirement already satisfied: django-crispy-forms==1.14.0 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 80)) (1.14.0)
Requirement already satisfied: django-error-report==0.2.0 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 82)) (0.2.0)
Requirement already satisfied: django-filter==22.1 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 84)) (22.1)
Requirement already satisfied: django-formtools==2.3 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 86)) (2.3)
Requirement already satisfied: django-import-export==2.5.0 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 88)) (2.5.0)
Requirement already satisfied: django-js-asset==2.0.0 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 90)) (2.0.0)
Requirement already satisfied: django-maintenance-mode==0.16.3 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 92)) (0.16.3)
Requirement already satisfied: django-markdownify==0.9.2 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 94)) (0.9.2)
Requirement already satisfied: django-money==2.1.1 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 96)) (2.1.1)
Requirement already satisfied: django-mptt==0.11.0 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 98)) (0.11.0)
Requirement already satisfied: django-otp==1.1.3 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 100)) (1.1.3)
Requirement already satisfied: django-picklefield==3.1 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 102)) (3.1)
Requirement already satisfied: django-q==1.3.9 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 104)) (1.3.9)
Requirement already satisfied: django-redis==5.2.0 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 106)) (5.2.0)
Requirement already satisfied: django-sql-utils==0.6.1 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 108)) (0.6.1)
Requirement already satisfied: django-sslserver==0.22 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 110)) (0.22)
Requirement already satisfied: django-stdimage==5.3.0 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 112)) (5.3.0)
Requirement already satisfied: django-user-sessions==1.7.1 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 114)) (1.7.1)
Requirement already satisfied: django-weasyprint==2.1.0 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 116)) (2.1.0)
Requirement already satisfied: django-xforwardedfor-middleware==2.0 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 118)) (2.0)
Requirement already satisfied: djangorestframework==3.13.1 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 120)) (3.13.1)
Requirement already satisfied: et-xmlfile==1.1.0 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 122)) (1.1.0)
Requirement already satisfied: fonttools[woff]==4.34.4 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 124)) (4.34.4)
Requirement already satisfied: gunicorn==20.1.0 in /usr/local/lib/python3.9/site-packages (from -r requirements.txt (line 126)) (20.1.0)
Requirement already satisfied: html5lib==1.1 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 128)) (1.1)
Requirement already satisfied: idna==3.3 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 130)) (3.3)
Requirement already satisfied: importlib-metadata==4.12.0 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 132)) (4.12.0)
Requirement already satisfied: itypes==1.2.0 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 134)) (1.2.0)
Requirement already satisfied: jinja2==3.1.2 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 136)) (3.1.2)
Requirement already satisfied: markdown==3.4.1 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 138)) (3.4.1)
Requirement already satisfied: markuppy==1.14 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 140)) (1.14)
Requirement already satisfied: markupsafe==2.1.1 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 142)) (2.1.1)
Requirement already satisfied: oauthlib==3.2.0 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 144)) (3.2.0)
Requirement already satisfied: odfpy==1.4.1 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 146)) (1.4.1)
Requirement already satisfied: openpyxl==3.0.10 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 148)) (3.0.10)
Requirement already satisfied: pdf2image==1.16.0 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 150)) (1.16.0)
Requirement already satisfied: pillow==9.2.0 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 152)) (9.2.0)
Requirement already satisfied: py-moneyed==1.2 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 160)) (1.2)
Requirement already satisfied: pycparser==2.21 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 164)) (2.21)
Requirement already satisfied: pydyf==0.2.0 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 166)) (0.2.0)
Requirement already satisfied: pyjwt[crypto]==2.4.0 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 168)) (2.4.0)
Requirement already satisfied: pyphen==0.12.0 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 170)) (0.12.0)
Requirement already satisfied: python-barcode[images]==0.14.0 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 172)) (0.14.0)
Requirement already satisfied: python-dateutil==2.8.2 in /usr/local/lib/python3.9/site-packages (from -r requirements.txt (line 174)) (2.8.2)
Requirement already satisfied: python-fsutil==0.6.1 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 176)) (0.6.1)
Requirement already satisfied: python3-openid==3.2.0 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 178)) (3.2.0)
Requirement already satisfied: pytz==2022.1 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 180)) (2022.1)
Requirement already satisfied: pyyaml==6.0 in /usr/local/lib/python3.9/site-packages (from -r requirements.txt (line 185)) (6.0)
Requirement already satisfied: qrcode[pil]==7.3.1 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 187)) (7.3.1)
Requirement already satisfied: rapidfuzz==0.7.6 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 191)) (0.7.6)
Requirement already satisfied: redis==3.5.3 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 193)) (3.5.3)
Requirement already satisfied: requests==2.28.1 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 197)) (2.28.1)
Requirement already satisfied: requests-oauthlib==1.3.1 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 202)) (1.3.1)
Requirement already satisfied: sentry-sdk==1.9.0 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 204)) (1.9.0)
Requirement already satisfied: six==1.16.0 in /usr/local/lib/python3.9/site-packages (from -r requirements.txt (line 206)) (1.16.0)
Requirement already satisfied: sqlparse==0.4.2 in /usr/local/lib/python3.9/site-packages (from -r requirements.txt (line 212)) (0.4.2)
Requirement already satisfied: tablib[html,ods,xls,xlsx,yaml]==3.2.1 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 216)) (3.2.1)
Requirement already satisfied: tinycss2==1.1.1 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 220)) (1.1.1)
Requirement already satisfied: uritemplate==4.1.1 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 225)) (4.1.1)
Requirement already satisfied: urllib3==1.26.11 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 227)) (1.26.11)
Requirement already satisfied: wcwidth==0.2.5 in /usr/local/lib/python3.9/site-packages (from -r requirements.txt (line 231)) (0.2.5)
Requirement already satisfied: weasyprint==54.3 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 233)) (54.3)
Requirement already satisfied: webencodings==0.5.1 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 237)) (0.5.1)
Requirement already satisfied: xlrd==2.0.1 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 243)) (2.0.1)
Requirement already satisfied: xlwt==1.3.0 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 245)) (1.3.0)
Requirement already satisfied: zipp==3.8.1 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 247)) (3.8.1)
Requirement already satisfied: zopfli==0.2.1 in /root/.local/lib/python3.9/site-packages (from -r requirements.txt (line 249)) (0.2.1)
Requirement already satisfied: setuptools in /usr/local/lib/python3.9/site-packages (from django-money==2.1.1->-r requirements.txt (line 96)) (60.0.5)
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
Installing plugin packages from '/home/inventree/data/plugins.txt'
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
Running InvenTree database migrations...
========================================
2022-09-07 09:23:20,870 INFO SECRET_KEY loaded by INVENTREE_SECRET_KEY
2022-09-07 09:23:20,922 INFO DB_ENGINE: django.db.backends.postgresql
2022-09-07 09:23:20,922 INFO DB_NAME: inventree
2022-09-07 09:23:20,922 INFO DB_HOST: teset-postgresql
Clearing SERVER_RESTART_REQUIRED flag
Plugins not enabled - skipping loading sequence
collecting notification methods
found 1 notification methods
No changes detected
2022-09-07 09:23:23,953 INFO SECRET_KEY loaded by INVENTREE_SECRET_KEY
2022-09-07 09:23:24,008 INFO DB_ENGINE: django.db.backends.postgresql
2022-09-07 09:23:24,008 INFO DB_NAME: inventree
2022-09-07 09:23:24,008 INFO DB_HOST: teset-postgresql
Plugins not enabled - skipping loading sequence
collecting notification methods
found 1 notification methods
Operations to perform:
  Apply all migrations: account, admin, auth, authtoken, build, common, company, contenttypes, django_q, error_report, exchange, label, order, otp_static, otp_totp, part, plugin, report, sites, socialaccount, stock, user_sessions, users
Running migrations:
  No migrations to apply.
2022-09-07 09:23:27,038 INFO SECRET_KEY loaded by INVENTREE_SECRET_KEY
2022-09-07 09:23:27,074 INFO DB_ENGINE: django.db.backends.postgresql
2022-09-07 09:23:27,074 INFO DB_NAME: inventree
2022-09-07 09:23:27,074 INFO DB_HOST: teset-postgresql
Plugins not enabled - skipping loading sequence
collecting notification methods
found 1 notification methods
Operations to perform:
  Synchronize unmigrated apps: InvenTree, allauth, allauth_2fa, corsheaders, crispy_forms, django_cleanup, django_filters, django_otp, djmoney, formtools, import_export, maintenance_mode, markdownify, messages, mptt, rest_framework, staticfiles
  Apply all migrations: account, admin, auth, authtoken, build, common, company, contenttypes, django_q, error_report, exchange, label, order, otp_static, otp_totp, part, plugin, report, sites, socialaccount, stock, user_sessions, users
Synchronizing apps without migrations:
  Creating tables...
    Running deferred SQL...
Running migrations:
  No migrations to apply.
2022-09-07 09:23:29,484 INFO SECRET_KEY loaded by INVENTREE_SECRET_KEY
2022-09-07 09:23:29,521 INFO DB_ENGINE: django.db.backends.postgresql
2022-09-07 09:23:29,521 INFO DB_NAME: inventree
2022-09-07 09:23:29,521 INFO DB_HOST: teset-postgresql
Plugins not enabled - skipping loading sequence
collecting notification methods
found 1 notification methods
System check identified no issues (1 silenced).
========================================
InvenTree database migrations completed!
2022-09-07 09:23:31,329 INFO SECRET_KEY loaded by INVENTREE_SECRET_KEY
2022-09-07 09:23:31,364 INFO DB_ENGINE: django.db.backends.postgresql
2022-09-07 09:23:31,364 INFO DB_NAME: inventree
2022-09-07 09:23:31,364 INFO DB_HOST: teset-postgresql
Plugins not enabled - skipping loading sequence
collecting notification methods
found 1 notification methods
Rebuilding Part objects
Rebuilding PartCategory objects
Rebuilding StockItem objects
Rebuilding StockLocation objects
Rebuilding Build objects
2022-09-07 09:23:33,144 INFO SECRET_KEY loaded by INVENTREE_SECRET_KEY
2022-09-07 09:23:33,180 INFO DB_ENGINE: django.db.backends.postgresql
2022-09-07 09:23:33,180 INFO DB_NAME: inventree
2022-09-07 09:23:33,180 INFO DB_HOST: teset-postgresql
Plugins not enabled - skipping loading sequence
collecting notification methods
found 1 notification methods
Rebuilding Part thumbnails
Rebuilding Company thumbnails
2022-09-07 09:23:34,978 INFO SECRET_KEY loaded by INVENTREE_SECRET_KEY
2022-09-07 09:23:35,013 INFO DB_ENGINE: django.db.backends.postgresql
2022-09-07 09:23:35,013 INFO DB_NAME: inventree
2022-09-07 09:23:35,013 INFO DB_HOST: teset-postgresql
Plugins not enabled - skipping loading sequence
collecting notification methods
found 1 notification methods
render stock.js
render notification.js
render model_renderers.js
render bom.js
render filters.js
render api.js
render table_filters.js
render part.js
render build.js
render modals.js
render report.js
render tables.js
render search.js
render attachment.js
render barcode.js
render order.js
render company.js
render label.js
render forms.js
render helpers.js
render plugin.js
rendered all files in /home/inventree/InvenTree/templates/js/translated
2022-09-07 09:23:46,799 INFO SECRET_KEY loaded by INVENTREE_SECRET_KEY
2022-09-07 09:23:46,834 INFO DB_ENGINE: django.db.backends.postgresql
2022-09-07 09:23:46,834 INFO DB_NAME: inventree
2022-09-07 09:23:46,834 INFO DB_HOST: teset-postgresql
Plugins not enabled - skipping loading sequence
collecting notification methods
found 1 notification methods

525 static files copied to '/home/inventree/data/static', 2251 unmodified.
2022-09-07 09:23:48,604 INFO SECRET_KEY loaded by INVENTREE_SECRET_KEY
2022-09-07 09:23:48,639 INFO DB_ENGINE: django.db.backends.postgresql
2022-09-07 09:23:48,640 INFO DB_NAME: inventree
2022-09-07 09:23:48,640 INFO DB_HOST: teset-postgresql
Plugins not enabled - skipping loading sequence
Starting background tasks...
collecting notification methods
found 1 notification methods
User test already exists - skipping creation
Collecting settings
deleted setting 'INVENTREE_LATEST_VERSION'
checked all settings
InvenTree translation coverage: 19%
2022-09-07 09:23:50,618 INFO SECRET_KEY loaded by INVENTREE_SECRET_KEY
2022-09-07 09:23:50,653 INFO DB_ENGINE: django.db.backends.postgresql
2022-09-07 09:23:50,653 INFO DB_NAME: inventree
2022-09-07 09:23:50,653 INFO DB_HOST: teset-postgresql
Plugins not enabled - skipping loading sequence
collecting notification methods
found 1 notification methods
File “/home/inventree/InvenTree/locale/en/LC_MESSAGES/django.po” is already compiled and up to date.
File “/home/inventree/InvenTree/locale/zh/LC_MESSAGES/django.po” is already compiled and up to date.
File “/home/inventree/InvenTree/locale/pt/LC_MESSAGES/django.po” is already compiled and up to date.
File “/home/inventree/InvenTree/locale/th/LC_MESSAGES/django.po” is already compiled and up to date.
File “/home/inventree/InvenTree/locale/he/LC_MESSAGES/django.po” is already compiled and up to date.
File “/home/inventree/InvenTree/locale/ru/LC_MESSAGES/django.po” is already compiled and up to date.
File “/home/inventree/InvenTree/locale/it/LC_MESSAGES/django.po” is already compiled and up to date.
File “/home/inventree/InvenTree/locale/pt_br/LC_MESSAGES/django.po” is already compiled and up to date.
File “/home/inventree/InvenTree/locale/fa/LC_MESSAGES/django.po” is already compiled and up to date.
File “/home/inventree/InvenTree/locale/ja/LC_MESSAGES/django.po” is already compiled and up to date.
File “/home/inventree/InvenTree/locale/nl/LC_MESSAGES/django.po” is already compiled and up to date.
File “/home/inventree/InvenTree/locale/cs/LC_MESSAGES/django.po” is already compiled and up to date.
File “/home/inventree/InvenTree/locale/tr/LC_MESSAGES/django.po” is already compiled and up to date.
File “/home/inventree/InvenTree/locale/hu/LC_MESSAGES/django.po” is already compiled and up to date.
File “/home/inventree/InvenTree/locale/pl/LC_MESSAGES/django.po” is already compiled and up to date.
File “/home/inventree/InvenTree/locale/sv/LC_MESSAGES/django.po” is already compiled and up to date.
File “/home/inventree/InvenTree/locale/vi/LC_MESSAGES/django.po” is already compiled and up to date.
File “/home/inventree/InvenTree/locale/de/LC_MESSAGES/django.po” is already compiled and up to date.
File “/home/inventree/InvenTree/locale/fr/LC_MESSAGES/django.po” is already compiled and up to date.
File “/home/inventree/InvenTree/locale/no/LC_MESSAGES/django.po” is already compiled and up to date.
File “/home/inventree/InvenTree/locale/es/LC_MESSAGES/django.po” is already compiled and up to date.
File “/home/inventree/InvenTree/locale/id/LC_MESSAGES/django.po” is already compiled and up to date.
File “/home/inventree/InvenTree/locale/es_MX/LC_MESSAGES/django.po” is already compiled and up to date.
File “/home/inventree/InvenTree/locale/ko/LC_MESSAGES/django.po” is already compiled and up to date.
File “/home/inventree/InvenTree/locale/el/LC_MESSAGES/django.po” is already compiled and up to date.

But still the problem pesirsts

PrivatePuffin commented 2 years ago

Not a supported install way and I do not have access to a true nas instance for reproducing so not sure how much we can do. I will take a look in the weekend (+3d).

Are you serieusly telling people docker and kubernetes are considered totally unsupported?! It;s 2022 'nuf said.

CPBPILOT commented 2 years ago

@matmair I have a test server I can give you access to that is a fresh install of trueNAS and only has the current imventree app installed. Do you have another way to contact you that I can send the access information to

PrivatePuffin commented 2 years ago

@matmair I have a test server I can I can give you access to that is a fresh install of trueNAS and only has the current imventree app installed. Do you have another way to contact you that I can send the access information to

TrueNAS is irrelevant in this case, please stop those references. Devs can test with on any helm platform they like, our helm charts (aka apps) are mostly platform agnostic.

matmair commented 2 years ago

Not a supported install way and I do not have access to a true nas instance for reproducing so not sure how much we can do. I will take a look in the weekend (+3d).

Are you serieusly telling people docker and kubernetes are considered totally unsupported?! It;s 2022 'nuf said.

@Ornias1993 are you seriously demanding free support for your plattform from devs in their free time? We have offical bare-metal and docker guides and configs that we support. HeIm/k8s is not on that list as the app is not scaling out properly and support for object storage is not implemented. I am not going to spend my limited free time learning and supporting all the ways devs invent to host and deploy software.

Also I already started debugging as you can see from the next message - but I will stop that now as I can see that I will not enjoy working with this project a bit. But good to know how the TrueCharts project ticks. Maybe someone else from the team feels inclined to help.

CPBPILOT commented 2 years ago

@Ornias1993 If you read there documents docker is a supported way but maybe not k8s. Maybe after solving this issue they would add it to the supported ways to install. As @matmair mentioned he had already started debugging and asking @stavros-k questions and they were working together.

PrivatePuffin commented 2 years ago

Not a supported install way and I do not have access to a true nas instance for reproducing so not sure how much we can do. I will take a look in the weekend (+3d).

Are you serieusly telling people docker and kubernetes are considered totally unsupported?! It;s 2022 'nuf said.

@Ornias1993 are you seriously demanding free support for your plattform from devs in their free time? We have offical bare-metal and docker guides and configs that we support. HeIm/k8s is not on that list as the app is not scaling out properly and support for object storage is not implemented. I am not going to spend my limited free time learning and supporting all the ways devs invent to host and deploy software.

Also I already started debugging as you can see from the next message - but I will stop that now as I can see that I will not enjoy working with this project a bit. But good to know how the TrueCharts project ticks. Maybe someone else from the team feels inclined to help.

To be clear: We basicallly just spin-up the container on kubernetes without much kubernetes special sauce. this error is not likely to be caused by anything kubernetes as far as we’re aware.

hence my surprise about the fact you did not support docker.

there was no reason to assume bad intent. Like I said: It sounded like you where saying your own docker container was not supported.

PrivatePuffin commented 2 years ago

@Ornias1993 If you read there documents docker is a supported way but maybe not k8s. Maybe after solving this issue they would add it to the supported ways to install. As @matmair mentioned he had already started debugging and asking @stavros-k questions and they were working together. But then you have coming in here parading you big ass head like you know everything.

While I might have some difference of opinion with the team here. I do respect them as people and for their work.

There was absolutely zero reason, however, for you to start namecalling people and ranting in multiple projects because of that.

CPBPILOT commented 2 years ago

Not a supported install way and I do not have access to a true nas instance for reproducing so not sure how much we can do. I will take a look in the weekend (+3d).

Are you serieusly telling people docker and kubernetes are considered totally unsupported?! It;s 2022 'nuf said.

@Ornias1993 Please tell me how the "nuf said" comment was in any way in good faith. You were being just as arrogant!

PrivatePuffin commented 2 years ago

Not a supported install way and I do not have access to a true nas instance for reproducing so not sure how much we can do. I will take a look in the weekend (+3d).

Are you serieusly telling people docker and kubernetes are considered totally unsupported?! It;s 2022 'nuf said.

@Ornias1993 Please tell me how the "nuf said" comment was in any way in good faith. You were being just as arrogant!

It was indeed maybe not the nicest way of wording surprise. But thats between me myself and @matmair . I might have, depending on how you read it, indeed sounded arrogant. But thats no reason to start going off-topic and derail your own issue to start calling people names.

my apologies to @matmair if I sounded onreasonably rude, obviously.

I would ofcourse prefer the issue here being looked into, rather that derail this into a personality contest. So ill leave it at that, not to trigger @CPBPILOT any furter. @stavros-k can handle it from here.

SchrodingersGat commented 2 years ago

Please let us all maintain a level of civility in the discussion here. Aggression towards anyone is not acceptable.

This is an open source project maintained by us in our spare time.

This issue may be particular to your setup, or it might be an upstream bug in the allauth library we use. It could also be on our end. We'll do what we can (when we can) to get to the bottom of it.

AivarasAukselis commented 2 years ago

I just tried to setup inventree on truenas scale and ran into this issue. Any updates or workarounds to make it working?

SchrodingersGat commented 2 years ago

@AivarasAukselis can you tell us some more about your setup? In particular have you implemented any auth rate limiting?

AivarasAukselis commented 2 years ago

@AivarasAukselis can you tell us some more about your setup? In particular have you implemented any auth rate limiting?

No, nothing specific, just default settings for the helm chart. Perhaps some of the default settings chosen by truecharts invoke the bug. Here is the prinscreen of all the settings i can control: Screenshot_20220927-084503_Chrome.jpg

SchrodingersGat commented 2 years ago

@AivarasAukselis can you post the error log you are seeing here, so we can compare to the original post?

AivarasAukselis commented 2 years ago

@AivarasAukselis can you post the error log you are seeing here, so we can compare to the original post?

Sure, here it is: inventree_inventree-5b5fcf4df-s4k44_inventree.log

AivarasAukselis commented 2 years ago

Hmm, seems to work if I change the field of login attempts from 5 to empty. Perhaps the field value is passed as a string instead of an int?

stavros-k commented 2 years ago

@AivarasAukselis Wow, wouldn't have thought to check that :) You are correct.

Kubernetes configmaps can't have int values. There are workarounds, yes.

If this can be handled in the inventtree side, that would be perfect. @SchrodingersGat, Maybe something like int(ENV_VAR)? Otherwise I'll see what I can do.

Looks like there are 6 envs that need to be int (that I can find)

The DB, Redis and Web port seems to work even as string

matmair commented 2 years ago

It works on Kubernetes if an int is provided. This is a problem with the used deployment method. A system-specific fix might be provided in the future. However, I will state that Kubernetes in general is not a supported method as none of the maintainers or core devs use it. So this might break at any point without us noticing or fixing it soon.

stavros-k commented 2 years ago

It works on Kubernetes if an int is provided.

Yes it does, but as the values coming from env's even on docker or docker-compose can be passed as strings.

Anyway. I get that it might break.