Giter VIP home page Giter VIP logo

Comments (7)

jacobobryant avatar jacobobryant commented on July 23, 2024

Interesting--I just tried creating a new project on my own machine and it works there, so there must be some environmental difference. If you run sudo netstat -nlp | grep 8080 before running bb dev, does that return anything?

from biff.

edenworky avatar edenworky commented on July 23, 2024

from biff.

jacobobryant avatar jacobobryant commented on July 23, 2024

hmmmm
quite befuddling. can you try running something else on port 8080 and see if it works? like nc -l -p 8080 I think (not at my computer to verify that's the right command), and then try a curl http://localhost:8080 just to be sure it's working.

from biff.

jacobobryant avatar jacobobryant commented on July 23, 2024

if that works, the next step I suppose would be to comment out the use-jetty line in your app's main namespace, then run bb dev, then while it's running try the netstat again.

What operating system are you on by the way?

from biff.

edenworky avatar edenworky commented on July 23, 2024

I can host lots of stuff on :8080, not sure if I understood your meaning. I can run nc like you said and see an incoming request, works as expected to my understanding.

I use Pop!_OS Linux pop-os 6.5.6-76060506-generic #202310061235~1697396945~22.04~9283e32 SMP PREEMPT_DYNAMIC Sun O x86_64 x86_64 x86_64 GNU/Linux. It's usually equivalent to Ubuntu.

When I comment out use-jetty, bb dev finishes booting up and says it's listening on :8080 (which doesn't show up in netstat) and the REPL is on :7888 (which does show up in netstat).

from biff.

jacobobryant avatar jacobobryant commented on July 23, 2024

I can host lots of stuff on :8080, not sure if I understood your meaning.

OK, good--just wanted to run an additional check that there wasn't something else running on 8080.

I still have no clue how Biff could be triggering this error, but we can just keep trying to narrow it down. Let's try from two directions:

First, can you run the following from your Biff project directory without getting errors?

$ clj
Clojure 1.11.1
user=> (require '[ring.adapter.jetty9 :as jetty])
nil
user=> (jetty/run-jetty (constantly {:status 200, :body "hello"}) {:host "0.0.0.0", :port 8080})
[main] INFO org.eclipse.jetty.server.Server - jetty-10.0.7; built: 2021-10-06T19:34:02.766Z; git: da8a4553af9dd84080931fa0f8c678cd2d60f3d9; jvm 17.0.9+9-Ubuntu-120.04
[main] INFO org.eclipse.jetty.server.handler.ContextHandler - Started o.e.j.s.ServletContextHandler@5b4d25e7{/,null,AVAILABLE}
[main] INFO org.eclipse.jetty.server.AbstractConnector - Started ServerConnector@38704ff0{HTTP/1.1, (http/1.1)}{0.0.0.0:8080}
[main] INFO org.eclipse.jetty.server.Server - Started Server@267517e4{STARTING}[10.0.7,sto=0] @3472ms

# in another terminal:
$ curl http://localhost:8080
hello

That's ultimately what the use-jetty component runs.

Second, if you uncomment the use-jetty component but comment out the use-xt, use-queues, and use-tx-listener components, and then you run bb dev, does the error still happen? If yes, then what if instead of bb dev you run source secrets.env; BIFF_ENV=dev clj -M -m com.example (replacing com.example with whatever you chose for your project's main namespace--though from the stacktrace earlier it looks like you left it as com.example)?

from biff.

jacobobryant avatar jacobobryant commented on July 23, 2024

I'll go ahead and close this, but happy to reopen if you want to continue debugging this together.

from biff.

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.