Heroku / Clojure部署中的端口错误 [英] Port Error on Heroku / Clojure Deployment

查看:164
本文介绍了Heroku / Clojure部署中的端口错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是针对我的 Heroku / Clojure问题的问题



但是当我尝试访问我的应用程序的URL时,我得到了下面的错误。这是一个奇怪的端口错误,但我不认为我在Heroku部署Clojure应用程序时,我可以控制这些细节。我认为我的设置很简单。有没有什么可以解决这个错误?



Procfile

 

web:lein run -m http.handler

http。

 

...
(def app(handler / site main))



错误

 

2011-12-31T04:10:02 + 00:00应用程式[web.1]:在地址:41208
聆听交通工具dt_socket 2011-12-31T04:10:03+ 00:00 heroku [web.1]:使用SIGKILL停止进程2011-12-31T04:10:03 + 00:00 heroku [web.1]:错误R11(Bad bind) - >进程绑定到端口41208,应该55032(参见环境变量PORT)
2011-12-31T04:10:04 + 00:00 heroku [web.1]:状态从开始变为崩溃
2011-12-31T04:10:05 +00:00 heroku [web.1]:过程退出
2011-12-31T04:20:08 + 00:00 heroku [web.1]:状态从崩溃变为2011-12-31T04:20 :08 + 00:00 heroku [web.1]:状态已从创建更改为开始2011-12-31T04:20:12 + 00:00 heroku [web.1]:使用命令`lein run -m http启动过程处理程序
2011-12-31T04:20:16 + 00:00应用程序[web.1]:在地址:49151 2011-12-31T04:20:16 + 00:00监听运输dt_socket .1]:错误R11(Bad bind) - >进程绑定到端口49151,应该是39092(参见环境变量PORT)
2011-12-31T04:20:16 + 00:00 heroku [web.1] :使用SIGKILL停止进程
2011-12-31T04:20:17 + 00:00 heroku [web.1]:状态从开始变为崩溃
2011-12-31T04:20:18 + 00 :00 heroku [web.1]:过程退出
2011-12-31T04:31:13 + 00:00 heroku [web.1]:状态从崩溃变为已创建
2011-12-31T04 :31:13 + 00:00 heroku [web.1]:状态从创建变为开始
2011-12-31T04:31:16 + 00:00 heroku [web.1] lein run -m http.handler`
2011-12-31T04:31:20 + 00:00 app [web.1]:在地址:44321
上听运输dt_socket 2011-12-31T04: 31:20 + 00:00 heroku [web.1]:错误R11(错误绑定) - >进程绑定到端口44321,应为17211(请参阅环境变量PORT)
2011-12-31T04:31:20 +00:00 heroku [web.1]:停止过程与SIGKILL
2011-12-31T04:31:22 + 00:00 heroku [web.1]:状态从开始变为崩溃
2011 -12-31T04:31:22 + 00:00 heroku [web.1]:过程退出
2011-12-31T04:44:59 + 00:00 heroku [web.1]:状态从崩溃变为created
2011-12-31T04:44:59 + 00:00 heroku [web.1]:状态已从创建更改为开始
2011-12-31T04:45:02 + 00:00 heroku [ web.1]:使用命令启动过程`lein run -m http.handler`
2011-12-31T04:45:05 + 00:00 app [web.1]:在地址:37500处侦听传输dt_socket
2011-12-31T04:45:06 + 00:00 heroku [web.1]:错误R11(错误绑定) - >进程绑定到端口37500,应为14046(请参阅环境变量PORT)
2011-12-31T04:45:06 + 00:00 heroku [web.1]:停止过程与SIGKILL
2011-12-31T04:45:07 + 00:00 heroku [web.1]:状态从开始到崩溃
2011-12-31T04:45:07 + 00:00 heroku [web.1]:退出程序
2011-12-31T04:49:22 + 00:00 heroku [路由器]:错误H10(应用程序崩溃) - > GET bkeeping.herokuapp.com/ dyno =队列=等待=服务=状态= 503字节=
2011-12-31T04:49:31 + 00:00 heroku [路由器]:错误H10(应用程式崩溃) - > GET bkeeping.herokuapp.com/favicon.ico dyno = queue = wait = service = status = 503 bytes =

似乎有一个 Nodejs的类似问题。但是,我不认为我有一个Compojure / Ring / Jetty部署中的端口分配控制。我错了吗?



感谢

解决方案

有一些非常好的提示,我不能够终于过去了。原来我的project.clj有一个defproject包括这个JDPA配置:

 

:jvm-opts [-agentlib :jdwp = transport = dt_socket,server = y,suspend = n]



我应该早些时候注意到了。但它只是在本地工作,所以我没有想到质疑它。希望这有助于其他人有同样的路障。


This is a follow on question to my Heroku / Clojure problem here. As outlined in that thread, I was able to push my app to Heroku's master, and that deploys it.

But when I try to go to my app's URL, I get the below error. It's a bizarre port error, but I didn't think I had control over those details when deploying a Clojure app on Heroku. I think my setup's pretty straightforward. Is there anything I can do to address this error?

Procfile


    web: lein run -m http.handler

http.handler


    ...
    (def app      (handler/site main))

Error


    2011-12-31T04:10:02+00:00 app[web.1]: Listening for transport dt_socket at address: 41208
    2011-12-31T04:10:03+00:00 heroku[web.1]: Stopping process with SIGKILL    2011-12-31T04:10:03+00:00 heroku[web.1]: Error R11 (Bad bind) -> Process bound to port 41208, should be 55032 (see environment variable PORT)
    2011-12-31T04:10:04+00:00 heroku[web.1]: State changed from starting to crashed
    2011-12-31T04:10:05+00:00 heroku[web.1]: Process exited
    2011-12-31T04:20:08+00:00 heroku[web.1]: State changed from crashed to created    2011-12-31T04:20:08+00:00 heroku[web.1]: State changed from created to starting    2011-12-31T04:20:12+00:00 heroku[web.1]: Starting process with command `lein run -m http.handler`
    2011-12-31T04:20:16+00:00 app[web.1]: Listening for transport dt_socket at address: 49151    2011-12-31T04:20:16+00:00 heroku[web.1]: Error R11 (Bad bind) -> Process bound to port 49151, should be 39092 (see environment variable PORT)
    2011-12-31T04:20:16+00:00 heroku[web.1]: Stopping process with SIGKILL
    2011-12-31T04:20:17+00:00 heroku[web.1]: State changed from starting to crashed
    2011-12-31T04:20:18+00:00 heroku[web.1]: Process exited
    2011-12-31T04:31:13+00:00 heroku[web.1]: State changed from crashed to created
    2011-12-31T04:31:13+00:00 heroku[web.1]: State changed from created to starting
    2011-12-31T04:31:16+00:00 heroku[web.1]: Starting process with command `lein run -m http.handler`
    2011-12-31T04:31:20+00:00 app[web.1]: Listening for transport dt_socket at address: 44321
    2011-12-31T04:31:20+00:00 heroku[web.1]: Error R11 (Bad bind) -> Process bound to port 44321, should be 17211 (see environment variable PORT)
    2011-12-31T04:31:20+00:00 heroku[web.1]: Stopping process with SIGKILL
    2011-12-31T04:31:22+00:00 heroku[web.1]: State changed from starting to crashed
    2011-12-31T04:31:22+00:00 heroku[web.1]: Process exited
    2011-12-31T04:44:59+00:00 heroku[web.1]: State changed from crashed to created
    2011-12-31T04:44:59+00:00 heroku[web.1]: State changed from created to starting
    2011-12-31T04:45:02+00:00 heroku[web.1]: Starting process with command `lein run -m http.handler`
    2011-12-31T04:45:05+00:00 app[web.1]: Listening for transport dt_socket at address: 37500
    2011-12-31T04:45:06+00:00 heroku[web.1]: Error R11 (Bad bind) -> Process bound to port 37500, should be 14046 (see environment variable PORT)
    2011-12-31T04:45:06+00:00 heroku[web.1]: Stopping process with SIGKILL
    2011-12-31T04:45:07+00:00 heroku[web.1]: State changed from starting to crashed
    2011-12-31T04:45:07+00:00 heroku[web.1]: Process exited
    2011-12-31T04:49:22+00:00 heroku[router]: Error H10 (App crashed) -> GET bkeeping.herokuapp.com/ dyno= queue= wait= service= status=503 bytes=
    2011-12-31T04:49:31+00:00 heroku[router]: Error H10 (App crashed) -> GET bkeeping.herokuapp.com/favicon.ico dyno= queue= wait= service= status=503 bytes=

There seems to be a similar problem with Nodejs. But again, I don't think I have control of port assignments in a Compojure / Ring / Jetty deployment. Am I wrong? Would the behaviour change with Webnoir?

Thanks

解决方案

Although I got some really good hints, I wasn able to finally get past this. It turns out my project.clj had a defproject that included this JDPA config:


    :jvm-opts ["-agentlib:jdwp=transport=dt_socket,server=y,suspend=n"]

I should have noticed it earlier. But it just works locally, so I didn't think to question it. Hope this helps others who are having the same roadblock.

这篇关于Heroku / Clojure部署中的端口错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆