Am experienced with Django, Apache, WSGI, MySql, etc. and have this environment setup and working fine on another OS X computer running Lion. Django session backend is db, session middleware and app are both enabled properly in settings. During first request of site view, we set a request.session key/value, which this first time thru works fine. On subsequent view though when we check if the key/value exists, we get a server-level 500 error that even with Debug mode on doesn't make it to the python interpreter to generate a full stack trace exception. The apache log generates the following messages...
[Mon Apr 16 14:26:22 2012] [notice] Apache/2.2.21 (Unix) DAV/2 mod_wsgi/3.3 Python/2.7.1 mod_ssl/2.2.21 OpenSSL/0.9.8r configured -- resuming normal operations
[Mon Apr 16 14:26:27 2012] [info] mod_wsgi (pid=2362): Create interpreter 'snap.joe|'.
[Mon Apr 16 14:26:27 2012] [info] [client 127.0.0.1] mod_wsgi (pid=2362, process='snap', application='snap.joe|'): Loading WSGI script '/var/www/venvs/snap_env/snap/wsgi/wsgi.py'.
[Mon Apr 16 14:26:32 2012] [error] [client 127.0.0.1] Premature end of script headers: wsgi.py
[Mon Apr 16 14:26:33 2012] [notice] child pid 2362 exit signal Bus error (10)
Have checked that a MySQL db table django_session row is added properly with session_data and also the cookie set in the browser after the first request contains the proper/matching session_id. If I add a simple request.session.flush() just before the existing session code, we can bypass the error obviously because there is never anything in the session. One more thing, the value we are adding to the session key/value store is a Django QuerySet object. Again, this is working on a live CentOS server, and also another Mac OS X Lion machine (albeit running Python 2.6 instead of 2.7).
Any ideas folks? Many thanks!
See documented reasons at:
http://code.google.com/p/modwsgi/wiki/FrequentlyAskedQuestions#Apache_Process_Crashes
and follow further links for possible workarounds.
In short, can be shared library version conflict, using mod_python at same time, or extension module for Python that doesn't work with sub interpreter.
If this is only Python site on that Apache, set:
WSGIApplicationGroup %{GLOBAL}
for one potential quick solution.
A few thoughts:
1) are you running the same versions of modules? Django just recently updated (1.4), so if you did a pip install and didn't specify a version your production might have an older version while your development has the newer one.
2) Can you test this using just the manage.py runserver? My suspicions are that it's something to do with the apache config (so if it works fine in runserver, that means the issue is with apache).
Related
I am installing Galera 4 on top of MySQL 8 on Debian but can't make it work. Once I start first node with bootstrap command:
mysqld_bootstrap
it starts with the following options:
/usr/sbin/mysqld $$'$\'$\\\'--wsrep-new-cluster --wsrep-on\\\'\'' --wsrep_start_position=00000000-0000-0000-0000-000000000000:-1
Problem is there is no pid file created and even though it appears to be running and I can't connect to the database.
There is nothing going to the log file either so I think it is ommiting the config files.
I have tried running config validator:
mysqld --validate_config
but it hangs on futex (checked with strace). In both cases it is not possible to kill mysqld normally and -9 option has to be used.
LXC is used to run this instance with following kernel:
Linux node01 4.15.18-26-pve #1 SMP PVE 4.15.18-54 (Sat, 15 Feb 2020 15:34:24 +0100) x86_64 GNU/Linux
The answer was pretty obvious after some investigation. No rsync used to sync the cluster was installed on the nodes so they can't sync together.
Jenkins: 2.89.4-x rolling version
Jenkins was running slow due to memory issues.
Restarted Jenkins (sudo/usual way), I got the following SEVERE issue.
Finally Restarted Jenkins machine thinking that'll help; got memory back (mem looks good now).
Trying to start Jenkins again and getting the same SEVERE issue and installation just HANGS at a given plugin while doing Initializing plugin <somePlugin-here> by pool-6-thread-2.
Running from: /usr/lib/jenkins/jenkins.war
Jun 06, 2019 6:49:14 AM Main deleteWinstoneTempContents
WARNING: Failed to delete the temporary Winstone file /tmp/winstone/jenkins.war
Jun 06, 2019 6:49:14 AM org.eclipse.jetty.util.log.Log initialized
..
...more lines here...
...
..
Jun 06, 2019 6:49:19 AM jenkins.model.Jenkins$5 runTask
INFO: Took 54ms for LogRecorderManager.init by pool-6-thread-7
Jun 06, 2019 6:49:19 AM com.cloudbees.jenkins.plugins.updates.envelope.LoggerLog log
SEVERE: Unable to parse provided JSON
net.sf.json.JSONException: A JSONObject text must begin with '{' at character 0 of
at net.sf.json.util.JSONTokener.syntaxError(JSONTokener.java:499)
at net.sf.json.JSONObject._fromJSONTokener(JSONObject.java:919)
at net.sf.json.JSONObject._fromString(JSONObject.java:1145)
at net.sf.json.JSONObject.fromObject(JSONObject.java:162)
at net.sf.json.JSONObject.fromObject(JSONObject.java:132)
at com.cloudbees.jenkins.plugins.updates.envelope.JSONObjectLoader.from(JSONObjectLoader.java:38)
at com.cloudbees.jenkins.plugins.updates.envelope.JSONObjectLoader$1.apply(JSONObjectLoader.java:51)
at com.cloudbees.jenkins.plugins.updates.envelope.JSONObjectLoader$1.apply(JSONObjectLoader.java:47)
at com.cloudbees.jenkins.plugins.updates.envelope.Validation$Value.flatMap(Validation.java:229)
at com.cloudbees.jenkins.plugins.updates.envelope.JSONObjectLoader.from(JSONObjectLoader.java:47)
at com.cloudbees.jenkins.plugins.updates.envelope.ParsedEnvelope$Loader.fromJSON(ParsedEnvelope.java:95)
at com.cloudbees.jenkins.cjp.installmanager.BaseFolder.loadInstalled(BaseFolder.java:136)
at com.cloudbees.jenkins.cjp.installmanager.WAREnvelope.loadInstalled(WAREnvelope.java:140)
at com.cloudbees.jenkins.cjp.installmanager.CJPPluginManager$StartUp.execute(CJPPluginManager.java:297)
at com.cloudbees.jenkins.cjp.installmanager.CJPPluginManager.loadPlugins(CJPPluginManager.java:231)
at com.cloudbees.jenkins.cjp.installmanager.CJPPluginManager.loadBundledPlugins(CJPPluginManager.java:209)
at hudson.PluginManager$1$1.run(PluginManager.java:379)
at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:282)
at jenkins.model.Jenkins$5.runTask(Jenkins.java:1066)
at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:210)
at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Jun 06, 2019 6:49:19 AM com.cloudbees.jenkins.plugins.updates.envelope.LoggerLog log
SEVERE: Unable to read JSON from [/var/lib/jenkins/cb-envelope/envelope.json]
Jun 06, 2019 6:49:19 AM jenkins.model.Jenkins$5 runTask
..
..
..
..
..
...more lines here...regarding inspecting/installing/loading/extracting plugins .hpi/.jpi files (looks good no ERROR/FATAL/SEVERE lines in this area).
...
..
..
..
..
..
Jun 06, 2019 6:49:34 AM jenkins.model.Jenkins$5 runTask
INFO: Took 0ms for Initializing plugin ColumnPack-plugin by pool-6-thread-2
Jun 06, 2019 6:49:34 AM jenkins.model.Jenkins$5 runTask
INFO: Took 274ms for Discovering plugin initialization tasks by pool-6-thread-10
Jun 06, 2019 6:49:34 AM jenkins.model.Jenkins$5 runTask
INFO: Took 0ms for SupportPlugin.threadDumpStartup by pool-6-thread-15
Jun 06, 2019 6:49:34 AM jenkins.model.Jenkins$5 runTask
INFO: Took 2ms for XStreamDOMCompat.addAliases by pool-6-thread-16
The above log shows only has 1 SEVERE error about the following:
SEVERE: Unable to parse provided JSON - [/var/lib/jenkins/cb-envelope/envelope.json]
Questions:
1. What is this cb-envelop folder in JENKINS_HOME?
2. Why Jenkins is not coming up?
I see this folder has 0 byte envelop.json file and both cje-xx folders contain nothing, example ls output shown below.
[giga123#jenkins_dev_machine ~]$ ls -l /var/lib/jenkins/cb-envelope/
total 8
drwxr-xr-x 2 jenkins_svc_user jenkins_group 4096 Jul 3 2017 cje-2.46.3.2
drwxr-xr-x 2 jenkins_svc_user jenkins_group 4096 Apr 20 2018 cje-2.89.4.2
-rw-r--r-- 1 jenkins_svc_user jenkins_group 0 Mar 27 2018 envelope.json
-rw-r--r-- 1 jenkins_svc_user jenkins_group 0 Jul 5 2017 envelope.json.disabled
[giga123#jenkins_dev_machine ~]$ ls -l /var/lib/jenkins/cb-envelope/cje-2.89.4.2/
total 0
Solution:
Soft fix: Renamed the envelop.json file to envelop.json.disabled.
Try Jenkins start now (ex: sudo /sbin/service jenkins stop/start and after start Jenkins should come up fine. Didn't catch that this issue came sometime back and someone did disable this file for Jenkins to startup.
The issue was a BLANK json file (thus '{' parse SEVERE error was coming up).
Hard fix: Rename /var/lib/jenkins/cb-envelope/ to /var/lib/jenkins/cb-envelope.OLD
Try Jenkins start now (ex: sudo /sbin/service jenkins stop/start and after start Jenkins should come up fine. cb-envelop folder will be recreated (if renamed/deleted) after Jenkins start.
Once this was done net.sf.json.JSONException: A JSONObject text must begin with '{' at character 0 of error went away and Jenkins installation went a little further BUT installation halted at a given plugin. I disabled that plugin (by going to $JENKINS_HOME/plugins/<plugin.jpi_or_hpi>.disabled and retried to start Jenkins, now it halted at another next plugin in the list of plugins during Initializing plugin .... plugin... steps/sub-steps.
To resolve that, we had to contact Cloudbees support team and disable support-core.jpi plugin. This plugin comes with Cloudbees Jenkins Operation Center / Master installation by default as one of the .jpi files.
After support-core.jpi file in plugins folder was renamed to support-core.jpi.disabled (you can move support-core folder to support-core.OLD if you want), we retried starting Jenkins and it came back up fine.
One last thing we noticed was, after Jenkins dashboard was finally UP, it was in QUITE and SHUTDOWN mode (by design). To remove state that, we had to click on:
As an admin level user account, Go to Jenkins > Manage Jenkins > Quiet Restart and UN-CHECK the check box which says Stay in "queiting down" state when restarted.
Remove the check from the following.
On Jenkins dashboard, click cancel on Shut down mode link (if any) and now Jenkins is up and running fine.
I am new to API Connect, and I have installed npm, node and apic in my local MacBook. Now I have created a loopback directory and trying to run the loopback application using apic Start. However, I am not understanding the error received from the logs:
MacBook-Pro-2:socialreviews Work$ apic start
Error: Service socialreviews started but did not initialize within the timeout period. Dumping log buffer.
[Tue Apr 30 12:02:42 2019] com.ibm.diagnostics.healthcenter.loader INFO: Node Application Metrics 3.1.3.201810251210 (Agent Core 3.2.6)
[Tue Apr 30 12:02:42 2019] com.ibm.diagnostics.healthcenter.mqtt INFO: Connecting to broker localhost:1883
strong-supervisor attaching dashboard at /appmetrics-dash
2019-04-30T09:02:42.694Z pid:44844 worker:0 INFO supervisor starting (pid 44844)
2019-04-30T09:02:42.697Z pid:44844 worker:0 INFO supervisor reporting metrics to internal:
2019-04-30T09:02:42.709Z pid:44844 worker:0 INFO supervisor size set to undefined
2019-04-30T09:02:42.905Z pid:44848 worker:1 [Tue Apr 30 12:02:42 2019] com.ibm.diagnostics.healthcenter.loader INFO: Node Application Metrics 3.1.3.201810251210 (Agent Core 3.2.6)
2019-04-30T09:02:42.959Z pid:44848 worker:1 [Tue Apr 30 12:02:42 2019] com.ibm.diagnostics.healthcenter.mqtt INFO: Connecting to broker localhost:1883
2019-04-30T09:02:42.995Z pid:44848 worker:1 strong-supervisor attaching dashboard at /appmetrics-dash
2019-04-30T09:02:45.017Z pid:44848 worker:1 Web server listening at: http://0.0.0.0:4004
2019-04-30T09:24:29.148Z pid:44844 worker:0 WARN received SIGTERM, shutting down
2019-04-30T09:24:29.148Z pid:44844 worker:0 INFO supervisor size set to undefined
2019-04-30T09:24:29.148Z pid:44844 worker:0 INFO supervisor stopped
Can someone help me with this issue please?
This issue is solved, however I am not 100% sure what was the exact issue. What I have done is ran apic edit command then when clicking on start it suddenly asked me to install docker. I have done so, then I started to have readable errors of some packages not installed. So I used npm commands to install them and my issue is fixed now! :)
I am about to setup Mediawiki on my VM (Debian Jessie, ISPconfig 3.1) and I get an error 500 when accessing the website. Here is my apache2 error.log:
[fastcgi:error] [pid 8066] (2)No such file or directory: [client
51.15.70.216:56974] FastCGI: failed to connect to server
"/var/www/clients/client1/web10/cgi-bin/hhvm-fcgi-[IP-address]-
mydomain.com": connect() failed
[fastcgi:error] [pid 8066] [client 51.15.70.216:56974] FastCGI:
incomplete headers (0 bytes) received from server
"/var/www/clients/client1/web10/cgi-bin/hhvm-fcgi-[IP-address]-80-
mydomain.com"
all rights are set OK for the webfolders, can anybody tell me please what I can do to get my configuration working?
thanks!
Is the hhvm deamon runing? It doesnt look so.
I decided to install my Mediawiki without using HHVM for the first time. As long as the integration of HHVM in ISPC is not technically mature, it makes no sense to me.
Thanks for your help.
I've encountered this error in my apache2 error.log while accessing a project running on WSL.
[Tue Feb 28 14:42:17.331656 2017] [:error] [pid 25334] [client 127.0.0.1:52043] PHP Parse error: syntax error, unexpected '.', expecting '&' or variable (T_VARIABLE) in /mnt/c/development/public_html/xxxx/vendor/cakephp/cakephp/src/I18n/functions.php on line 26
I'm running:
Cake 3.4.2
PHP 7.0.16-3+deb.sury.org~trusty+1
On Windows Subsystem for Linux
I have other cake projects working fine on this setup but none that are v3.4*.
I have no idea how to solve this problem as it's in the Cake core. Any advice on how to proceed from here would be great.
Please ask if you need any more info.
There is no 3.4.3 branch (yet)
There is no 3.4.3 branch (yet), double check that you are looking at the correct info. Maybe it was published by accident and has been retracted, if you really have version 3.4.3, try reinstalling your applications dependencies.
Ensure that PHP used by Apache PHP is up to date
Also make sure that your server is actually using the PHP version that you think it does, the Apache PHP module and the PHP CLI binary are two different things, and the FPM/CGI binary usually also isn't used on the CLI, ie the CLI and the server often times use different versions.
The error message you are referencing suggests that PHP couldn't handle the ... variadic function operator, which would mean that Apache is using a PHP version prior 5.6