Skip to content
This repository has been archived by the owner on Dec 12, 2022. It is now read-only.

This system doesn't provide enough entropy to quickly generate high-quality random numbers. #54

Closed
jaggerwang opened this issue Jul 31, 2018 · 12 comments

Comments

@jaggerwang
Copy link

Using the latest version on GCP, got the following logs.

2018-07-31 14:18:28:�[33mKcptun not started......�[0m
2018-07-31 14:18:28:�[32mStarting shadowsocks......�[0m
2018-07-31 14:18:28: 2018-07-31 14:18:28 INFO: using tcp fast open
2018-07-31 14:18:28: 2018-07-31 14:18:28 INFO: initializing ciphers... aes-256-cfb
2018-07-31 14:18:28: 2018-07-31 14:18:28 INFO: This system doesn't provide enough entropy to quickly generate high-quality random numbers.
2018-07-31 14:18:28:Installing the rng-utils/rng-tools, jitterentropy or haveged packages may help.
2018-07-31 14:18:28:On virtualized Linux environments, also consider using virtio-rng.
2018-07-31 14:18:28:The service will not start until enough entropy has been collected.
2018-07-31 14:18:28:
2018-07-31 14:18:28: 2018-07-31 14:18:28 INFO: tcp server listening at 0.0.0.0:6443
2018-07-31 14:18:28: 2018-07-31 14:18:28 INFO: running from root user
mritd pushed a commit that referenced this issue Aug 5, 2018
fix: doesn't provide enough entropy to quickly generate high-quality random numbers

refs #54

Signed-off-by: mritd <mritd1234@gmail.com>
@mritd
Copy link
Owner

mritd commented Aug 5, 2018

I have fixed this problem; but I have not updated the version number of docker image in order to follow the main version of shadowsocks; you can update the image by executing the following command:

docker rmi mritd/shadowsocks:3.2.0
docker pull mritd/shadowsocks:3.2.0

@mritd mritd closed this as completed Aug 5, 2018
@jaggerwang
Copy link
Author

jaggerwang commented Nov 6, 2018

@mritd Still have this problem. Running on GCP VM instance "Linux jw-gcp-server1 4.9.0-8-amd64 #1 SMP Debian 4.9.110-3+deb9u6 (2018-10-08) x86_64".

2018-11-06 14:46:28:Status: Downloaded newer image for mritd/shadowsocks:3.2.0
2018-11-06 14:46:30:Recreating dao_ss_1...
2018-11-06 14:46:46:Creating dao_ss_1...
2018-11-06 14:46:48:�[32mStarting shadowsocks......�[0m
2018-11-06 14:46:48: 2018-11-06 14:46:47 INFO: using tcp fast open
2018-11-06 14:46:48: 2018-11-06 14:46:47 INFO: This system doesn't provide enough entropy to quickly generate high-quality random numbers.
2018-11-06 14:46:48:Installing the rng-utils/rng-tools, jitterentropy or haveged packages may help.
2018-11-06 14:46:48: 2018-11-06 14:46:47 INFO: tcp server listening at 0.0.0.0:6443
2018-11-06 14:46:48: 2018-11-06 14:46:47 INFO: running from root user
2018-11-06 14:46:48:2018/11/06 14:46:47 initiating key derivation
2018-11-06 14:46:48:2018/11/06 14:46:47 listening on: [::]:6500
2018-11-06 14:46:48:2018/11/06 14:46:47 compression: true
2018-11-06 14:46:48:2018/11/06 14:46:47 mtu: 1350
2018-11-06 14:46:48:2018/11/06 14:46:47 acknodelay: false
2018-11-06 14:46:48:2018/11/06 14:46:47 keepalive: 10
2018-11-06 14:46:48:2018/11/06 14:46:47 snmplog: 
2018-11-06 14:46:48:2018/11/06 14:46:47 snmpperiod: 60
2018-11-06 14:46:48:2018/11/06 14:46:47 pprof: false
2018-11-06 14:46:48:2018/11/06 14:46:47 quiet: false

@mritd
Copy link
Owner

mritd commented Nov 6, 2018

Wait a moment, I will test it again.

@mritd mritd reopened this Nov 6, 2018
@mritd
Copy link
Owner

mritd commented Nov 6, 2018

This is a weird problem... I tested it on Conoha's VPS, but there was a problem with GCE's vps; I'm trying to fix it. 😌

@mritd
Copy link
Owner

mritd commented Nov 6, 2018

I added the -r option to fix this error, and the docker hub will finish building later.

refs shadowsocks/shadowsocks-libev#1389

@jaggerwang
Copy link
Author

Still there?

2018-11-06 16:26:20:Pulling ss (index.docker.io/mritd/shadowsocks:3.2.0)...
2018-11-06 16:26:23:3.2.0: Pulling from mritd/shadowsocks
2018-11-06 16:26:23:Digest: sha256:0741040b09848acad8e6542cce0698b0fb8ce1d45e4eb0f164ae84020dea78ae
2018-11-06 16:26:23:Status: Image is up to date for mritd/shadowsocks:3.2.0
2018-11-06 16:26:26:Recreating dao_ss_1...
2018-11-06 16:26:41:Creating dao_ss_1...
2018-11-06 16:26:43:�[32mStarting kcptun......�[0m
2018-11-06 16:26:43:�[32mStarting shadowsocks......�[0m
2018-11-06 16:26:43: 2018-11-06 16:26:42 INFO: using tcp fast open
2018-11-06 16:26:43: 2018-11-06 16:26:42 INFO: initializing ciphers... aes-256-cfb
2018-11-06 16:26:43: 2018-11-06 16:26:42 INFO: This system doesn't provide enough entropy to quickly generate high-quality random numbers.
2018-11-06 16:26:43:Installing the rng-utils/rng-tools, jitterentropy or haveged packages may help.
2018-11-06 16:26:43:On virtualized Linux environments, also consider using virtio-rng.
2018-11-06 16:26:43:The service will not start until enough entropy has been collected.
2018-11-06 16:26:43:
2018-11-06 16:26:43: 2018-11-06 16:26:42 INFO: tcp server listening at 0.0.0.0:6443
2018-11-06 16:26:43: 2018-11-06 16:26:42 INFO: running from root user
2018-11-06 16:26:43:2018/11/06 16:26:42 version: 20181002
2018-11-06 16:26:43:2018/11/06 16:26:42 initiating key derivation
2018-11-06 16:26:43:2018/11/06 16:26:42 listening on: [::]:6500
2018-11-06 16:26:43:2018/11/06 16:26:42 target: 127.0.0.1:6443
2018-11-06 16:26:43:2018/11/06 16:26:42 encryption: aes
2018-11-06 16:26:43:2018/11/06 16:26:42 nodelay parameters: 1 20 2 1
2018-11-06 16:26:43:2018/11/06 16:26:42 sndwnd: 1024 rcvwnd: 1024
2018-11-06 16:26:43:2018/11/06 16:26:42 compression: true
2018-11-06 16:26:43:2018/11/06 16:26:42 mtu: 1350
2018-11-06 16:26:43:2018/11/06 16:26:42 datashard: 10 parityshard: 3
2018-11-06 16:26:43:2018/11/06 16:26:42 acknodelay: false
2018-11-06 16:26:43:2018/11/06 16:26:42 dscp: 0
2018-11-06 16:26:43:2018/11/06 16:26:42 sockbuf: 4194304
2018-11-06 16:26:43:2018/11/06 16:26:42 keepalive: 10
2018-11-06 16:26:43:2018/11/06 16:26:42 snmplog: 
2018-11-06 16:26:43:2018/11/06 16:26:42 snmpperiod: 60
2018-11-06 16:26:43:2018/11/06 16:26:42 pprof: false
2018-11-06 16:26:43:2018/11/06 16:26:42 quiet: false

@mritd
Copy link
Owner

mritd commented Nov 6, 2018

Use -r and --privileged option, like this:

docker run -dt --name test --privileged mritd/shadowsocks:3.2.0 -s "-s 0.0.0.0 -p 6443 -m chacha20 -k test123 --fast-open" -r

@jaggerwang
Copy link
Author

jaggerwang commented Nov 6, 2018

It's the same. Do I need do something on my GCE vps?

~ docker container inspect --format='{{.HostConfig.Privileged}}' dao_ss_1
true

Here is my docker compose file:

ss:
  image: index.docker.io/mritd/shadowsocks:3.2.0
  privileged: true
  restart: always
  ports:
  - 10300:6443
  environment:
  - SS_MODULE=ss-server
  - SS_CONFIG=-s 0.0.0.0 -p 6443 -m aes-256-cfb -k xxx --fast-open
  - KCP_FLAG=true
  - KCP_MODULE=kcpserver
  - KCP_CONFIG=-t 127.0.0.1:6443 -l :6500 -mode fast2

@mritd
Copy link
Owner

mritd commented Nov 6, 2018

add environment RNGD_FLAG=true

@jaggerwang
Copy link
Author

Have another error:

Use /dev/urandom to quickly generate high-quality random numbers......
Failed to init entropy source 1: TPM RNG Device

Starting kcptun......
Starting shadowsocks......
 2018-11-06 18:44:00 INFO: using tcp fast open
 2018-11-06 18:44:00 INFO: initializing ciphers... aes-256-cfb
 2018-11-06 18:44:00 INFO: tcp server listening at 0.0.0.0:6443
 2018-11-06 18:44:00 INFO: running from root user
2018/11/06 18:44:00 version: 20181002
2018/11/06 18:44:00 initiating key derivation
2018/11/06 18:44:00 listening on: [::]:6500
2018/11/06 18:44:00 target: 127.0.0.1:6443
2018/11/06 18:44:00 encryption: aes
2018/11/06 18:44:00 nodelay parameters: 1 20 2 1
2018/11/06 18:44:00 sndwnd: 1024 rcvwnd: 1024
2018/11/06 18:44:00 compression: true
2018/11/06 18:44:00 mtu: 1350
2018/11/06 18:44:00 datashard: 10 parityshard: 3
2018/11/06 18:44:00 acknodelay: false
2018/11/06 18:44:00 dscp: 0
2018/11/06 18:44:00 sockbuf: 4194304
2018/11/06 18:44:00 keepalive: 10
2018/11/06 18:44:00 snmplog:
2018/11/06 18:44:00 snmpperiod: 60
2018/11/06 18:44:00 pprof: false
2018/11/06 18:44:00 quiet: false

@mritd
Copy link
Owner

mritd commented Nov 6, 2018

This error message should be ignored.

@jaggerwang
Copy link
Author

Got it!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants