Skip to content

Instantly share code, notes, and snippets.

@malash
Last active May 15, 2017 03:59
Show Gist options
  • Save malash/b43eadf1d937f6bf14482587edefc7f4 to your computer and use it in GitHub Desktop.
Save malash/b43eadf1d937f6bf14482587edefc7f4 to your computer and use it in GitHub Desktop.
Bugs on Bash on Ubuntu on Windows

NginX

NginX pwritev

NginX错误日志:

pwritev() "/var/lib/nginx/proxy/6/00/0000000006" failed (38: Function not implemented) while reading upstream

原因:pwritev找不到,导致nginx的proxy失效

解决办法:修改nginx源代码auto/unix文件

# pwritev() was introduced in FreeBSD 6 and Linux 2.6.30, glibc 2.10

ngx_feature="pwritev()"
ngx_feature_name="NGX_HAVE_PWRITEV"
ngx_feature_run=no
ngx_feature_incs='#include <sys/uio.h>'
ngx_feature_path=
ngx_feature_libs=
ngx_feature_test="char buf[1]; struct iovec vec[1]; ssize_t n;
                  vec[0].iov_base = buf;
                  vec[0].iov_len = 1;
                  n = pwritev(1, vec, 1, 0);
                  if (n == -1) return 1"
. auto/feature

将最后一个if条件置反,重新编译安装

PHP

PHP输出到一半就停止了

表现:

curl phpinfo.php只输出一部分内容

原因:不清楚

解决办法:

/etc/nginx/fastcgi.conf中添加fastcgi_keep_conn on;

Apache

Apache启动报APR_TCP_DEFER_ACCEPT

表现:

[Mon May 15 11:36:58.125329 2017] [core:warn] [pid 4768:tid 140517981095808] (92)Protocol not available: AH00076: Failed to enable APR_TCP_DEFER_ACCEPT

解决办法:

修改/etc/apache2/apache2.conf,在最后添加:

AcceptFilter http none

SMB

SMB无法启动

表现:启动后无效

原因:可见该issue

解决办法:暂时使用WebDAV代替。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment