输出端口"tcp_inet"上的值错误 [英] Bad value on output port 'tcp_inet'

查看:101
本文介绍了输出端口"tcp_inet"上的值错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Phoenix框架,该框架在下面运行Cowboy.我偶尔会在日志中看到以下一对错误:

I'm using the Phoenix framework, which is running Cowboy underneath. I am occasionally seeing the following pair of errors in my log:

Bad value on output port 'tcp_inet'

GenServer #PID<0.8423.1> terminating
** (FunctionClauseError) no function clause matching in :http_transport.close/2
(inets) http_transport.erl:346: :http_transport.close(:undefined, #Port<0.18079778>)
(stdlib) gen_server.erl:643: :gen_server.try_terminate/3
(stdlib) gen_server.erl:809: :gen_server.terminate/7
(stdlib) proc_lib.erl:240: :proc_lib.init_p_do_apply/3  

我能想到的所有搜索都指向将元组发送到gen_tcp:send()的东西.但是,当您在Phoenix级别上进行写作时,这在各个层次上都是很容易的.

All the searching I could think of points to something sending a tuple to gen_tcp:send(). But that is way down under layers of stuff when you're writing at the level of Phoenix.

服务器似乎一直在滚动,因此我对此不感到惊慌,但我想深入研究它以阻止这些错误.有人知道会导致什么吗?

The server seems to keep rolling so I'm not panicking over this, but I'd like to get to the bottom of it to stop these errors. Anyone know what would be causing this?

推荐答案

我正在接收

输出端口'tcp_inet'上的值不正确

Bad value on output port 'tcp_inet'

在我部署到heroku的phoenix api中.就我而言,我正在使用原子设置响应头.一旦我将原子更改为二进制文件,一切都会再次正常运行.

In my phoenix api that I had deployed to heroku. In my case, I was setting response headers with an atom. Once I changed the atom to a binary everything started working fine again.

最可能的是,这可能与正在修改标头的插件有关.

Most likely, this may have something to do with a Plug that is modifying your headers.

这篇关于输出端口"tcp_inet"上的值错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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