Heroku 上的 Tika 服务器 [英] Tika Server on Heroku

查看:28
本文介绍了Heroku 上的 Tika 服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试在 heroku 上运行 Tika 服务器.Tika 构建和启动没有任何问题.但是 90 秒后 Heroku 终止了我的进程.

I tried to run Tika server on heroku. Tika builds and starts without a single problem. But after 90 seconds Heroku kills my process.

这是在我的 Procfile 中:

This is in my Procfile:

web: java $JAVA_OPTS -jar tika-server/target/tika-server-1.13-SNAPSHOT.jar --port=$PORT

这是我得到的错误:

2016-04-19T10:10:36.582046+00:00 heroku[web.1]: Starting process with command `java $JAVA_OPTS -jar tika-server/target/tika-server-1.13-SNAPSHOT.jar --port=56206`
2016-04-19T10:10:38.271693+00:00 app[web.1]: Picked up JAVA_TOOL_OPTIONS: -Xmx350m -Xss512k -Dfile.encoding=UTF-8
2016-04-19T10:10:38.268608+00:00 app[web.1]: Setting JAVA_TOOL_OPTIONS defaults based on dyno size. Custom settings will override them.
2016-04-19T10:10:38.767221+00:00 app[web.1]: Apr 19, 2016 10:10:38 AM org.apache.tika.server.TikaServerCli main
2016-04-19T10:10:38.767231+00:00 app[web.1]: INFO: Starting Apache Tika 1.13-SNAPSHOT server
2016-04-19T10:10:39.104022+00:00 app[web.1]: Apr 19, 2016 10:10:39 AM org.apache.cxf.endpoint.ServerImpl initDestination
2016-04-19T10:10:39.104032+00:00 app[web.1]: INFO: Setting the server's publish address to be http://localhost:56206/
2016-04-19T10:10:39.163016+00:00 app[web.1]: Apr 19, 2016 10:10:39 AM org.slf4j.impl.JCLLoggerAdapter info
2016-04-19T10:10:39.163027+00:00 app[web.1]: INFO: jetty-8.y.z-SNAPSHOT
2016-04-19T10:10:39.193522+00:00 app[web.1]: Apr 19, 2016 10:10:39 AM org.slf4j.impl.JCLLoggerAdapter info
2016-04-19T10:10:39.193538+00:00 app[web.1]: INFO: Started SelectChannelConnector@localhost:56206
2016-04-19T10:10:39.207702+00:00 app[web.1]: Apr 19, 2016 10:10:39 AM org.apache.tika.server.TikaServerCli main
2016-04-19T10:10:39.207711+00:00 app[web.1]: INFO: Started
2016-04-19T10:12:06.672493+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 90 seconds of launch
2016-04-19T10:12:06.672493+00:00 heroku[web.1]: Stopping process with SIGKILL
2016-04-19T10:12:07.484941+00:00 heroku[web.1]: Process exited with status 137
2016-04-19T10:12:07.500331+00:00 heroku[web.1]: State changed from starting to crashed
2016-04-19T10:12:07.501167+00:00 heroku[web.1]: State changed from crashed to starting

有什么想法吗?

推荐答案

我自己找到了解决方案.您只需将 --host 标志设置为0.0.0.0".否则该服务不向公众开放,因此不被 Heroku 认可.

I found the solution by myself. You simply have to set the --host flag to "0.0.0.0". Otherwise the service is not open to the public and so not recognized by Heroku.

新的 Procfile:

The new Procfile:

web: java $JAVA_OPTS -jar tika-server/target/tika-server-1.13-SNAPSHOT.jar --host=0.0.0.0 --port=$PORT

这篇关于Heroku 上的 Tika 服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆