部署在heroku上的Java应用程序

问题描述:

我觉得我的Procfile有麻烦。我不能老是部署我在Heroku上的应用程序,始终在日志中获得此:部署在heroku上的Java应用程序

2016-03-25T12:46:43.601893+00:00 heroku[web.1]: Starting process with command java $JAVA_OPTS -jar target/dependency/webapp-runner.jar --port 45751 target/*.war 2016-03-25T12:46:46.615217+00:00 app[web.1]: Setting JAVA_TOOL_OPTIONS defaults based on dyno size. Custom settings will override them. 2016-03-25T12:46:46.617375+00:00 app[web.1]: Error: Unable to access jarfile target/dependency/webapp-runner.jar 2016-03-25T12:46:47.819108+00:00 heroku[web.1]: Process exited with status 1 2016-03-25T12:46:47.877603+00:00 heroku[web.1]: State changed from starting to crashed

这是我Procfile: 网站:JAVA $ JAVA_OPTS罐子目标/依赖/ webapp的-runner.jar --port $ PORT目标/ *。战争

这是我的项目上gitHub

我没有看到的webapp-runner.jar在你的POM。

Heroku似乎也无法找到这种依赖关系。

<!-- https://devcenter.heroku.com/articles/java-webapp-runner --> 
<plugin> 
     <groupId>org.apache.maven.plugins</groupId> 
     <artifactId>maven-dependency-plugin</artifactId> 
     <version>2.3</version> 
     <executions> 
      <execution> 
       <phase>package</phase> 
       <goals> 
        <goal>copy</goal> 
       </goals> 
       <configuration> 
        <artifactItems> 
         <artifactItem> 
          <groupId>com.github.jsimone</groupId> 
          <artifactId>webapp-runner</artifactId> 
          <version>8.0.24.0</version> 
          <destFileName>webapp-runner.jar</destFileName> 
         </artifactItem> 
        </artifactItems> 
       </configuration> 
      </execution> 
     </executions> 
    </plugin> 
+0

现在我收到此 > 2016-03-28T10:57:57.397887 + 00:00的Heroku [路由器]:在=错误代码= H12 DESC = “请求超时” 方法= GET路径=“/目录/获取“host = murmuring-shore.herokuapp.com request_id = 0a40ddbd-1f49-4b72-a287-22d5a6364540 fwd =”myIP“dyno = web.1 connect = 1ms service = 30000ms status = 503 bytes = 0 – BigBadDev

+0

An [H12错误](https://devcenter.heroku.com/articles/error-codes#h12-request-timeout)表示请求在30秒后超时。这听起来像应用程序正在运行,但其他的是错误的。 – codefinger