Announcement Announcement Module
Collapse
No announcement yet.
Deploying SDN Web App on Heroku Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Deploying SDN Web App on Heroku

    I keep trying to follow the directions in the docs and blog post but keep coming across many issues. I am starting from scratch tomorrow night.

    But is there an updated version of installing a SDN app in Heroku. Is there a way to use a .war file and Tomcat instead of embedded Jetty with a Main class. That area seems to have the most problems for me. Well that and somehow it added all my target, jar files, and IDEA project files into my git repo.

    Thanks

    Mark

  • #2
    Mark,

    what docs / blog post are you following?
    http://www.jamesward.com/2012/05/14/...eo4j-on-heroku
    http://static.springsource.org/sprin...ference:heroku

    And what exact issues do you run into?

    You should add a .gitignore file in the beginning, which filters out your target dir and the idea files.

    I haven't played with a war deployment on heroku, just the embedded jetty.
    You might look into the first sample app on: http://java.heroku.com/ (or this: http://www.jamesward.com/2012/02/15/...s-a-dependency)

    Comment


    • #3
      I was following http://static.springsource.org/sprin…ference:heroku.

      I have a .gitignore at the root of the directories for my project with

      Code:
      :::term
      target
      And in IDEA, I use their git ignore button and added lots of others, but that didn't work for git. But that is a git question. I am really more concerned about my app running "on my machine" build and app, but not on Heroku.

      Update: Well, now it looks like it is deployed but not working, now I just get heroku's generic error page,

      Code:
      Application Error
      An error occurred in the application and your page could not be served. Please try again in a few moments.
      
      If you are the application owner, check your logs for details.
      But in my console there isn't any errors, like I got before.

      Code:
      -----> Discovering process types
             Procfile declares types -> (none)
      -----> Compiled slug size is 38.1MB
      -----> Launching... done, v5
             http://eventgate.herokuapp.com deployed to Heroku
      and running heroku logs shows

      Code:
      2012-07-31T14:29:33+00:00 heroku[web.1]: State changed from starting to down
      2012-07-31T14:29:33+00:00 heroku[slugc]: Slug compilation finished
      2012-07-31T14:31:22+00:00 heroku[router]: Error H14 (No web processes running) -> GET eventgate.herokuapp.com/ dyno= queue= wait= service= status=503 bytes=
      So I guess something failed, but you can't see anywhere where that might be.

      Thanks

      Mark

      Comment


      • #4
        Mark,

        what does your procfile look like? Did you go with the standalone jetty container?

        Can you share your project? Or make me a contributor on your heroku app? (heroku at jexp.de)

        Cheers

        Michael

        Comment


        • #5
          Thanks. You are now a "contributor" to my heroku app.

          Yes, using that blog post, it had me create a Main class with Jetty starting up code.

          I also thought maybe it was my DispatcherServlet mapping. I changed it from "eventgate/*" to just "*", but also realized I did it in one place, whereas I have Spring Security and other filters that I needed to change the mapping. And I just tried with "/*". I always tend to get mapping urls wrong in web.xml

          Thanks

          Mark

          Comment


          • #6
            Mark,

            I added the Procfile and fixed the pom for the tomcat plugin (didn't compile for me otherwise).

            Looks much better now, the only thing that breaks is that your ActiveMQMessage broker starts a managementContext with JMX enabled so that it listens on port 1099 on the public interface which Heroku doesn't like (only the PORT env-variable might be listened on). I have no clue about AMQP configuration regarding this stuff. There are lots of entries in the spring forums and elsewhere. You can probably figure that out in seconds.

            Please pull the update from heroku (git pull heroku master) or git pull origin master depending on your setup.

            And the either disable JMX or make it listen only on localhost.

            Something around this (but with useJMX false)
            http://activemq.2283324.n4.nabble.co...td3853722.html

            Cheers

            Michael

            Comment


            • #7
              Thanks Micheal, got the pull.

              I can actually comment out the jms, Spring Integration stuff for now. I am not using it. It was mostly to show off in the Enterprise Integration with Spring class to the students about how easy it is to add it to an already existing application. Same with the Spring Batch stuff.

              Mark

              Comment


              • #8
                Speaking of showing off.

                You would like this.

                This past week I have installed Neo4J, Redis, Cassandra, MongoDB, Postgres, RabbitMQ, tc Server, Git server on 8 different vmware vms. Ready to kick some NoSQL arse. Was going to install Hadoop too, but what a crazy installation that has to be, and not one site has it correct for a simple solution, even HortonWorks single app is a pain. Might have to do that one manually the long way. (We might not need all these NoSQL, but as we define our data and where each piece of it will be stored will tell us which we keep)

                Mark

                Comment


                • #9
                  Cool, then please do so and re-push the app, so that we can see it running

                  Comment


                  • #10
                    Neat, looking forward to your feedback of this big polyglot persistence solution.

                    Comment


                    • #11
                      I have to wait till after work to make the jms changes. In a few hours.

                      Thanks

                      Mark

                      Comment


                      • #12
                        done

                        http://eventgate.herokuapp.com

                        Cheers

                        Michael

                        Comment


                        • #13
                          Thanks Michael. Now have to figure out why my jsp includes are failing. Which is why the real look and feel and working javascript is missing.

                          Mark

                          Comment


                          • #14
                            Do you remember the changes that you made to my pom and any other file? I can't get my app to work anymore, even locally. It just won't do any jsp rendering anymore, no el evaluation, no includes working and I can't seem to figure it out and git history isn't showing me your changes.

                            Thanks

                            Mark

                            Comment


                            • #15
                              I send you a file.

                              Comment

                              Working...
                              X