AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-171050

SeinopSys's questions

Martin Hope
SeinopSys
Asked: 2017-08-24 01:37:57 +0800 CST

nginx 记录 php-fpm 的 stderr 输出在看似随机的位置被截断

  • 4

自从我开始使用产生长调用链的 PHP 库以来,调试由它引起的问题就变得越来越困难,因为我的错误日志最终包含如下输出:(某些值已使用 被清除*)

2017/08/23 10:47:26 [error] 13057#13057: *206119 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught ActiveRecord\DatabaseException: PDOException: SQLSTATE[22P02]: Invalid text representation: 7 ERROR:  invalid input syntax for integer: "" in /var/www/********/vendor/php-activerecord/php-activerecord/lib/Connection.php:337
Stack trace:
#0 /var/www/********/vendor/php-activerecord/php-activerecord/lib/Connection.php(337): PDOStatement->execute(Array)
#1 /var/www/********/vendor/php-activerecord/php-activerecord/lib/Table.php(237): ActiveRecord\Connection->query('SELECT * FROM "...', Array)
#2 /var/www/********/vendor/php-activerecord/php-activerecord/lib/Table.php(219): ActiveRecord\Table->find_by_sql('SELECT * FROM "...', Array, false, NULL)
#3 /var/www/********/vendor/php-activerecord/php-activerecord/lib/Model.php(1666): ActiveRecord\Table->find(Array)
#4 /var/www/********/vendor/php-activerecord/php-activerecord/lib/Model.php(1605): ActiveRecord\Model::find_by_pk('', Array)
#5 /var/www/********/includes/classes/Models/NSModel.php(11): ActiveRecord\Model::find(''" while reading response header from upstream, client: **.***.***.***, server: ***********, request: "POST /************************************ HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.1-fpm.sock:", host: "***********", referrer: "************************************************************"

注意在最后一行 FastCGI stderr 输出是如何在ActiveRecord\Model::find(''". 另一个例子:

2017/08/22 17:20:53 [error] 13057#13057: *193907 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught TypeError: Argument 1 passed to App\DeviantArt::isImageAvailable() must be of the type string, null given, called in /var/www/********/includes/classes/ImageProvider.php on line 138 and defined in /var/www/********/includes/classes/DeviantArt.php:357
Stack trace:
#0 /var/www/********/includes/classes/ImageProvider.php(138): App\DeviantArt::isImageAvailable(NULL)
#1 /var/www/********/includes/classes/ImageProvider.php(21): App\ImageProvider->setUrls('*******')
#2 /var/www/********/includes/classes/Posts.php(207): App\ImageProvider->__construct('******************', Array)
#3 /var/www/********/includes/classes/Controllers/PostController.php(334): App\Posts::checkRequestFinishingImage('***************...')
#4 /var/www/********/includes/classes/RouteHelper.php(11): App\Controllers\PostController->action(Array)
#5 /var/www/********/includes/do.php(27): App\RouteHelper::App\{closure}(Array)
#6 /var/www/********/www/index.php(1): require('/var/www/******...')
#7 {main}
  t" while reading response header from upstream, client: **.***.***.***, server: ***********, request: "POST /*************************** HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.1-fpm.sock:", host: "***********"

这里 stderr 输出在 之后被切断t,留下了足够的信息来找到问题,但它仍然不是完整的消息。我在输出的长度和它被切断的时间之间找不到任何模式。

我在 Debian Stretch 上使用 nginx 版本 1.10.3 和 PHP 版本 7.1.8。我还尝试在其中设置以下值nginx.conf(因为我过去曾查找过此问题的解决方案),但上面的示例是在这些设置已经生效的情况下生成的。

fastcgi_buffers 256 4k;
client_max_body_size 20M;
nginx
  • 1 个回答
  • 1590 Views
Martin Hope
SeinopSys
Asked: 2017-02-05 14:32:40 +0800 CST

无法在 Debian Jessie 上安装 openjdk-8-jre-headless

  • 29

这个星期五,我在跑步时看到由于某种原因我有 2 个被保留的软件包apt-get upgrade,所以我自然而然地做了任何没有经验的系统管理员都会做的事情并卸载了这些软件包,希望我可以简单地重新安装它们并解决问题。

我几乎不知道,我只是让情况变得更糟。当我尝试重新安装openjdk-8-jre-headless时,我得到了这个:

$ apt-get install openjdk-8-jre-headless
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 openjdk-8-jre-headless : Depends: ca-certificates-java but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

我尝试手动升级提到的软件包,但无济于事。

$ apt-get upgrade ca-certificates-java
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... ca-certificates-java is already the newest version.
Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

环顾四周,我在任何地方都没有提到解决这个确切错误的方法。

我在重新启动的服务器上使用 ElasticSearch,但我应该预料到它此时不会启动。所以现在我没有 Java,我的用户也没有搜索。发生了什么事,我该如何解决?

java debian apt debian-jessie
  • 4 个回答
  • 65136 Views
Martin Hope
SeinopSys
Asked: 2016-08-05 09:16:50 +0800 CST

nginx 错误日志中对 /page'A=0 的请求

  • 1

我一直收到尝试通过我的网络服务器访问各种页面的错误日志条目,这些页面只是附加'A=0在 URL 的末尾(例如/about'A=0)。在仔细检查我的访问日志后,我发现该请求显然是使用 Firefox 3.5.2(建于 2009 年)从 Windows XP 发送的,但当然可以伪造用户代理标头。

我在 Internet 上环顾四周,但除了也关注这些请求的人提出的线程之外,我没有发现有关 URL 参数或其预期(错误)用例的更多信息。这是试图通过利用一些已知的错误来破坏我的服务器,还是只是正在使用的浏览器的无辜错误?

http firefox nginx
  • 1 个回答
  • 397 Views
Martin Hope
SeinopSys
Asked: 2013-04-25 13:20:29 +0800 CST

.htacess IP 允许和拒绝不起作用

  • 0

我的.htacess文件中有这个集合:

Order Allow,Deny
Deny from all
Allow from localhost
Allow from 86.101.198.88 (我的IP)

ErrorDocument 404 /block/?code=404
ErrorDocument 403 /block/?code=403

但出于某种原因,我无权从本地主机访问并使用我的 IP。我只是不断被重定向到ErrorDocument错误 403。我错过了什么?

apache-2.2
  • 1 个回答
  • 7117 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve