Redis server started, but killed in a second - redis

I created 500 MB rdb file on OS X machine and Redis server works fine there. But on Ubuntu Server it is killed in several seconds after having started:
$ src/redis-server configFile_6381.conf
[1004] 30 Jan 15:50:27.591 * Max number of open files set to 10032
_._
_.-``__ ''-._
_.-`` `. `_. ''-._ Redis 2.6.17 (00000000/0) 64 bit
.-`` .-```. ```\/ _.,_ ''-._
( ' , .-` | `, ) Running in stand alone mode
|`-._`-...-` __...-.``-._|'` _.-'| Port: 6381
| `-._ `._ / _.-' | PID: 1004
`-._ `-._ `-./ _.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' | http://redis.io
`-._ `-._`-.__.-'_.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' |
`-._ `-._`-.__.-'_.-' _.-'
`-._ `-.__.-' _.-'
`-._ _.-'
`-.__.-'
[1004] 30 Jan 15:50:27.593 # Server started, Redis version 2.6.17
Killed
Config file (configFile_6381.conf):
daemonize yes
pidfile /var/run/redisVgo.pid
port 6381
timeout 0
tcp-keepalive 0
loglevel verbose
logfile /root/Dropbox/redis/_projects/vgo/vgo.log
databases 16
save 900 1
save 300 10
save 60 10000
stop-writes-on-bgsave-error yes
rdbcompression yes
rdbchecksum yes
dbfilename vgo6381.rdb
dir ./
slave-serve-stale-data yes
slave-read-only yes
repl-disable-tcp-nodelay no
slave-priority 100
appendonly no
appendfsync everysec
no-appendfsync-on-rewrite no
auto-aof-rewrite-percentage 100
auto-aof-rewrite-min-size 64mb
lua-time-limit 5000
slowlog-log-slower-than 10000
slowlog-max-len 128
hash-max-ziplist-entries 512
hash-max-ziplist-value 64
list-max-ziplist-entries 512
list-max-ziplist-value 64
set-max-intset-entries 512
zset-max-ziplist-entries 128
zset-max-ziplist-value 64
activerehashing yes
client-output-buffer-limit normal 0 0 0
client-output-buffer-limit slave 256mb 64mb 60
client-output-buffer-limit pubsub 32mb 8mb 60
hz 10
aof-rewrite-incremental-fsync yes
Sometimes before killing I see message in client output:
(error) LOADING Redis is loading the dataset in memory

Check if you run the same Redis version on both systems.
I used different Redis versions, which caused the trouble. On OS X it was 2.8, on Ubuntu Server it was 2.6. After I set up Redis 2.8 on Ubuntu Server, my .rdb file started there well.

I was running in a similar issue and it seems that my dump.rdb was corrupted. If you do not care about the data currently loaded in your Redis, you can simply remove /var/lib/redis/dump.rdb and restart redis-server.

Related

when I run redis-stack-server,redis-stack config file is not work

I installed redis-stack on Ubuntu20. I changed redis-stack.conf but it not work.I changed daemonize to yes but it not work.
this is log when I run redis-stack-server
root#Server-30c80333-7b1b-40ce-a1e2-217630a6941b:~# redis-stack-server
Starting redis-stack-server, database path /var/lib/redis-stack
3601:C 03 Jun 2022 01:37:09.809 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
3601:C 03 Jun 2022 01:37:09.809 # Redis version=7.0.0, bits=64, commit=00000000, modified=0, pid=3601, just started
3601:C 03 Jun 2022 01:37:09.809 # Configuration loaded
3601:M 03 Jun 2022 01:37:09.810 * monotonic clock: POSIX clock_gettime
_._
_.-``__ ''-._
_.-`` `. `_. ''-._ Redis 7.0.0 (00000000/0) 64 bit
.-`` .-```. ```\/ _.,_ ''-._
( ' , .-` | `, ) Running in standalone mode
|`-._`-...-` __...-.``-._|'` _.-'| Port: 6379
| `-._ `._ / _.-' | PID: 3601
`-._ `-._ `-./ _.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' | https://redis.io
`-._ `-._`-.__.-'_.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' |
`-._ `-._`-.__.-'_.-' _.-'
`-._ `-.__.-' _.-'
`-._ _.-'
`-.__.-'
this is config I read from redis-client
127.0.0.1:6379> info server
# Server
redis_version:7.0.0
redis_git_sha1:00000000
redis_git_dirty:0
redis_build_id:23cf6761424b731f
redis_mode:standalone
os:Linux 5.4.0-100-generic x86_64
arch_bits:64
monotonic_clock:POSIX clock_gettime
multiplexing_api:epoll
atomicvar_api:c11-builtin
gcc_version:9.4.0
process_id:3601
process_supervised:no
run_id:4c157cf9e719b8afeb43fdbcbd11873448e650ac
tcp_port:6379
server_time_usec:1654191533516795
uptime_in_seconds:104
uptime_in_days:0
hz:10
configured_hz:10
lru_clock:10024365
executable:/opt/redis-stack/bin/redis-server
config_file:/opt/redis-stack/etc/redis-stack.conf
io_threads_active:0
127.0.0.1:6379> config get daemonize
1) "daemonize"
2) "no"
127.0.0.1:6379> exit
I find redis-stack.conf in config_file path, but I can not find redis-config file in anywhere.
I want to change the daemonize to yes but I can't find redis-config file.
You should have a config file present in /opt/redis-stack/etc/.

FATAL: Data file was created with a Redis server configured to handle more than 1 databases. Exiting

I have one redis instance and my redis.conf file is:
# masterauth [password]
# requirepass [password]
bind 0.0.0.0
protected-mode no
# port 6379
tcp-backlog 511
timeout 0
tcp-keepalive 300
pidfile /var/run/redis_6380.pid
loglevel verbose
#databases 1
stop-writes-on-bgsave-error yes
rdbcompression yes
rdbchecksum yes
dbfilename dump.rdb
dir /data
appendonly no
appendfilename "appendonly.aof"
# appendfsync always
appendfsync everysec
# appendfsync no
no-appendfsync-on-rewrite no
auto-aof-rewrite-percentage 100
auto-aof-rewrite-min-size 64mb
aof-load-truncated yes
aof-use-rdb-preamble no
lua-time-limit 5000
slowlog-log-slower-than 10000
slowlog-max-len 128
latency-monitor-threshold 0
notify-keyspace-events ""
hash-max-ziplist-entries 512
hash-max-ziplist-value 64
list-max-ziplist-size -2
list-compress-depth 0
set-max-intset-entries 512
zset-max-ziplist-entries 128
zset-max-ziplist-value 64
hll-sparse-max-bytes 3000
activerehashing yes
client-output-buffer-limit normal 0 0 0
client-output-buffer-limit slave 256mb 64mb 60
client-output-buffer-limit pubsub 32mb 8mb 60
hz 10
aof-rewrite-incremental-fsync yes
maxmemory 1000mb
maxmemory-policy volatile-ttl
port 6379
databases 1
requirepass [password]
masterauth [password]
but my redis can not start!!!
logs:
22:C 19 Aug 2021 07:39:51.385 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
22:C 19 Aug 2021 07:39:51.385 # Redis version=5.0.7, bits=64, commit=00000000, modified=0, pid=22, just started
22:C 19 Aug 2021 07:39:51.385 # Configuration loaded
22:M 19 Aug 2021 07:39:51.387 * Running mode=standalone, port=6379.
22:M 19 Aug 2021 07:39:51.387 # Server initialized
22:M 19 Aug 2021 07:39:51.468 # FATAL: Data file was created with a Redis server configured to handle more than 1 databases. Exiting
ERROR is:
22:M 19 Aug 2021 07:39:51.468 # FATAL: Data file was created with a Redis server configured to handle more than 1 databases. Exiting
what am i doing??
I solved the problem!!!
I was deployed in k8s and using PVC. I don't know why, but after remove PVC and bound new one, this error was fixed

Redis sentinel node can not sync after failover

We have setup Redis with sentinel high availability using 3 nodes. Suppose fist node is master, when we reboot first node, failover happens and second node becomes master, until this point every thing is OK. But when fist node comes back it cannot sync with master and we saw that in its config no "masterauth" is set.
Here is the error log and Generated by CONFIG REWRITE config:
1182:S 29 May 2021 13:49:42.713 * Reconnecting to MASTER 192.168.1.2:6379 after failure
1182:S 29 May 2021 13:49:42.716 * MASTER <-> REPLICA sync started
1182:S 29 May 2021 13:49:42.716 * Non blocking connect for SYNC fired the event.
1182:S 29 May 2021 13:49:42.717 * Master replied to PING, replication can continue...
1182:S 29 May 2021 13:49:42.717 * (Non critical) Master does not understand REPLCONF listening-port: -NOAUTH Authentication required.
1182:S 29 May 2021 13:49:42.717 * (Non critical) Master does not understand REPLCONF capa: -NOAUTH Authentication required.
1182:S 29 May 2021 13:49:42.717 * Partial resynchronization not possible (no cached master)
1182:S 29 May 2021 13:49:42.718 # Unexpected reply to PSYNC from master: -NOAUTH Authentication required.
1182:S 29 May 2021 13:49:42.718 * Retrying with SYNC...
# Generated by CONFIG REWRITE
save 3600 1
save 300 100
save 60 10000
user default on #eb5fbb922a75775721db681c49600c069cf686765eeebaa6e18fad195812140d ~* &* +#all
replicaof 192.168.1.2 6379
What is the problem?
Config Sample:
bind 127.0.0.1 -::1 192.168.1.3
protected-mode yes
port 6379
tcp-backlog 511
timeout 0
tcp-keepalive 300
daemonize yes
supervised systemd
pidfile "/var/run/redis_6379.pid"
loglevel notice
logfile ""
databases 16
always-show-logo no
set-proc-title yes
proc-title-template "{title} {listen-addr} {server-mode}"
stop-writes-on-bgsave-error yes
rdbcompression yes
rdbchecksum yes
dbfilename "dump.rdb"
rdb-del-sync-files no
dir "/"
replicaof 192.168.1.2 6379
masterauth "redis"
replica-serve-stale-data yes
replica-read-only yes
repl-diskless-sync no
repl-diskless-sync-delay 5
repl-diskless-load disabled
repl-disable-tcp-nodelay no
replica-priority 100
acllog-max-len 128
requirepass "redis"
lazyfree-lazy-eviction no
lazyfree-lazy-expire no
lazyfree-lazy-server-del no
replica-lazy-flush no
lazyfree-lazy-user-del no
lazyfree-lazy-user-flush no
oom-score-adj no
oom-score-adj-values 0 200 800
disable-thp yes
appendonly no
appendfilename "appendonly.aof"
appendfsync everysec
no-appendfsync-on-rewrite no
auto-aof-rewrite-percentage 100
auto-aof-rewrite-min-size 64mb
aof-load-truncated yes
aof-use-rdb-preamble yes
lua-time-limit 5000
slowlog-log-slower-than 10000
slowlog-max-len 128
latency-monitor-threshold 0
notify-keyspace-events ""
hash-max-ziplist-entries 512
hash-max-ziplist-value 64
list-max-ziplist-size -2
list-compress-depth 0
set-max-intset-entries 512
zset-max-ziplist-entries 128
zset-max-ziplist-value 64
hll-sparse-max-bytes 3000
stream-node-max-bytes 4kb
stream-node-max-entries 100
activerehashing yes
client-output-buffer-limit normal 0 0 0
client-output-buffer-limit replica 256mb 64mb 60
client-output-buffer-limit pubsub 32mb 8mb 60
hz 10
dynamic-hz yes
aof-rewrite-incremental-fsync yes
rdb-save-incremental-fsync yes
jemalloc-bg-thread yes
For those who may run into same problem, problem was REDIS misconfiguration, after third deployment we carefully set parameters and no problem was found.

StackExchange.Redis.RedisConnectionException

I'm trying to use Redis as a cache for blacklisting JWTs, to implement logout with JWT.
I have downloaded redis on my windows 10 machine and run "redis-server.exe" and it says :
[6112] 28 Nov 16:28:51.791 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
_._
_.-``__ ''-._
_.-`` `. `_. ''-._ Redis 3.0.504 (00000000/0) 64 bit
.-`` .-```. ```\/ _.,_ ''-._
( ' , .-` | `, ) Running in standalone mode
|`-._`-...-` __...-.``-._|'` _.-'| Port: 6379
| `-._ `._ / _.-' | PID: 6112
`-._ `-._ `-./ _.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' | http://redis.io
`-._ `-._`-.__.-'_.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' |
`-._ `-._`-.__.-'_.-' _.-'
`-._ `-.__.-' _.-'
`-._ _.-'
`-.__.-'
[6112] 28 Nov 16:28:51.798 # Server started, Redis version 3.0.504
[6112] 28 Nov 16:28:51.799 * DB loaded from disk: 0.001 seconds
[6112] 28 Nov 16:28:51.800 * The server is now ready to accept connections on port 6379
Redis 3.0.504 (00000000/0) 64 bit
Running in standalone mode
The server is now ready to accept connections on port 6379
which indicates that it is working correctly.
I'm using .NetCore 3.1 , and I have Microsoft.Extensions.Caching.Redis v2.2.0 Nuget package installed.
in my startup.cs I added
services.AddDistributedRedisCache(r =>
{
r.Configuration = Configuration["Redis:ConnectionString"];
});
and in my appsettings.json I have
"Redis": {
"ConnectionString": "localhsot"
}
but at any request I'm sending I'm getting the following exception :
StackExchange.Redis.RedisConnectionException: It was not possible to connect to the redis server(s); to create a disconnected multiplexer, disable AbortOnConnectFail. SocketFailure on PING
at StackExchange.Redis.ConnectionMultiplexer.ConnectAsync(String configuration, TextWriter log) in c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\ConnectionMultiplexer.cs:line 801
at Microsoft.Extensions.Caching.Redis.RedisCache.ConnectAsync(CancellationToken token)
at Microsoft.Extensions.Caching.Redis.RedisCache.GetAndRefreshAsync(String key, Boolean getData, CancellationToken token)
at Microsoft.Extensions.Caching.Redis.RedisCache.GetAsync(String key, CancellationToken token)
at Microsoft.Extensions.Caching.Distributed.DistributedCacheExtensions.GetStringAsync(IDistributedCache cache, String key, CancellationToken token)
what I'm I doing wrong? why am I getting this exception??
btw I was following this tutorial on cancelling JWTs
I can't believe I'm saying this, but it turned out that the problem that caused this exception that drove me crazy was in the connection string.
instead of "localhost", I typed "localhsot". once I fixed it, everything worked as expected.

Redis in docker starts/restarts multiple times?

I am trying to run redis in docker container by using docker-compose:
docker-compose.yml:
redis:
image: redis:3.0.4
command:
$ docker-compose up
output:
Starting test_redis_1...
Attaching to test_redis_1
redis_1 | 1:C 06 Oct 15:16:13.265 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
redis_1 | _._
redis_1 | _.-``__ ''-._
redis_1 | _.-`` `. `_. ''-._ Redis 3.0.4 (00000000/0) 64 bit
redis_1 | .-`` .-```. ```\/ _.,_ ''-._
redis_1 | ( ' , .-` | `, ) Running in standalone mode
redis_1 | |`-._`-...-` __...-.``-._|'` _.-'| Port: 6379
redis_1 | | `-._ `._ / _.-' | PID: 1
redis_1 | `-._ `-._ `-./ _.-' _.-'
redis_1 | |`-._`-._ `-.__.-' _.-'_.-'|
redis_1 | | `-._`-._ _.-'_.-' | http://redis.io
redis_1 | `-._ `-._`-.__.-'_.-' _.-'
redis_1 | |`-._`-._ `-.__.-' _.-'_.-'|
redis_1 | | `-._`-._ _.-'_.-' |
redis_1 | `-._ `-._`-.__.-'_.-' _.-'
redis_1 | `-._ `-.__.-' _.-'
redis_1 | `-._ _.-'
redis_1 | `-.__.-'
redis_1 |
redis_1 | 1:M 06 Oct 15:16:13.268 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
redis_1 | 1:M 06 Oct 15:16:13.268 # Server started, Redis version 3.0.4
redis_1 | 1:M 06 Oct 15:16:13.268 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. 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.
redis_1 | 1:M 06 Oct 15:16:13.268 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.
redis_1 | 1:M 06 Oct 15:16:13.268 * DB loaded from disk: 0.000 seconds
redis_1 | 1:M 06 Oct 15:16:13.268 * The server is now ready to accept connections on port 6379
redis_1 | 1:signal-handler (1444144583) Received SIGTERM scheduling shutdown...
redis_1 | 1:M 06 Oct 15:16:23.761 # User requested shutdown...
redis_1 | 1:M 06 Oct 15:16:23.761 * Saving the final RDB snapshot before exiting.
redis_1 | 1:M 06 Oct 15:16:23.770 * DB saved on disk
redis_1 | 1:M 06 Oct 15:16:23.770 # Redis is now ready to exit, bye bye...
redis_1 | 1:C 06 Oct 15:16:32.194 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
redis_1 | _._
redis_1 | _.-``__ ''-._
redis_1 | _.-`` `. `_. ''-._ Redis 3.0.4 (00000000/0) 64 bit
redis_1 | .-`` .-```. ```\/ _.,_ ''-._
redis_1 | ( ' , .-` | `, ) Running in standalone mode
redis_1 | |`-._`-...-` __...-.``-._|'` _.-'| Port: 6379
redis_1 | | `-._ `._ / _.-' | PID: 1
redis_1 | `-._ `-._ `-./ _.-' _.-'
redis_1 | |`-._`-._ `-.__.-' _.-'_.-'|
redis_1 | | `-._`-._ _.-'_.-' | http://redis.io
redis_1 | `-._ `-._`-.__.-'_.-' _.-'
redis_1 | |`-._`-._ `-.__.-' _.-'_.-'|
redis_1 | | `-._`-._ _.-'_.-' |
redis_1 | `-._ `-._`-.__.-'_.-' _.-'
redis_1 | `-._ `-.__.-' _.-'
redis_1 | `-._ _.-'
redis_1 | `-.__.-'
redis_1 |
redis_1 | 1:M 06 Oct 15:16:32.195 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
redis_1 | 1:M 06 Oct 15:16:32.195 # Server started, Redis version 3.0.4
redis_1 | 1:M 06 Oct 15:16:32.195 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. 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.
redis_1 | 1:M 06 Oct 15:16:32.195 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.
redis_1 | 1:M 06 Oct 15:16:32.195 * DB loaded from disk: 0.000 seconds
redis_1 | 1:M 06 Oct 15:16:32.195 * The server is now ready to accept connections on port 6379
redis_1 | 1:signal-handler (1444144597) Received SIGTERM scheduling shutdown...
redis_1 | 1:M 06 Oct 15:16:37.141 # User requested shutdown...
redis_1 | 1:M 06 Oct 15:16:37.141 * Saving the final RDB snapshot before exiting.
redis_1 | 1:M 06 Oct 15:16:37.144 * DB saved on disk
redis_1 | 1:M 06 Oct 15:16:37.144 # Redis is now ready to exit, bye bye...
redis_1 | 1:C 06 Oct 15:17:19.085 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
redis_1 | _._
redis_1 | _.-``__ ''-._
redis_1 | _.-`` `. `_. ''-._ Redis 3.0.4 (00000000/0) 64 bit
redis_1 | .-`` .-```. ```\/ _.,_ ''-._
redis_1 | ( ' , .-` | `, ) Running in standalone mode
redis_1 | |`-._`-...-` __...-.``-._|'` _.-'| Port: 6379
redis_1 | | `-._ `._ / _.-' | PID: 1
redis_1 | `-._ `-._ `-./ _.-' _.-'
redis_1 | |`-._`-._ `-.__.-' _.-'_.-'|
redis_1 | | `-._`-._ _.-'_.-' | http://redis.io
redis_1 | `-._ `-._`-.__.-'_.-' _.-'
redis_1 | |`-._`-._ `-.__.-' _.-'_.-'|
redis_1 | | `-._`-._ _.-'_.-' |
redis_1 | `-._ `-._`-.__.-'_.-' _.-'
redis_1 | `-._ `-.__.-' _.-'
redis_1 | `-._ _.-'
redis_1 | `-.__.-'
redis_1 |
redis_1 | 1:M 06 Oct 15:17:19.086 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
redis_1 | 1:M 06 Oct 15:17:19.086 # Server started, Redis version 3.0.4
redis_1 | 1:M 06 Oct 15:17:19.086 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. 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.
redis_1 | 1:M 06 Oct 15:17:19.086 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.
redis_1 | 1:M 06 Oct 15:17:19.086 * DB loaded from disk: 0.000 seconds
redis_1 | 1:M 06 Oct 15:17:19.086 * The server is now ready to accept connections on port 6379
redis_1 | 1:signal-handler (1444144647) Received SIGTERM scheduling shutdown...
redis_1 | 1:M 06 Oct 15:17:27.247 # User requested shutdown...
redis_1 | 1:M 06 Oct 15:17:27.247 * Saving the final RDB snapshot before exiting.
redis_1 | 1:M 06 Oct 15:17:27.256 * DB saved on disk
redis_1 | 1:M 06 Oct 15:17:27.256 # Redis is now ready to exit, bye bye...
For some reason redis starts multiple times, sometimes just once (this is random). And in logs there are many likes like:
redis_1 | 1:signal-handler (1444144597) Received SIGTERM scheduling shutdown...
env:
docker-compose version: 1.4.0
Docker version 1.8.0, build 0d03096
docker-machine version 0.4.0 (9d0dc7a)
edit: It happens only when using docker-compose. While running redis with docker run redis:304 it works fine.
Similar issue has been discussed here: https://github.com/docker/compose/issues/2148
Add --force-recreate to the docker-compose command seems to prevent it.