0

I have downloaded Spring Social Showcase from git hub and have no problem running it on my localhost. When I try to run it on Heroku I get an application error. Checking the logs I see a

Error H14 - No web processes running

The heroku documentation states:

This is most likely the result of scaling your web processes down to zero through the client.

$ heroku ps:scale web=0

Use the heroku ps command to determine the state of your web processes.

When I run the heroku ps commnad nothing is returned. I then attempted to set the web=1 with the following command:

$ heroku ps:scale web=1

This returns the following:

Scaling web processes... failed
 !    Record not found

I have two questions at this point:

  1. Has anyone been able to get the Spring Social Showcase to run on Heroku?
  2. Does anyone know what might be causing my application to fail on Heroku while running without problems locally?
Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
John Borys
  • 93
  • 1
  • 4
  • 1
    Do you have a `Procfile` that tells Heroku what to run for the `web` process? – James Ward Oct 11 '12 at 17:02
  • No. I will bet that's the problem! Thanks James. I am looking forward to your workshop next week in Chicago! – John Borys Oct 12 '12 at 15:04
  • It may be the problem, but I am no longer sure. I have added a Procfile with the following line copied from another java app project that is working on Heroku: 'web: java $JAVA_OPTS -Dspring.profiles.active=prod -jar target/dependency/webapp-runner.jar --port $PORT target/*.war' But I get the same error stated above. – John Borys Oct 12 '12 at 15:20
  • I know the Procfile is there based on the following out put from the git push heroku master command. But the error is still occurring. -----> Discovering process types Procfile declares types -> web -----> Compiled slug size: 60.7MB -----> Launching... done, v9 http://afternoon-river-3881.herokuapp.com deployed to Heroku – John Borys Oct 12 '12 at 15:26
  • When you do git based deployment on Heroku, you need to have some way to bring your own container with you. Is that (webapp-runner or similar) setup in the build? – James Ward Oct 12 '12 at 22:32
  • I don't think so. The instructions say to import and deploy to a Servlet 2.5 container such as Tomcat 6. Nothing more. – John Borys Oct 13 '12 at 23:32
  • I checked the pom file and there is a webapp-runner configured. com.github.jsimone webapp-runner 7.0.30.1 webapp-runner.jar – John Borys Oct 14 '12 at 01:13
  • That's good. What does your `Procfile` look like? Is it checked into the git repo? Does it have an uppercase `P`? – James Ward Oct 14 '12 at 23:19
  • Yes it does. The application is running on Heroku now. The in memory database is not working however. I posted another question regarding that. Thank you! – John Borys Oct 15 '12 at 13:04

1 Answers1

0

This is working now on Heroku. After adding the Procfile, checking the pom.xml for the web app runner plugin and commenting out the tomcat-maven-plugin, I ran

mvn clean package

and deployed to Heroku once again. I received the no processes running error again. This time when I ran

$ heroku ps:scale web=1

it did not fail but started the web process. I then executed

heroku open

and the application launched successfully.

This is the plugin I commented out:

<!--
    <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>tomcat-maven-plugin</artifactId>
        <version>1.0-beta-1</version>
    </plugin>
-->

This is the plugin I added:

<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>7.0.30.1</version>
                                    <destFileName>webapp-runner.jar</destFileName>
                                </artifactItem>
                            </artifactItems>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
John Borys
  • 93
  • 1
  • 4