坚持创建新的 predictionio 应用程序

Get stuck on creating new predictionio app

我正在使用以下命令创建新的 predictionio 应用程序:

pio app new test5

然后卡在下面的日志中:

[INFO] [HBLEvents] The table pio_event:events_5 doesn't exist yet. Creating now...
[INFO] [App$] Initialized Event Store for this app ID: 5.
stuck here..

怎么算出来的?

我也遇到了这个问题

您可以使用 jstack -l <pid> 查看 pio 在做什么,就我而言

"main" #1 prio=5 os_prio=0 tid=0x00007fdf2c009800 nid=0xa53 runnable [0x00007fdf33340000]
   java.lang.Thread.State: RUNNABLE
    at java.io.FileInputStream.readBytes(Native Method)
    at java.io.FileInputStream.read(FileInputStream.java:255)
    at sun.security.provider.NativePRNG$RandomIO.readFully(NativePRNG.java:410)
    at sun.security.provider.NativePRNG$RandomIO.getMixRandom(NativePRNG.java:390)
    - locked <0x00000000d662b468> (a java.lang.Object)
    at sun.security.provider.NativePRNG$RandomIO.implNextBytes(NativePRNG.java:483)
    - locked <0x00000000d662b468> (a java.lang.Object)
    at sun.security.provider.NativePRNG$RandomIO.access0(NativePRNG.java:329)
    at sun.security.provider.NativePRNG$Blocking.engineNextBytes(NativePRNG.java:266)
    at java.security.SecureRandom.nextBytes(SecureRandom.java:468)
    - locked <0x00000000d6d0f700> (a java.security.SecureRandom)
    at io.prediction.data.storage.AccessKeys$class.generateKey(AccessKeys.scala:68)
    at io.prediction.data.storage.jdbc.JDBCAccessKeys.generateKey(JDBCAccessKeys.scala:27)
    at io.prediction.data.storage.jdbc.JDBCAccessKeys$$anonfun.apply(JDBCAccessKeys.scala:40)
    at io.prediction.data.storage.jdbc.JDBCAccessKeys$$anonfun.apply(JDBCAccessKeys.scala:39)
    at scalikejdbc.DBConnection$$anonfun.apply(DBConnection.scala:297)
    at scalikejdbc.DBConnection$class.scalikejdbc$DBConnection$$rollbackIfThrowable(DBConnection.scala:274)
    at scalikejdbc.DBConnection$class.localTx(DBConnection.scala:295)
    at scalikejdbc.DB.localTx(DB.scala:60)
    at scalikejdbc.DB$.localTx(DB.scala:257)
    at io.prediction.data.storage.jdbc.JDBCAccessKeys.insert(JDBCAccessKeys.scala:39)
    at io.prediction.tools.console.App$$anonfun$create$$anonfun$apply$mcI$sp.apply$mcII$sp(App.scala:57)
    at io.prediction.tools.console.App$$anonfun$create$$anonfun$apply$mcI$sp.apply(App.scala:52)
    at io.prediction.tools.console.App$$anonfun$create$$anonfun$apply$mcI$sp.apply(App.scala:52)
    at scala.Option.map(Option.scala:145)
    at io.prediction.tools.console.App$$anonfun$create.apply$mcI$sp(App.scala:52)
    at io.prediction.tools.console.App$$anonfun$create.apply(App.scala:39)
    at io.prediction.tools.console.App$$anonfun$create.apply(App.scala:39)
    at scala.Option.getOrElse(Option.scala:120)
    at io.prediction.tools.console.App$.create(App.scala:39)
    at io.prediction.tools.console.Console$$anonfun$main.apply(Console.scala:739)
    at io.prediction.tools.console.Console$$anonfun$main.apply(Console.scala:693)
    at scala.Option.map(Option.scala:145)
    at io.prediction.tools.console.Console$.main(Console.scala:693)
    at io.prediction.tools.console.Console.main(Console.scala)

所以我认为它在随机获取中挂起。

然后,我检查/proc/sys/kernel/random/entropy_avail,它很小。


我的解决方案是 flood ping sudo ping -f 10.10.255.1

根本原因是OS实现了访问密钥生成。

使用这个pio app new your_app_name --access-key your_key