我目前正在迁移到Puppet 4.x.我正在使用Puppet 4.2.3和Puppetserver 2.1.2运行Ubuntu Server 14.04。我必须向服务器和某些代理添加一些额外的宝石。两个命令都无限期地挂起。
/opt/puppetlabs/bin/puppetserver gem install -V --no-rdoc --no-ri -p http://myproxy.com:8080 rest-client
/opt/puppetlabs/puppet/bin/gem install -V --no-rdoc --no-ri -p http://myproxy.com:8080 rest-client
当我省略代理设置时,我得到相同的行为。
当我在已安装的Ruby 1.9.3环境中在同一台机器上运行gem install
命令时。一切都很完美,所以代理工作正常:
gem install -V --no-rdoc --no-ri rest-client -p http://myproxy.com:8080
GET http://rubygems.org/latest_specs.4.8.gz
302 Found
GET http://rubygems.global.ssl.fastly.net/latest_specs.4.8.gz
200 OK
GET http://rubygems.org/quick/Marshal.4.8/rest-client-1.8.0.gemspec.rz
302 Found
GET http://rubygems.global.ssl.fastly.net/quick/Marshal.4.8/rest-client-1.8.0.gemspec.rz
200 OK
...
有人知道如何解决问题。它现在变成了我的硬阻挡。
答案 0 :(得分:0)
我发现了这个问题...... jstack
给了我以下追踪:
"main" prio=10 tid=0x00007fce4400a000 nid=0x2f89 runnable [0x00007fce4d709000]
java.lang.Thread.State: RUNNABLE
at java.io.FileInputStream.readBytes(Native Method)
at java.io.FileInputStream.read(FileInputStream.java:272)
at sun.security.provider.SeedGenerator$URLSeedGenerator.getSeedBytes(SeedGenerator.java:551)
at sun.security.provider.SeedGenerator.generateSeed(SeedGenerator.java:139)
at sun.security.provider.SecureRandom$SeederHolder.<clinit>(SecureRandom.java:197)
at sun.security.provider.SecureRandom.engineNextBytes(SecureRandom.java:214)
- locked <0x00000000c34ba1e8> (a sun.security.provider.SecureRandom)
at java.security.SecureRandom.nextBytes(SecureRandom.java:466)
- locked <0x00000000c34ba190> (a java.security.SecureRandom)
at org.jruby.ext.securerandom.SecureRandomLibrary.nextBytes(SecureRandomLibrary.java:49)
at org.jruby.ext.securerandom.SecureRandomLibrary.nextBytes(SecureRandomLibrary.java:42)
at org.jruby.ext.securerandom.SecureRandomLibrary.random_bytes(SecureRandomLibrary.java:21)
at org.jruby.ext.securerandom.SecureRandomLibrary$INVOKER$s$random_bytes.call(SecureRandomLibrary$INVOKER$s$random_bytes.gen)
可以通过将-Djava.security.egd=file:/dev/./urandom
添加到/opt/puppetlabs/server/apps/puppetserver/cli/apps/gem
来修复此问题。
<强>更新强>
更好的解决方案是安装另一个工具,如havaged
,以补救低熵条件。可以在此处找到Puppet模块:https://forge.puppetlabs.com/stm/haveged