apiVersion: batch/v1
kind: Job
metadata:
name: test-site
spec:
backoffLimit: 1
template:
spec:
securityContext:
supplementalGroups: [1000]
containers:
- name: create-site
image: frappe/erpnext-worker:latest
args: ["new"]
imagePullPolicy: IfNotPresent
volumeMounts:
- name: sites-dir
mountPath: /home/frappe/frappe-bench/sites
env:
- name: "SITE_NAME"
value: "erpnext.hiramlabs.com"
- name: "DB_ROOT_USER"
value: root
- name: "MYSQL_ROOT_PASSWORD"
valueFrom:
secretKeyRef:
key: password
name: mariadb-root-password
- name: "ADMIN_PASSWORD"
value: "p4ssw0rd"
- name: "INSTALL_APPS"
value: "erpnext"
restartPolicy: Never
volumes:
- name: sites-dir
persistentVolumeClaim:
claimName: erpnext
readOnly: false
ERROR
2021-03-23T14:53:58.399124814Z
Traceback (most recent call last): File "/home/frappe/frappe-bench/commands/new.py", line 118, in <module> main() File "/home/frappe/frappe-bench/commands/new.py", line 70, in main db_port=db_port, File "/home/frappe/frappe-bench/apps/frappe/frappe/installer.py", line 72, in _new_site no_mariadb_socket=no_mariadb_socket, File "/home/frappe/frappe-bench/apps/frappe/frappe/installer.py", line 101, in install_db make_conf(db_name, site_config=site_config, db_password=db_password, db_type=db_type, db_host=db_host, db_port=db_port) File "/home/frappe/frappe-bench/apps/frappe/frappe/installer.py", line 321, in make_conf frappe.init(site, sites_path=sites_path) File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 199, in init setup_module_map() File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 1091, in setup_module_map _cache.set_value("module_app", local.module_app) File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/redis_wrapper.py", line 48, in set_value self.set(key, pickle.dumps(val)) File "/home/frappe/frappe-bench/env/lib/python3.7/site-packages/redis/client.py", line 1801, in set return self.execute_command('SET', *pieces) File "/home/frappe/frappe-bench/env/lib/python3.7/site-packages/redis/client.py", line 901, in execute_command return self.parse_response(conn, command_name, **options) File "/home/frappe/frappe-bench/env/lib/python3.7/site-packages/redis/client.py", line 915, in parse_response response = connection.read_response() File "/home/frappe/frappe-bench/env/lib/python3.7/site-packages/redis/connection.py", line 756, in read_response raise response redis.exceptions.ResponseError: DENIED Redis is running in protected mode because protected mode is enabled, no bind address was specified, no authentication password is requested to clients. In this mode connections are only accepted from the loopback interface. If you want to connect from external computers to Redis you may adopt one of the following solutions: 1) Just disable protected mode sending the command 'CONFIG SET protected-mode no' from the loopback interface by connecting to Redis from the same host the server is running, however MAKE SURE Redis is not publicly accessible from internet if you do so. Use CONFIG REWRITE to make this change permanent. 2) Alternatively you can just disable the protected mode by editing the Redis configuration file, and setting the protected mode option to 'no', and then restarting the server. 3) If you started the server manually just for testing, restart it with the '--protected-mode no' option. 4) Setup a bind address or an authentication password. NOTE: You only need to do one of the above things in order for the server to start accepting connections from the outside.