AMPPS Apache is not starting after Restart/ SHutdown on Macbook Pro - ampps

Here is the log file
[Tue Jun 09 08:55:52.378786 2020] [mpm_prefork:notice] [pid 2311] AH00163: Apache/2.4.41 (Unix) OpenSSL/1.0.2p PHP/7.3.11 configured -- resuming normal operations
[Tue Jun 09 08:55:52.379156 2020] [core:notice] [pid 2311] AH00094: Command line: '/Applications/AMPPS/apache/bin/httpd'
[Tue Jun 09 08:56:48.228429 2020] [mpm_prefork:notice] [pid 2311] AH00169: caught SIGTERM, shutting down
[Tue Jun 09 08:58:13.964872 2020] [mpm_prefork:notice] [pid 637] AH00163: Apache/2.4.41 (Unix) OpenSSL/1.0.2p PHP/7.3.11 configured -- resuming normal operations
[Tue Jun 09 08:58:13.965557 2020] [core:notice] [pid 637] AH00094: Command line: '/Applications/AMPPS/apache/bin/httpd'
[Tue Jun 09 09:29:02.632112 2020] [cgi:error] [pid 802] [client ::1:49585] AH01215: error on line -1 of /Applications/Ampps/extra/ssl/openssl.cnf: /Applications/AMPPS/ampps/softaculous/enduser/index.php, referer: http://localhost/ampps/index.php?act=ampps_domainadd
[Tue Jun 09 09:29:02.632746 2020] [cgi:error] [pid 802] [client ::1:49585] AH01215: 4494323308:error:02001002:system library:fopen:No such file or directory:bss_file.c:175:fopen('/Applications/Ampps/extra/ssl/openssl.cnf','rb'): /Applications/AMPPS/ampps/softaculous/enduser/index.php, referer: http://localhost/ampps/index.php?act=ampps_domainadd
[Tue Jun 09 09:29:02.632796 2020] [cgi:error] [pid 802] [client ::1:49585] AH01215: 4494323308:error:2006D080:BIO routines:BIO_new_file:no such file:bss_file.c:182:: /Applications/AMPPS/ampps/softaculous/enduser/index.php, referer: http://localhost/ampps/index.php?act=ampps_domainadd
[Tue Jun 09 09:29:02.632887 2020] [cgi:error] [pid 802] [client ::1:49585] AH01215: 4494323308:error:0E078072:configuration file routines:DEF_LOAD:no such file:conf_def.c:201:: /Applications/AMPPS/ampps/softaculous/enduser/index.php, referer: http://localhost/ampps/index.php?act=ampps_domainadd
[Tue Jun 09 09:31:06.009748 2020] [cgi:error] [pid 787] [client ::1:49641] AH01215: AH00526: Syntax error on line 25 of /Applications/AMPPS/apache/conf/extra/httpd-vhosts.conf:: /Applications/AMPPS/ampps/softaculous/enduser/index.php, referer: http://localhost/ampps/index.php?act=ampps_domainmanage
[Tue Jun 09 09:31:06.010263 2020] [cgi:error] [pid 787] [client ::1:49641] AH01215: Cannot define multiple Listeners on the same IP:port: /Applications/AMPPS/ampps/softaculous/enduser/index.php, referer: http://localhost/ampps/index.php?act=ampps_domainmanage
[Tue Jun 09 09:31:06.823294 2020] [cgi:error] [pid 787] [client ::1:49641] AH01215: AH00526: Syntax error on line 25 of /Applications/AMPPS/apache/conf/extra/httpd-vhosts.conf:: /Applications/AMPPS/ampps/softaculous/enduser/index.php, referer: http://localhost/ampps/index.php?act=ampps_domainmanage
[Tue Jun 09 09:31:06.823357 2020] [cgi:error] [pid 787] [client ::1:49641] AH01215: Cannot define multiple Listeners on the same IP:port: /Applications/AMPPS/ampps/softaculous/enduser/index.php, referer: http://localhost/ampps/index.php?act=ampps_domainmanage
[Tue Jun 09 09:31:20.673005 2020] [cgi:error] [pid 639] [client ::1:49651] AH01215: AH00526: Syntax error on line 25 of /Applications/AMPPS/apache/conf/extra/httpd-vhosts.conf:: /Applications/AMPPS/ampps/softaculous/enduser/index.php, referer: http://localhost/ampps/index.php?act=ampps_domainmanage
[Tue Jun 09 09:31:20.673247 2020] [cgi:error] [pid 639] [client ::1:49651] AH01215: Cannot define multiple Listeners on the same IP:port: /Applications/AMPPS/ampps/softaculous/enduser/index.php, referer: http://localhost/ampps/index.php?act=ampps_domainmanage
[Tue Jun 09 09:31:41.530751 2020] [cgi:error] [pid 788] [client ::1:49655] AH01215: AH00526: Syntax error on line 25 of /Applications/AMPPS/apache/conf/extra/httpd-vhosts.conf:: /Applications/AMPPS/ampps/softaculous/enduser/index.php, referer: http://localhost/ampps/index.php?act=ampps_domainmanage
[Tue Jun 09 09:31:41.531804 2020] [cgi:error] [pid 788] [client ::1:49655] AH01215: Cannot define multiple Listeners on the same IP:port: /Applications/AMPPS/ampps/softaculous/enduser/index.php, referer: http://localhost/ampps/index.php?act=ampps_domainmanage
[Tue Jun 09 09:31:50.528108 2020] [cgi:error] [pid 802] [client ::1:49660] AH01215: error on line -1 of /Applications/Ampps/extra/ssl/openssl.cnf: /Applications/AMPPS/ampps/softaculous/enduser/index.php, referer: http://localhost/ampps/index.php?act=ampps_domainadd
[Tue Jun 09 09:31:50.528339 2020] [cgi:error] [pid 802] [client ::1:49660] AH01215: 4724469356:error:02001002:system library:fopen:No such file or directory:bss_file.c:175:fopen('/Applications/Ampps/extra/ssl/openssl.cnf','rb'): /Applications/AMPPS/ampps/softaculous/enduser/index.php, referer: http://localhost/ampps/index.php?act=ampps_domainadd
[Tue Jun 09 09:31:50.528386 2020] [cgi:error] [pid 802] [client ::1:49660] AH01215: 4724469356:error:2006D080:BIO routines:BIO_new_file:no such file:bss_file.c:182:: /Applications/AMPPS/ampps/softaculous/enduser/index.php, referer: http://localhost/ampps/index.php?act=ampps_domainadd
[Tue Jun 09 09:31:50.528437 2020] [cgi:error] [pid 802] [client ::1:49660] AH01215: 4724469356:error:0E078072:configuration file routines:DEF_LOAD:no such file:conf_def.c:201:: /Applications/AMPPS/ampps/softaculous/enduser/index.php, referer: http://localhost/ampps/index.php?act=ampps_domainadd
[Wed Jun 10 13:33:31.624306 2020] [mpm_prefork:notice] [pid 637] AH00169: caught SIGTERM, shutting down

In Ampps/apache/conf/httpd.conf
Depends on the version, edit LoadModule php7_module /Applications/AMPPS/php-7.3/libphp7.so as LoadModule php5_module /Applications/AMPPS/php-5.6/libphp5.so
Then restart AMPPS and switch Apache on. If it works, then edit the php version back to php7.

Related

Why am I getting "failed to flush chunk" when sending container logs to syslogs with fluent-bit?

Since moving to Containerd as a container runtime instead of Docker, I've been looking for a way to send container logs to syslogs. I have tried numerous configurations with fluent-bit and am always seeing "failed to flush chunk".
config file:
"/etc/fluent-bit/fluent-bit.conf" 40L, 897C 30,27 All
[SERVICE]
Flush 1
Daemon Off
Log_Level debug
Parsers_File /etc/fluent-bit/parsers.conf
[INPUT]
Name tail
Path /var/log/containers/*.log
Parser cri
Tag kube.*
Mem_Buf_Limit 5MB
Skip_Long_Lines On
[OUTPUT]
name syslog
host 127.0.0.1
match *
port 514
mode udp
syslog_format rfc5424
syslog_maxsize 2048
syslog_message_key message
syslog_severity_key severity
syslog_facility_key facility
syslog_hostname_key hostname
syslog_appname_key appname
syslog_procid_key procid
syslog_msgid_key msgid
syslog_sd_key sd
[FILTER]
Name kubernetes
Match kube.*
Merge_Log On
Merge_Log_Trim On
Labels Off
Annotations Off
K8S-Logging.Parser Off
K8S-Logging.Exclude Off
snippet of fluent-bit logs (with debug enabled):
Nov 03 22:27:24 apicdev1224 fluent-bit[3247533]: [2022/11/03 22:27:24] [debug] [input:tail:tail.0] inode=1290451 events: IN_MODIFY
Nov 03 22:27:24 apicdev1224 fluent-bit[3247533]: [2022/11/03 22:27:24] [debug] [filter:kubernetes:kubernetes.0] Send out request to API Server for pods information
Nov 03 22:27:24 apicdev1224 fluent-bit[3247533]: [2022/11/03 22:27:24] [debug] [input chunk] update output instances with new chunk size diff=202
Nov 03 22:27:24 apicdev1224 fluent-bit[3247533]: [2022/11/03 22:27:24] [debug] [task] created task=0x7f0efd03dbd0 id=6 OK
Nov 03 22:27:24 apicdev1224 fluent-bit[3247533]: [2022/11/03 22:27:24] [debug] [task] created task=0x7f0efd03dcb0 id=8 OK
Nov 03 22:27:24 apicdev1224 fluent-bit[3247533]: [2022/11/03 22:27:24] [debug] [input:tail:tail.0] inode=1290451 events: IN_MODIFY
Nov 03 22:27:24 apicdev1224 fluent-bit[3247533]: [2022/11/03 22:27:24] [debug] [filter:kubernetes:kubernetes.0] Send out request to API Server for pods information
Nov 03 22:27:24 apicdev1224 fluent-bit[3247533]: [2022/11/03 22:27:24] [debug] [input chunk] update output instances with new chunk size diff=184
Nov 03 22:27:24 apicdev1224 fluent-bit[3247533]: [2022/11/03 22:27:24] [debug] [out flush] cb_destroy coro_id=8
Nov 03 22:27:24 apicdev1224 fluent-bit[3247533]: [2022/11/03 22:27:24] [debug] [out flush] cb_destroy coro_id=9
Nov 03 22:27:24 apicdev1224 fluent-bit[3247533]: [2022/11/03 22:27:24] [debug] [retry] new retry created for task_id=6 attempts=1
Nov 03 22:27:24 apicdev1224 fluent-bit[3247533]: [2022/11/03 22:27:24] [ warn] [engine] failed to flush chunk '3247533-1667514444.161129247.flb', retry in 9 seconds: task_id=6, input=tail.0 > output=syslog.0 (out_id=0)
Nov 03 22:27:24 apicdev1224 fluent-bit[3247533]: [2022/11/03 22:27:24] [debug] [retry] new retry created for task_id=8 attempts=1
fluent-bit version: 2.0.3
containerd version: 1.5.11-1

I am getting lsapi:error and it is causing 503 error

The following error is being triggered:
[Wed Oct 19 00:46:51.328670 2022] [lsapi:error] [pid 8996:tid 47089191048960] [client 193.111.60.5:0] [host] Error receiving response header (lsphp is killed?): ReceiveResponseHeader: receive pkg hdr failed: ReceivePkgHdr: nothing to read from backend (LVE ID 1001), check http://docs.cloudlinux.com/mod_lsapi_troubleshooting.html
I added memory limit 4095M which solve this error

Wordpress: When I click in search results, it gives 404

And thanks for your help!
I'm using Wordpress, with WPSearch plugin + elementor custom search page, the problem is:
When the results are displayed, it works flawlessly, but the URl from the title is wrong, and when you click on the the text you get redirected to the main page (I activated 404 errors to be redirected to mainpage). I can't find where to edit those links in search, anyone has any idea?
In cpanel "errors" I can see these:
[Fri Aug 20 19:21:12.443992 2021] [:error] [pid 580957:tid 23099625621248] [client XXX:15408] PHP: syntax error, unexpected '(' in XXXpublic_html/php.ini on line 7, referer: XXX/wp-cron.php?doing_wp_cron=1629505272.3485751152038574218750
[Fri Aug 20 19:20:53.445562 2021] [:error] [pid 580956:tid 23099634026240] [client XXX:15364] PHP: syntax error, unexpected '(' in XXXpublic_html/php.ini on line 7, referer: XXX/wp-cron.php?doing_wp_cron=1629505253.3393890857696533203125
[Fri Aug 20 19:20:27.565196 2021] [:error] [pid 580957:tid 23099755898624] [client XXX:5056] PHP: syntax error, unexpected '(' in XXXpublic_html/php.ini on line 7
[Fri Aug 20 19:20:02.575672 2021] [:error] [pid 580956:tid 23099600406272] [client XXX:15268] PHP: syntax error, unexpected '(' in XXXpublic_html/php.ini on line 7, referer: XXX/wp-cron.php?doing_wp_cron=1629505202.4825611114501953125000
[Fri Aug 20 19:18:52.393628 2021] [:error] [pid 580957:tid 23099585697536] [client XXX:15122] PHP: syntax error, unexpected '(' in XXXpublic_html/php.ini on line 7, referer: XXX/wp-cron.php?doing_wp_cron=1629505132.2978270053863525390625
[Fri Aug 20 19:18:05.437396 2021] [:error] [pid 580956:tid 23099568887552] [client XXX:15056] PHP: syntax error, unexpected '(' in XXXpublic_html/php.ini on line 7, referer: XXX/wp-cron.php?doing_wp_cron=1629505085.3480589389801025390625
[Fri Aug 20 19:17:09.918235 2021] [:error] [pid 580957:tid 23099755898624] [client XXX:12736] PHP: syntax error, unexpected '(' in XXXpublic_html/php.ini on line 7
[Fri Aug 20 19:17:06.951470 2021] [:error] [pid 580956:tid 23099720177408] [client XXX:17024] PHP: syntax error, unexpected '(' in XXXpublic_html/php.ini on line 7
[Fri Aug 20 19:16:55.437002 2021] [:error] [pid 580954:tid 23099638228736] [client XXX:14866] PHP: syntax error, unexpected '(' in XXXpublic_html/php.ini on line 7, referer: XXX/wp-cron.php?doing_wp_cron=1629505015.3463969230651855468750
[Fri Aug 20 19:16:41.682702 2021] [:error] [pid 580957:tid 23099688658688] [client XXX:1038] PHP: syntax error, unexpected '(' in XXXpublic_html/php.ini on line 7, referer: XXX/search/condolencias
[Fri Aug 20 19:16:39.020203 2021] [:error] [pid 580958:tid 23099730683648] [client XXX:30395] PHP: syntax error, unexpected '(' in XXXpublic_html/php.ini on line 7, referer: XXX/search/condolencias
Any ideas?
Thank you!

symfony server start - logs multiple times

I've been using symfony server for development for a while now (https://symfony.com/doc/current/setup/symfony_server.html), and everything used to be fine. But lately it started logging messages multiple times.
Ex.
$ ▶ symfony server:start
Tailing Web Server log file (/home/vitals/.symfony/log/87e0a0bd6be99c02b64da0c88ffbc73128fb48bf.log)
Tailing PHP log file (/home/vitals/.symfony/log/87e0a0bd6be99c02b64da0c88ffbc73128fb48bf/7daf403c7589f4927632ed3b6af762a992f09b78.log)
Tailing PHP log file (/home/vitals/.symfony/log/87e0a0bd6be99c02b64da0c88ffbc73128fb48bf/7daf403c7589f4927632ed3b6af762a992f09b78.log)
Tailing PHP log file (/home/vitals/.symfony/log/87e0a0bd6be99c02b64da0c88ffbc73128fb48bf/7daf403c7589f4927632ed3b6af762a992f09b78.log)
Tailing PHP log file (/home/vitals/.symfony/log/87e0a0bd6be99c02b64da0c88ffbc73128fb48bf/7daf403c7589f4927632ed3b6af762a992f09b78.log)
Tailing PHP log file (/home/vitals/.symfony/log/87e0a0bd6be99c02b64da0c88ffbc73128fb48bf/7daf403c7589f4927632ed3b6af762a992f09b78.log)
Tailing PHP log file (/home/vitals/.symfony/log/87e0a0bd6be99c02b64da0c88ffbc73128fb48bf/7daf403c7589f4927632ed3b6af762a992f09b78.log)
Tailing PHP log file (/home/vitals/.symfony/log/87e0a0bd6be99c02b64da0c88ffbc73128fb48bf/7daf403c7589f4927632ed3b6af762a992f09b78.log)
Tailing PHP log file (/home/vitals/.symfony/log/87e0a0bd6be99c02b64da0c88ffbc73128fb48bf/7daf403c7589f4927632ed3b6af762a992f09b78.log)
Tailing PHP log file (/home/vitals/.symfony/log/87e0a0bd6be99c02b64da0c88ffbc73128fb48bf/7daf403c7589f4927632ed3b6af762a992f09b78.log)
Tailing PHP log file (/home/vitals/.symfony/log/87e0a0bd6be99c02b64da0c88ffbc73128fb48bf/7daf403c7589f4927632ed3b6af762a992f09b78.log)
Tailing PHP log file (/home/vitals/.symfony/log/87e0a0bd6be99c02b64da0c88ffbc73128fb48bf/7daf403c7589f4927632ed3b6af762a992f09b78.log)
Tailing PHP log file (/home/vitals/.symfony/log/87e0a0bd6be99c02b64da0c88ffbc73128fb48bf/7daf403c7589f4927632ed3b6af762a992f09b78.log)
Tailing PHP log file (/home/vitals/.symfony/log/87e0a0bd6be99c02b64da0c88ffbc73128fb48bf/7daf403c7589f4927632ed3b6af762a992f09b78.log)
Tailing PHP log file (/home/vitals/.symfony/log/87e0a0bd6be99c02b64da0c88ffbc73128fb48bf/7daf403c7589f4927632ed3b6af762a992f09b78.log)
Tailing PHP log file (/home/vitals/.symfony/log/87e0a0bd6be99c02b64da0c88ffbc73128fb48bf/7daf403c7589f4927632ed3b6af762a992f09b78.log)
Tailing PHP log file (/home/vitals/.symfony/log/87e0a0bd6be99c02b64da0c88ffbc73128fb48bf/7daf403c7589f4927632ed3b6af762a992f09b78.log)
Tailing PHP log file (/home/vitals/.symfony/log/87e0a0bd6be99c02b64da0c88ffbc73128fb48bf/7daf403c7589f4927632ed3b6af762a992f09b78.log)
Tailing PHP log file (/home/vitals/.symfony/log/87e0a0bd6be99c02b64da0c88ffbc73128fb48bf/7daf403c7589f4927632ed3b6af762a992f09b78.log)
Tailing PHP log file (/home/vitals/.symfony/log/87e0a0bd6be99c02b64da0c88ffbc73128fb48bf/7daf403c7589f4927632ed3b6af762a992f09b78.log)
Is taling same log file tens of times. And of course whenever I do something I get output like:
[PHP ] [Thu Nov 19 13:18:38 2020] 127.0.0.1:57810 Accepted
[PHP ] [Thu Nov 19 13:18:38 2020] 127.0.0.1:57810 Accepted
[PHP ] [Thu Nov 19 13:18:38 2020] 127.0.0.1:57810 Accepted
[PHP ] [Thu Nov 19 13:18:38 2020] 127.0.0.1:57810 Accepted
[PHP ] [Thu Nov 19 13:18:38 2020] 127.0.0.1:57810 Accepted
[PHP ] [Thu Nov 19 13:18:38 2020] 127.0.0.1:57810 Accepted
[PHP ] [Thu Nov 19 13:18:38 2020] 127.0.0.1:57810 Accepted
[PHP ] [Thu Nov 19 13:18:38 2020] 127.0.0.1:57810 Accepted
[PHP ] [Thu Nov 19 13:18:38 2020] 127.0.0.1:57810 Accepted
[PHP ] [Thu Nov 19 13:18:38 2020] 127.0.0.1:57810 Closing
[PHP ] [Thu Nov 19 13:18:38 2020] 127.0.0.1:57814 Accepted
[PHP ] [Thu Nov 19 13:18:38 2020] 127.0.0.1:57814 Closing
[PHP ] [Thu Nov 19 13:18:38 2020] 127.0.0.1:57818 Accepted
[PHP ] [Thu Nov 19 13:18:38 2020] 127.0.0.1:57810 Closing
[PHP ] [Thu Nov 19 13:18:38 2020] 127.0.0.1:57814 Accepted
[PHP ] [Thu Nov 19 13:18:38 2020] 127.0.0.1:57814 Closing
[PHP ] [Thu Nov 19 13:18:38 2020] 127.0.0.1:57818 Accepted
[PHP ] [Thu Nov 19 13:18:38 2020] 127.0.0.1:57810 Closing
[PHP ] [Thu Nov 19 13:18:38 2020] 127.0.0.1:57814 Accepted
[PHP ] [Thu Nov 19 13:18:38 2020] 127.0.0.1:57814 Closing
[PHP ] [Thu Nov 19 13:18:38 2020] 127.0.0.1:57818 Accepted
[PHP ] [Thu Nov 19 13:18:38 2020] 127.0.0.1:57810 Closing
[PHP ] [Thu Nov 19 13:18:38 2020] 127.0.0.1:57814 Accepted
[PHP ] [Thu Nov 19 13:18:38 2020] 127.0.0.1:57814 Closing
[PHP ] [Thu Nov 19 13:18:38 2020] 127.0.0.1:57818 Accepted
[PHP ] [Thu Nov 19 13:18:38 2020] 127.0.0.1:57810 Closing
[PHP ] [Thu Nov 19 13:18:38 2020] 127.0.0.1:57810 Closing
[PHP ] [Thu Nov 19 13:18:38 2020] 127.0.0.1:57814 Accepted
[PHP ] [Thu Nov 19 13:18:38 2020] 127.0.0.1:57814 Closing
[PHP ] [Thu Nov 19 13:18:38 2020] 127.0.0.1:57818 Accepted
[PHP ] [Thu Nov 19 13:18:38 2020] 127.0.0.1:57814 Accepted
[PHP ] [Thu Nov 19 13:18:38 2020] 127.0.0.1:57810 Closing
[PHP ] [Thu Nov 19 13:18:38 2020] 127.0.0.1:57814 Accepted
[PHP ] [Thu Nov 19 13:18:38 2020] 127.0.0.1:57814 Closing
[PHP ] [Thu Nov 19 13:18:38 2020] 127.0.0.1:57818 Accepted
[PHP ] [Thu Nov 19 13:18:38 2020] 127.0.0.1:57814 Closing
[PHP ] [Thu Nov 19 13:18:38 2020] 127.0.0.1:57818 Accepted
[PHP ] [Thu Nov 19 13:18:38 2020] 127.0.0.1:57810 Closing
[PHP ] [Thu Nov 19 13:18:38 2020] 127.0.0.1:57814 Accepted
[PHP ] [Thu Nov 19 13:18:38 2020] 127.0.0.1:57814 Closing
[PHP ] [Thu Nov 19 13:18:38 2020] 127.0.0.1:57818 Accepted
[PHP ] [Thu Nov 19 13:18:38 2020] 127.0.0.1:57810 Closing
[PHP ] [Thu Nov 19 13:18:38 2020] 127.0.0.1:57814 Accepted
[PHP ] [Thu Nov 19 13:18:38 2020] 127.0.0.1:57814 Closing
[PHP ] [Thu Nov 19 13:18:38 2020] 127.0.0.1:57810 Closing
[PHP ] [Thu Nov 19 13:18:38 2020] 127.0.0.1:57818 Accepted
[PHP ] [Thu Nov 19 13:18:38 2020] 127.0.0.1:57814 Accepted
Is like is opening on multiple ports instead of one. Any idea why this is happening?

graphite-web and ubuntu 18.04

I am trying to set up graphite-web on a freshly installed ubuntu 18.04 system. I used the apt packet manager, so I got the 1.0.2 version of graphite-web. I finished the configuration als usual, however I got an "Internal Server Error" when trying to open graphite-web in the browser. The apache error log of graphite web says:
[Fri May 25 07:02:47.097839 2018] [wsgi:error] [pid 13350] [remote XXX.XXX.XXX.XXX:XXXX] mod_wsgi (pid=13350): Exception occurred processing WSGI script '/usr/share/graphite-web/graphite.wsgi'.
[Fri May 25 07:02:47.102111 2018] [wsgi:error] [pid 13350] [remote XXX.XXX.XXX.XXX:XXXX] Traceback (most recent call last):
[Fri May 25 07:02:47.102210 2018] [wsgi:error] [pid 13350] [remote XXX.XXX.XXX.XXX:XXXX] File "/usr/lib/python2.7/dist-packages/django/core/handlers/wsgi.py", line 157, in __call__
[Fri May 25 07:02:47.102389 2018] [wsgi:error] [pid 13350] [remote XXX.XXX.XXX.XXX:XXXX] response = self.get_response(request)
[Fri May 25 07:02:47.102535 2018] [wsgi:error] [pid 13350] [remote XXX.XXX.XXX.XXX:XXXX] File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line 124, in get_response
[Fri May 25 07:02:47.102706 2018] [wsgi:error] [pid 13350] [remote XXX.XXX.XXX.XXX:XXXX] response = self._middleware_chain(request)
[Fri May 25 07:02:47.102964 2018] [wsgi:error] [pid 13350] [remote XXX.XXX.XXX.XXX:XXXX] File "/usr/lib/python2.7/dist-packages/django/core/handlers/exception.py", line 43, in inner
[Fri May 25 07:02:47.103063 2018] [wsgi:error] [pid 13350] [remote XXX.XXX.XXX.XXX:XXXX] response = response_for_exception(request, exc)
[Fri May 25 07:02:47.103144 2018] [wsgi:error] [pid 13350] [remote XXX.XXX.XXX.XXX:XXXX] File "/usr/lib/python2.7/dist-packages/django/core/handlers/exception.py", line 93, in response_for_exception
[Fri May 25 07:02:47.103263 2018] [wsgi:error] [pid 13350] [remote XXX.XXX.XXX.XXX:XXXX] response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info())
[Fri May 25 07:02:47.103502 2018] [wsgi:error] [pid 13350] [remote XXX.XXX.XXX.XXX:XXXX] File "/usr/lib/python2.7/dist-packages/django/core/handlers/exception.py", line 143, in handle_uncaught_exception
[Fri May 25 07:02:47.103660 2018] [wsgi:error] [pid 13350] [remote XXX.XXX.XXX.XXX:XXXX] return callback(request, **param_dict)
[Fri May 25 07:02:47.103737 2018] [wsgi:error] [pid 13350] [remote XXX.XXX.XXX.XXX:XXXX] File "/usr/lib/python2.7/dist-packages/graphite/views.py", line 11, in server_error
[Fri May 25 07:02:47.103889 2018] [wsgi:error] [pid 13350] [remote XXX.XXX.XXX.XXX:XXXX] return HttpResponseServerError( template.render(context) )
[Fri May 25 07:02:47.104044 2018] [wsgi:error] [pid 13350] [remote XXX.XXX.XXX.XXX:XXXX] File "/usr/lib/python2.7/dist-packages/django/template/backends/django.py", line 64, in render
[Fri May 25 07:02:47.104484 2018] [wsgi:error] [pid 13350] [remote XXX.XXX.XXX.XXX:XXXX] context = make_context(context, request, autoescape=self.backend.engine.autoescape)
[Fri May 25 07:02:47.104582 2018] [wsgi:error] [pid 13350] [remote XXX.XXX.XXX.XXX:XXXX] File "/usr/lib/python2.7/dist-packages/django/template/context.py", line 287, in make_context
[Fri May 25 07:02:47.104868 2018] [wsgi:error] [pid 13350] [remote XXX.XXX.XXX.XXX:XXXX] raise TypeError('context must be a dict rather than %s.' % context.__class__.__name__)
[Fri May 25 07:02:47.105070 2018] [wsgi:error] [pid 13350] [remote XXX.XXX.XXX.XXX:XXXX] TypeError: context must be a dict rather than Context.
[Fri May 25 07:02:47.435785 2018] [wsgi:error] [pid 13387] [remote XXX.XXX.XXX.XXX:XXXX] mod_wsgi (pid=13387): Exception occurred processing WSGI script '/usr/share/graphite-web/graphite.wsgi'.
[Fri May 25 07:02:47.436040 2018] [wsgi:error] [pid 13387] [remote XXX.XXX.XXX.XXX:XXXX] Traceback (most recent call last):
[Fri May 25 07:02:47.436131 2018] [wsgi:error] [pid 13387] [remote XXX.XXX.XXX.XXX:XXXX] File "/usr/lib/python2.7/dist-packages/django/core/handlers/wsgi.py", line 157, in __call__
[Fri May 25 07:02:47.436272 2018] [wsgi:error] [pid 13387] [remote XXX.XXX.XXX.XXX:XXXX] response = self.get_response(request)
[Fri May 25 07:02:47.436386 2018] [wsgi:error] [pid 13387] [remote XXX.XXX.XXX.XXX:XXXX] File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line 124, in get_response
[Fri May 25 07:02:47.436646 2018] [wsgi:error] [pid 13387] [remote XXX.XXX.XXX.XXX:XXXX] response = self._middleware_chain(request)
[Fri May 25 07:02:47.436744 2018] [wsgi:error] [pid 13387] [remote XXX.XXX.XXX.XXX:XXXX] File "/usr/lib/python2.7/dist-packages/django/core/handlers/exception.py", line 43, in inner
[Fri May 25 07:02:47.436876 2018] [wsgi:error] [pid 13387] [remote XXX.XXX.XXX.XXX:XXXX] response = response_for_exception(request, exc)
[Fri May 25 07:02:47.437023 2018] [wsgi:error] [pid 13387] [remote XXX.XXX.XXX.XXX:XXXX] File "/usr/lib/python2.7/dist-packages/django/core/handlers/exception.py", line 93, in response_for_exception
[Fri May 25 07:02:47.437173 2018] [wsgi:error] [pid 13387] [remote XXX.XXX.XXX.XXX:XXXX] response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info())
[Fri May 25 07:02:47.437321 2018] [wsgi:error] [pid 13387] [remote XXX.XXX.XXX.XXX:XXXX] File "/usr/lib/python2.7/dist-packages/django/core/handlers/exception.py", line 143, in handle_uncaught_exception
[Fri May 25 07:02:47.437570 2018] [wsgi:error] [pid 13387] [remote XXX.XXX.XXX.XXX:XXXX] return callback(request, **param_dict)
[Fri May 25 07:02:47.437755 2018] [wsgi:error] [pid 13387] [remote XXX.XXX.XXX.XXX:XXXX] File "/usr/lib/python2.7/dist-packages/graphite/views.py", line 11, in server_error
[Fri May 25 07:02:47.437960 2018] [wsgi:error] [pid 13387] [remote XXX.XXX.XXX.XXX:XXXX] return HttpResponseServerError( template.render(context) )
[Fri May 25 07:02:47.438139 2018] [wsgi:error] [pid 13387] [remote XXX.XXX.XXX.XXX:XXXX] File "/usr/lib/python2.7/dist-packages/django/template/backends/django.py", line 64, in render
[Fri May 25 07:02:47.438273 2018] [wsgi:error] [pid 13387] [remote XXX.XXX.XXX.XXX:XXXX] context = make_context(context, request, autoescape=self.backend.engine.autoescape)
[Fri May 25 07:02:47.438392 2018] [wsgi:error] [pid 13387] [remote XXX.XXX.XXX.XXX:XXXX] File "/usr/lib/python2.7/dist-packages/django/template/context.py", line 287, in make_context
[Fri May 25 07:02:47.438609 2018] [wsgi:error] [pid 13387] [remote XXX.XXX.XXX.XXX:XXXX] raise TypeError('context must be a dict rather than %s.' % context.__class__.__name__)
[Fri May 25 07:02:47.438816 2018] [wsgi:error] [pid 13387] [remote XXX.XXX.XXX.XXX:XXXX] TypeError: context must be a dict rather than Context.
At first I thought that the dirctory that contains the wsgi script was not owned by the right user, but it turned out that this was not the case. (It is owned by the web-servers user)
Currently I am using python 2.7 but I was able to replicate the problem using python3.
I am running out of ideas. Can anyone help?
Thanks!
I managed to fix this problem inside usr/lib/python2.7/dist-packages/graphite/views.py
by changing
context = Contex({
'stacktrace' : traceback.format_exc()
})
to
context = {
'stacktrace' : traceback.format_exc()
}
The problem was related to this topic:
Django 1.11 TypeError context must be a dict rather than Context

Resources