Redis unable to bind socket and /proc/sys/net/core/somaxconn error #1084
Unanswered
bardwang
asked this question in
Getting Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi Team,
Could anyone help me to understand why I am getting this error?
The netbox docker version works fine on my laptop. However, once I try to make it run on one of our servers. It doesn't work the shows the error log below.
Is Redis unable to bind socket the root cause of the issue?
docker compose up
[+] Running 13/13
✔ Network netbox-docker_default Created 0.0s
✔ Volume "netbox-docker_netbox-media-files" Created 0.0s
✔ Volume "netbox-docker_netbox-reports-files" Created 0.0s
✔ Volume "netbox-docker_netbox-scripts-files" Created 0.0s
✔ Volume "netbox-docker_netbox-postgres-data" Created 0.0s
✔ Volume "netbox-docker_netbox-redis-data" Created 0.0s
✔ Volume "netbox-docker_netbox-redis-cache-data" Created 0.0s
✔ Container netbox-docker-postgres-1 Created 0.1s
✔ Container netbox-docker-redis-cache-1 Created 0.1s
✔ Container netbox-docker-redis-1 Created 0.1s
✔ Container netbox-docker-netbox-1 Created 0.1s
✔ Container netbox-docker-netbox-worker-1 Created 0.0s
✔ Container netbox-docker-netbox-housekeeping-1 Created 0.0s
Attaching to netbox-docker-netbox-1, netbox-docker-netbox-housekeeping-1, netbox-docker-netbox-worker-1, netbox-docker-postgres-1, netbox-docker-redis-1, netbox-docker-redis-cache-1
netbox-docker-redis-cache-1 | 1:C 18 Sep 2023 08:35:46.675 * oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
netbox-docker-redis-cache-1 | 1:C 18 Sep 2023 08:35:46.675 * Redis version=7.2.1, bits=64, commit=00000000, modified=0, pid=1, just started
netbox-docker-redis-cache-1 | 1:C 18 Sep 2023 08:35:46.675 * Configuration loaded
netbox-docker-redis-cache-1 | 1:M 18 Sep 2023 08:35:46.676 * monotonic clock: POSIX clock_gettime
netbox-docker-redis-cache-1 | 1:M 18 Sep 2023 08:35:46.676 * Running mode=standalone, port=6379.
netbox-docker-redis-cache-1 | 1:M 18 Sep 2023 08:35:46.676 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
netbox-docker-redis-cache-1 | 1:M 18 Sep 2023 08:35:46.678 # Warning: Could not create server TCP listening socket :::6379: unable to bind socket, errno: 97
netbox-docker-redis-cache-1 | 1:M 18 Sep 2023 08:35:46.678 * Server initialized
netbox-docker-redis-cache-1 | 1:M 18 Sep 2023 08:35:46.678 * Ready to accept connections tcp
netbox-docker-redis-1 | 1:C 18 Sep 2023 08:35:46.794 * oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
netbox-docker-redis-1 | 1:C 18 Sep 2023 08:35:46.794 * Redis version=7.2.1, bits=64, commit=00000000, modified=0, pid=1, just started
netbox-docker-redis-1 | 1:C 18 Sep 2023 08:35:46.794 * Configuration loaded
netbox-docker-redis-1 | 1:M 18 Sep 2023 08:35:46.794 * monotonic clock: POSIX clock_gettime
netbox-docker-redis-1 | 1:M 18 Sep 2023 08:35:46.795 * Running mode=standalone, port=6379.
netbox-docker-redis-1 | 1:M 18 Sep 2023 08:35:46.795 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
netbox-docker-redis-1 | 1:M 18 Sep 2023 08:35:46.796 # Warning: Could not create server TCP listening socket :::6379: unable to bind socket, errno: 97
netbox-docker-redis-1 | 1:M 18 Sep 2023 08:35:46.796 * Server initialized
netbox-docker-redis-1 | 1:M 18 Sep 2023 08:35:46.798 * Creating AOF base file appendonly.aof.1.base.rdb on server start
netbox-docker-redis-1 | 1:M 18 Sep 2023 08:35:46.799 * Creating AOF incr file appendonly.aof.1.incr.aof on server start
netbox-docker-redis-1 | 1:M 18 Sep 2023 08:35:46.799 * Ready to accept connections tcp
netbox-docker-postgres-1 | The files belonging to this database system will be owned by user "postgres".
netbox-docker-postgres-1 | This user must also own the server process.
netbox-docker-postgres-1 |
netbox-docker-postgres-1 | The database cluster will be initialized with locale "en_US.utf8".
netbox-docker-postgres-1 | The default database encoding has accordingly been set to "UTF8".
netbox-docker-postgres-1 | The default text search configuration will be set to "english".
netbox-docker-postgres-1 |
netbox-docker-postgres-1 | Data page checksums are disabled.
netbox-docker-postgres-1 |
netbox-docker-postgres-1 | fixing permissions on existing directory /var/lib/postgresql/data ... ok
netbox-docker-postgres-1 | creating subdirectories ... ok
netbox-docker-postgres-1 | selecting dynamic shared memory implementation ... posix
netbox-docker-postgres-1 | selecting default max_connections ... 100
netbox-docker-postgres-1 | selecting default shared_buffers ... 128MB
netbox-docker-postgres-1 | selecting default time zone ... UTC
netbox-docker-postgres-1 | creating configuration files ... ok
netbox-docker-postgres-1 | running bootstrap script ... ok
netbox-docker-postgres-1 | sh: locale: not found
netbox-docker-postgres-1 | 2023-09-18 08:35:47.178 UTC [30] WARNING: no usable system locales were found
netbox-docker-netbox-1 | 🧬 loaded config '/etc/netbox/config/configuration.py'
netbox-docker-netbox-1 | Traceback (most recent call last):
netbox-docker-netbox-1 | File "/opt/netbox/netbox/./manage.py", line 10, in
netbox-docker-netbox-1 | execute_from_command_line(sys.argv)
netbox-docker-netbox-1 | File "/opt/netbox/venv/lib/python3.11/site-packages/django/core/management/init.py", line 442, in execute_from_command_line
netbox-docker-netbox-1 | utility.execute()
netbox-docker-netbox-1 | File "/opt/netbox/venv/lib/python3.11/site-packages/django/core/management/init.py", line 382, in execute
netbox-docker-netbox-1 | settings.INSTALLED_APPS
netbox-docker-netbox-1 | File "/opt/netbox/venv/lib/python3.11/site-packages/django/conf/init.py", line 102, in getattr
netbox-docker-netbox-1 | self._setup(name)
netbox-docker-netbox-1 | File "/opt/netbox/venv/lib/python3.11/site-packages/django/conf/init.py", line 89, in _setup
netbox-docker-netbox-1 | self._wrapped = Settings(settings_module)
netbox-docker-netbox-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^
netbox-docker-netbox-1 | File "/opt/netbox/venv/lib/python3.11/site-packages/django/conf/init.py", line 217, in init
netbox-docker-netbox-1 | mod = importlib.import_module(self.SETTINGS_MODULE)
netbox-docker-netbox-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
netbox-docker-netbox-1 | File "/usr/lib/python3.11/importlib/init.py", line 126, in import_module
netbox-docker-netbox-1 | return _bootstrap._gcd_import(name[level:], package, level)
netbox-docker-netbox-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
netbox-docker-netbox-1 | File "", line 1204, in _gcd_import
netbox-docker-netbox-1 | File "", line 1176, in _find_and_load
netbox-docker-netbox-1 | File "", line 1147, in _find_and_load_unlocked
netbox-docker-netbox-1 | File "", line 690, in _load_unlocked
netbox-docker-netbox-1 | File "", line 940, in exec_module
netbox-docker-netbox-1 | File "", line 241, in _call_with_frames_removed
netbox-docker-netbox-1 | File "/opt/netbox/netbox/netbox/settings.py", line 51, in
netbox-docker-netbox-1 | configuration = importlib.import_module(config_path)
netbox-docker-netbox-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
netbox-docker-netbox-1 | File "/usr/lib/python3.11/importlib/init.py", line 126, in import_module
netbox-docker-netbox-1 | return _bootstrap._gcd_import(name[level:], package, level)
netbox-docker-netbox-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
netbox-docker-netbox-1 | File "", line 1204, in _gcd_import
netbox-docker-netbox-1 | File "", line 1176, in _find_and_load
netbox-docker-netbox-1 | File "", line 1147, in _find_and_load_unlocked
netbox-docker-netbox-1 | File "", line 690, in _load_unlocked
netbox-docker-netbox-1 | File "", line 940, in exec_module
netbox-docker-netbox-1 | File "", line 241, in _call_with_frames_removed
netbox-docker-netbox-1 | File "/opt/netbox/netbox/netbox/configuration.py", line 71, in
netbox-docker-netbox-1 | _loaded_configurations = read_configurations(
netbox-docker-netbox-1 | ^^^^^^^^^^^^^^^^^^^^
netbox-docker-netbox-1 | File "/opt/netbox/netbox/netbox/configuration.py", line 55, in read_configurations
netbox-docker-netbox-1 | _import(module_name, f.path, loaded_configurations)
netbox-docker-netbox-1 | File "/opt/netbox/netbox/netbox/configuration.py", line 20, in _import
netbox-docker-netbox-1 | spec.loader.exec_module(module)
netbox-docker-netbox-1 | File "", line 936, in exec_module
netbox-docker-netbox-1 | File "", line 1074, in get_code
netbox-docker-netbox-1 | File "", line 1004, in source_to_code
netbox-docker-netbox-1 | File "", line 241, in _call_with_frames_removed
netbox-docker-netbox-1 | SyntaxError: source code string cannot contain null bytes
netbox-docker-netbox-1 | ⏳ Waiting on DB... (0s / 30s)
netbox-docker-postgres-1 | performing post-bootstrap initialization ... ok
netbox-docker-postgres-1 | syncing data to disk ... ok
netbox-docker-postgres-1 |
netbox-docker-postgres-1 |
netbox-docker-postgres-1 | Success. You can now start the database server using:
netbox-docker-postgres-1 |
netbox-docker-postgres-1 | pg_ctl -D /var/lib/postgresql/data -l logfile start
netbox-docker-postgres-1 |
netbox-docker-postgres-1 | initdb: warning: enabling "trust" authentication for local connections
netbox-docker-postgres-1 | initdb: hint: You can change this by editing pg_hba.conf or using the option -A, or --auth-local and --auth-host, the next time you run initdb.
netbox-docker-postgres-1 | waiting for server to start....2023-09-18 08:35:47.616 UTC [36] LOG: starting PostgreSQL 15.4 on x86_64-pc-linux-musl, compiled by gcc (Alpine 12.2.1_git20220924-r10) 12.2.1 20220924, 64-bit
netbox-docker-postgres-1 | 2023-09-18 08:35:47.624 UTC [36] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
netbox-docker-postgres-1 | 2023-09-18 08:35:47.627 UTC [39] LOG: database system was shut down at 2023-09-18 08:35:47 UTC
netbox-docker-postgres-1 | 2023-09-18 08:35:47.629 UTC [36] LOG: database system is ready to accept connections
netbox-docker-postgres-1 | done
netbox-docker-postgres-1 | server started
netbox-docker-postgres-1 | CREATE DATABASE
netbox-docker-postgres-1 |
netbox-docker-postgres-1 |
netbox-docker-postgres-1 | /usr/local/bin/docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/*
netbox-docker-postgres-1 |
netbox-docker-postgres-1 | waiting for server to shut down....2023-09-18 08:35:47.760 UTC [36] LOG: received fast shutdown request
netbox-docker-postgres-1 | 2023-09-18 08:35:47.760 UTC [36] LOG: aborting any active transactions
netbox-docker-postgres-1 | 2023-09-18 08:35:47.762 UTC [36] LOG: background worker "logical replication launcher" (PID 42) exited with exit code 1
netbox-docker-postgres-1 | 2023-09-18 08:35:47.762 UTC [37] LOG: shutting down
netbox-docker-postgres-1 | 2023-09-18 08:35:47.762 UTC [37] LOG: checkpoint starting: shutdown immediate
netbox-docker-postgres-1 | 2023-09-18 08:35:47.781 UTC [37] LOG: checkpoint complete: wrote 918 buffers (5.6%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.016 s, sync=0.002 s, total=0.020 s; sync files=301, longest=0.001 s, average=0.001 s; distance=4223 kB, estimate=4223 kB
netbox-docker-postgres-1 | 2023-09-18 08:35:47.786 UTC [36] LOG: database system is shut down
netbox-docker-postgres-1 | done
netbox-docker-postgres-1 | server stopped
netbox-docker-postgres-1 |
netbox-docker-postgres-1 | PostgreSQL init process complete; ready for start up.
netbox-docker-postgres-1 |
netbox-docker-postgres-1 | 2023-09-18 08:35:47.879 UTC [1] LOG: starting PostgreSQL 15.4 on x86_64-pc-linux-musl, compiled by gcc (Alpine 12.2.1_git20220924-r10) 12.2.1 20220924, 64-bit
netbox-docker-postgres-1 | 2023-09-18 08:35:47.882 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
netbox-docker-postgres-1 | 2023-09-18 08:35:47.883 UTC [1] LOG: could not create IPv6 socket for address "::": Address family not supported by protocol
netbox-docker-postgres-1 | 2023-09-18 08:35:47.884 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
netbox-docker-postgres-1 | 2023-09-18 08:35:47.886 UTC [52] LOG: database system was shut down at 2023-09-18 08:35:47 UTC
netbox-docker-postgres-1 | 2023-09-18 08:35:47.889 UTC [1] LOG: database system is ready to accept connections
Beta Was this translation helpful? Give feedback.
All reactions