Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请教如何正确安装3.0.5的rng-tools #1389

Closed
triaqu opened this issue Mar 21, 2017 · 4 comments
Closed

请教如何正确安装3.0.5的rng-tools #1389

triaqu opened this issue Mar 21, 2017 · 4 comments
Labels

Comments

@triaqu
Copy link

triaqu commented Mar 21, 2017

安装运行3.0.5后看status里

Mar 21 04:07:10 tragic systemd[1]: Started Shadowsocks-libev Default Server Service.
Mar 21 04:07:10 tragic ss-server[30834]: 2017-03-21 04:07:10 INFO: using tcp fast open
Mar 21 04:07:10 tragic ss-server[30834]: 2017-03-21 04:07:10 INFO: plugin "obfs-server" enabled
Mar 21 04:07:10 tragic ss-server[30834]: 2017-03-21 04:07:10 INFO: UDP relay enabled
Mar 21 04:07:10 tragic ss-server[30834]: 2017-03-21 04:07:10 INFO: initializing ciphers... aes-128-gcm
Mar 21 04:07:10 tragic ss-server[30834]: 2017-03-21 04:07:10 ERROR: This system doesn't provide enough entropy to quickly generate high-quality random numbers
Mar 21 04:07:10 tragic ss-server[30834]: Installing the rng-utils/rng-tools or haveged packages may help.
Mar 21 04:07:10 tragic ss-server[30834]: On virtualized Linux environments, also consider using virtio-rng.
Mar 21 04:07:10 tragic ss-server[30834]: The service will not start until enough entropy has been collected.

apt-get install rng-tools后提示:
...
Setting up rng-tools (2-unofficial-mt.14-1) ...
Job for rng-tools.service failed. See 'systemctl status rng-tools.service' and 'journalctl -xn' for details.
invoke-rc.d: initscript rng-tools, action "start" failed.
Processing triggers for systemd (215-17+deb8u6) ...
root@tragic:~/ss/3.0.5# systemctl status rng-tools.service
● rng-tools.service - (null)
Loaded: loaded (/etc/init.d/rng-tools)
Active: failed (Result: exit-code) since Tue 2017-03-21 03:52:09 EDT; 19s ago

Mar 21 03:52:09 tragic rng-tools[25851]: Starting Hardware RNG entropy gatherer daemon: (failed).
Mar 21 03:52:09 tragic systemd[1]: rng-tools.service: control process exited, code=exited status=1
Mar 21 03:52:09 tragic systemd[1]: Failed to start (null).
Mar 21 03:52:09 tragic systemd[1]: Unit rng-tools.service entered failed state.

service rng-tools restart
Job for rng-tools.service failed. See 'systemctl status rng-tools.service' and 'journalctl -xn' for details.
root@tragic:~/ss/3.0.5# systemctl status rng-tools.service
● rng-tools.service - (null)
Loaded: loaded (/etc/init.d/rng-tools)
Active: failed (Result: exit-code) since Tue 2017-03-21 03:55:09 EDT; 18s ago
Process: 26477 ExecStart=/etc/init.d/rng-tools start (code=exited, status=1/FAILURE)

Mar 21 03:55:09 tragic rng-tools[26477]: Starting Hardware RNG entropy gatherer daemon: (failed).
Mar 21 03:55:09 tragic systemd[1]: rng-tools.service: control process exited, code=exited status=1
Mar 21 03:55:09 tragic systemd[1]: Failed to start (null).
Mar 21 03:55:09 tragic systemd[1]: Unit rng-tools.service entered failed state.

请问这个rng-tools该如何安装,是要写配置文件还是少装了什么库。

@wongsyrone
Copy link

也许这个东西应该降级到Info,看到ERROR都panic了

@triaqu
Copy link
Author

triaqu commented Mar 21, 2017

google到方法了,
rngd -r /dev/urandom
service rng-tools restart

service rng-tools status
● rng-tools.service - (null)
Loaded: loaded (/etc/init.d/rng-tools)
Active: active (exited) since Tue 2017-03-21 04:44:38 EDT; 19s ago
Process: 6083 ExecStart=/etc/init.d/rng-tools start (code=exited, status=0/SUCCESS)

Mar 21 04:44:38 tragic rng-tools[6083]: Starting Hardware RNG entropy gatherer daemon: /usr/sbin/rngd already running.
Mar 21 04:44:38 tragic systemd[1]: Started (null).

service shadowsocks-libev status
● shadowsocks-libev.service - Shadowsocks-libev Default Server Service
Loaded: loaded (/lib/systemd/system/shadowsocks-libev.service; enabled)
Active: active (running) since Tue 2017-03-21 04:46:03 EDT; 3s ago
Docs: man:shadowsocks-libev(8)
Main PID: 6681 (ss-server)
CGroup: /system.slice/shadowsocks-libev.service
├─6681 /usr/bin/ss-server -c /etc/shadowsocks-libev/config.json -u
└─6682 obfs-server

Mar 21 04:46:03 tragic systemd[1]: Started Shadowsocks-libev Default Server Service.
Mar 21 04:46:03 tragic ss-server[6681]: 2017-03-21 04:46:03 INFO: using tcp fast open
Mar 21 04:46:03 tragic ss-server[6681]: 2017-03-21 04:46:03 INFO: plugin "obfs-server" enabled
Mar 21 04:46:03 tragic ss-server[6681]: 2017-03-21 04:46:03 INFO: UDP relay enabled
Mar 21 04:46:03 tragic ss-server[6681]: 2017-03-21 04:46:03 INFO: initializing ciphers... aes-128-gcm
Mar 21 04:46:03 tragic ss-server[6681]: 2017-03-21 04:46:03 INFO: tcp server listening at 127.0.0.1:39831
Mar 21 04:46:03 tragic ss-server[6681]: 2017-03-21 04:46:03 INFO: udp server listening at 0.0.0.0:2017
Mar 21 04:46:03 tragic ss-server[6681]: 2017-03-21 04:46:03 [simple-obfs] INFO: obfuscating enabled
Mar 21 04:46:03 tragic ss-server[6681]: 2017-03-21 04:46:03 [simple-obfs] INFO: tcp port reuse enabled
Mar 21 04:46:03 tragic ss-server[6681]: 2017-03-21 04:46:03 [simple-obfs] INFO: listening at 0.0.0.0:2017

@wongsyrone
Copy link

rngd -r /dev/urandom 这个用法是错的没边,相当于把/dev/urandom重新导入/dev/random,欺骗内核让他认为有足够的熵源。

如果你用现代内核的话,这个错误不必在意。唯一需要做的就是多等会。

@triaqu
Copy link
Author

triaqu commented Mar 21, 2017

谢谢,那就不管他。

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

No branches or pull requests

3 participants