Giter VIP home page Giter VIP logo

Comments (8)

ccfontes avatar ccfontes commented on June 1, 2024

I'm struggling with dependencies in production on heroku:

2013-06-19T18:44:47.583418+00:00 app[web.1]: Performing task 'trampoline' with profile(s): 'offline,production'
2013-06-19T18:44:47.727212+00:00 app[web.1]: This could be due to a typo in :dependencies or network issues.
2013-06-19T18:44:47.726982+00:00 app[web.1]: The repository system is offline but the artifact lein-ring:lein-ring:jar:0.8.5 is not available in the local repository.
2013-06-19T18:44:47.718520+00:00 app[web.1]: The repository system is offline but the artifact ccfontes:lein-cljsbuild:jar:0.3.2-no-exit is not available in the local repository.
2013-06-19T18:44:47.727736+00:00 app[web.1]: Error encountered performing task 'trampoline' with profile(s): 'offline,production'
2013-06-19T18:44:47.732194+00:00 app[web.1]: Could not resolve dependencies

:production profile:

:production {:app-specific "config"
                :mirrors {#"central|clojars"
                            "http://s3pository.herokuapp.com/clojure"}}

Tried a number of combinations, but without much success. Those two artifacts are very recent, and one of them is critical. Is it possible the mirror repo isn't updated recently, and if so, is it possible to update it soon?

from heroku-buildpack-clojure.

technomancy avatar technomancy commented on June 1, 2024

Sorry you're having trouble here. Using this mirror for Clojars turned out to not be a great idea, and the buildpack was updated, but the docs were not, so thanks for catching this. I'll update the devcenter.

If the mirror is giving you trouble you can remove it from the production profile altogether to debug too.

from heroku-buildpack-clojure.

ccfontes avatar ccfontes commented on June 1, 2024

I removed the mirror altogether for debugging purposes. Profile is like this:

:production {:app-specific "config"}

Now I have alot of artifacts missing. I guess the previously configured mirror was providing some artifacts.

2013-06-20T10:20:52.848553+00:00 app[web.1]: The repository system is offline but the artifact ring-server:ring-server:jar:0.2.8 is not available in the local repository.
2013-06-20T10:20:52.848553+00:00 app[web.1]: The repository system is offline but the artifact com.fasterxml.jackson.core:jackson-core:jar:2.2.1 is not available in the local repository.
2013-06-20T10:20:52.848553+00:00 app[web.1]: The repository system is offline but the artifact cheshire:cheshire:jar:5.2.0 is not available in the local repository.
2013-06-20T10:20:52.856059+00:00 app[web.1]: The repository system is offline but the artifact com.fasterxml.jackson.dataformat:jackson-dataformat-smile:jar:2.2.1 is not available in the local repository.
2013-06-20T10:20:52.856059+00:00 app[web.1]: The repository system is offline but the artifact tigris:tigris:jar:0.1.1 is not available in the local repository.
2013-06-20T10:20:52.887918+00:00 app[web.1]: The repository system is offline but the artifact org.clojure:tools.namespace:jar:0.1.3 is not available in the local repository.
2013-06-20T10:20:52.888618+00:00 app[web.1]: The repository system is offline but the artifact org.clojure:tools.logging:jar:0.2.4 is not available in the local repository.
2013-06-20T10:20:52.888418+00:00 app[web.1]: The repository system is offline but the artifact clout:clout:jar:1.1.0 is not available in the local repository.
2013-06-20T10:20:52.888740+00:00 app[web.1]: The repository system is offline but the artifact log4j:log4j:jar:1.2.17 is not available in the local repository.
2013-06-20T10:20:52.888885+00:00 app[web.1]: This could be due to a typo in :dependencies or network issues.
2013-06-20T10:20:52.889497+00:00 app[web.1]: Error encountered performing task 'trampoline' with profile(s): 'offline,production'
2013-06-20T10:20:52.889593+00:00 app[web.1]: Could not resolve dependencies

Some suggestions:

  • If the problem is about the mirror not being up to date, Isn't it possible to update the mirror more often? Most people have a staging environment anyway, so even if an error occur at that point, it's doable to wait some minutes or even a couple of hours so the mirror syncs with a main repo.
  • falling back to "online" when an artifact is not found, and hope that it doesn't trigger the boot timeout (at the same time syncing that artifact to the mirror).
  • falling back to "online" when an artifact is not found, and for each artifact that is fetched online, do not count that time for the boot timeout. (maybe this policy override is not possible from the buildback).

Finally, if the mirror is not a choice anymore, which is or will be to prevent the dreaded boot timeout error?

from heroku-buildpack-clojure.

technomancy avatar technomancy commented on June 1, 2024

Finally, if the mirror is not a choice anymore, which is or will be to prevent the dreaded boot timeout error?

If dependency resolution is happening at app boot time, that's a problem. Dependencies should be resolved only during build time.

I've just pushed a change that disables the offline behaviour in the production profile. I've been making some changes on the uberjar branch; I'm thinking in the future I'll start recommending using Leiningen only during deployment and putting direct java invocations in the Procfile. If you want to try out the uberjar branch you can do so by setting BUILDPACK_URL=git://github.com/heroku/heroku-buildpack-clojure.git#uberjar and changing your Procfile entry as the readme describes there. It's much easier to avoid this kind of issue if you use Leiningen only for deploying and not at runtime. I'd be interested in any feedback you have on that if you try it.

from heroku-buildpack-clojure.

technomancy avatar technomancy commented on June 1, 2024

If that doesn't take care of things feel free to email me with your app name and I can take a closer look.

from heroku-buildpack-clojure.

ccfontes avatar ccfontes commented on June 1, 2024

"...and changing your Procfile entry as the readme describes there..."
Procfile in the readme still uses offline behaviour.

Fails to find lein - bin/build: line 4: lein: command not found:

-----> Fetching custom git buildpack... done
-----> Clojure (Leiningen 2) app detected
-----> Installing OpenJDK 1.6...done
-----> Using cached Leiningen 2.2.0
       Writing: lein script
-----> Building with Leiningen
       Found bin/build; running it instead of default lein invocation.
       Running: bin/build
       -----> Generating uberjar with Leiningen:
              Running: lein uberjar
              bin/build: line 4: lein: command not found
        !     Failed to create uberjar with Leiningen
 !     Failed to build.

 !     Push rejected, failed to compile Clojure (Leiningen 2) app

I'm using PATH as you told me:

PATH=.lein/bin:/usr/local/bin:/usr/bin:/bin JAVA_OPTS="-Xmx500m -Duser.home=$BUILD_DIR" lein uberjar 2>&1 | sed -u 's/^/       /'

I also have enviroment PATH defined in heroku with the exact same value.

from heroku-buildpack-clojure.

technomancy avatar technomancy commented on June 1, 2024

I can't tell what's going on from your comment; if you email me your app name I can take a closer look.

from heroku-buildpack-clojure.

ccfontes avatar ccfontes commented on June 1, 2024

The push was rejected, so the above changes are not included. Hope this isn't a problem. Emailing.

from heroku-buildpack-clojure.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.