I'm trying to use dbd with mysql as authentification with Apache 2.4.
When Apache starts, i have this error :
[Tue May 12 13:07:18.789021 2015] [mpm_event:notice] [pid 10625:tid 140410697815936] AH00489: Apache/2.4.10 (Debian) configured -- resuming normal operations
[Tue May 12 13:07:18.789118 2015] [core:notice] [pid 10625:tid 140410697815936] AH00094: Command line: '/usr/sbin/apache2'
[Tue May 12 13:07:18.789469 2015] [dbd:error] [pid 10628:tid 140410697815936] (20014)Internal error: AH00629: Can't connect to mysql: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
[Tue May 12 13:07:18.789560 2015] [dbd:error] [pid 10628:tid 140410697815936] (20014)Internal error: AH00633: failed to initialise
[Tue May 12 13:07:18.790282 2015] [dbd:error] [pid 10629:tid 140410697815936] (20014)Internal error: AH00629: Can't connect to mysql: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
[Tue May 12 13:07:18.790441 2015] [dbd:error] [pid 10629:tid 140410697815936] (20014)Internal error: AH00633: failed to initialise
[Tue May 12 13:07:18.792481 2015] [dbd:crit] [pid 10628:tid 140410697815936] (20014)Internal error: AH00636: child init failed!
[Tue May 12 13:07:18.792595 2015] [dbd:crit] [pid 10629:tid 140410697815936] (20014)Internal error: AH00636: child init failed!
dbd_mysql.conf :
DBDriver mysql
DBDParams "host=192.168.1.2 port=3306 user=MY_USERNAME pass=MY_PASSWORD dbname=MY_DATABASE"
DBDMin 2
DBDKeep 4
DBDMax 10
DBDExptime 300
DBDPersist On
000-default.conf
[...]
DBDParams "dbname=DATABASENAME"
<IfModule authnz_ldap_module>
<Directory /var/www/test/>
AuthName "Authentication"
AuthType Basic
AuthBasicProvider dbd
AuthDBDUserPWQuery "SELECT SHA2(password, 256) AS password FROM users WHERE username = %s"
require valid-user
</Directory>
</IfModule>
[...]
If i change the password to put an invalid one, i received the exception
Internal error: AH00629: Can't connect to mysql: Access denied for user...
Debian : 7.8
Apache : 2.4.10
libapr1 : 1.5.1-3 (i tried to downgrade, but i cannot)
Note: The server do not have php nor php+mysql (libphpmysql) installed
Edit :
my.cnf (client part)
[client]
port = 3306
socket = /var/run/mysqld/mysqld.sock
Edit (2) :
I also tried to use the "odbc" for mysql
odbc.ini :
dbd_mysql.conf
DBDriver odbc
DBDParams "datasource=MYSERVER_MYSQL_MYDATABASE"
DBDMin 1
DBDKeep 1
DBDMax 10
DBDExptime 300
/etc/odbc.ini (i edited the config to remove sensitive data)
[MYSERVER_MYSQL_MYDATABASE]
Driver=/usr/local/lib/libmyodbc5a.so
Description=MYSERVER_MYSQL_MYDATABASE
SERVER=192.168.1.2
PORT=
USER=MY_USER
Password=MY_PASSWORD
Database=MY_DATABASE
OPTION=3
SOCKET=
If i use :
# isql MYSERVER_MYSQL_MYDATABASE
+---------------------------------------+
| Connected! |
| |
| sql-statement |
| help [tablename] |
| quit |
| |
+---------------------------------------+
It working perfectly.. but on the apache error.log :
[Thu May 14 09:07:51.323638 2015] [mpm_event:notice] [pid 1605:tid 140068309481344] AH00489: Apache/2.4.10 (Debian) configured -- resuming normal operations
[Thu May 14 09:07:51.323725 2015] [core:notice] [pid 1605:tid 140068309481344] AH00094: Command line: '/usr/sbin/apache2'
[Thu May 14 09:07:51 2015] [dbd_odbc] Invalid DBD Parameters - open returned SQL_ERROR (-1) at /tmp/buildd/apr-util-1.5:1146
[Thu May 14 09:07:51.323827 2015] [dbd:error] [pid 1608:tid 140068309481344] (20014)Internal error: AH00629: Can't connect to odbc: [dbd_odbc] Invalid DBD Parameters - open returned SQL_ERROR (-1) at /tmp/buildd/apr-util-1.5:1146
[Thu May 14 09:07:51.323870 2015] [dbd:error] [pid 1608:tid 140068309481344] (20014)Internal error: AH00633: failed to initialise
[Thu May 14 09:07:51 2015] [dbd_odbc] Invalid DBD Parameters - open returned SQL_ERROR (-1) at /tmp/buildd/apr-util-1.5:1146
[Thu May 14 09:07:51.324332 2015] [dbd:error] [pid 1609:tid 140068309481344] (20014)Internal error: AH00629: Can't connect to odbc: [dbd_odbc] Invalid DBD Parameters - open returned SQL_ERROR (-1) at /tmp/buildd/apr-util-1.5:1146
[Thu May 14 09:07:51.324430 2015] [dbd:error] [pid 1609:tid 140068309481344] (20014)Internal error: AH00633: failed to initialise
[Thu May 14 09:07:51.331767 2015] [dbd:crit] [pid 1608:tid 140068309481344] (20014)Internal error: AH00636: child init failed!
[Thu May 14 09:07:51.331823 2015] [dbd:crit] [pid 1609:tid 140068309481344] (20014)Internal error: AH00636: child init failed!
Edit (3) :
I found that i did not register the driver :
./myodbc-installer -d -a -n "MySQL ODBC 5.3 Driver" -t "DRIVER=/usr/local/lib/libmyodbc5a.so"
Then changed the "dbd_mysql.conf" with :
DBDriver odbc
DBDParams "CONNECT='DRIVER={MySQL ODBC 5.3 Driver};SERVER=192.168.1.2;DATABASE=MY_DATABASE;UID=MY_USER;PWD=MY_PASSWORD;'"
DBDMin 1
DBDKeep 1
DBDMax 10
DBDExptime 300
But still the same problem (error.log) :
[Fri May 15 09:38:31.905733 2015] [core:notice] [pid 5215:tid 140452627486592] AH00094: Command line: '/usr/sbin/apache2'
[Fri May 15 09:38:31 2015] [dbd_odbc] Invalid DBD Parameters - open returned SQL_ERROR (-1) at /tmp/buildd/apr-util-1.5:1146
[Fri May 15 09:38:31.905842 2015] [dbd:error] [pid 5218:tid 140452627486592] (20014)Internal error: AH00629: Can't connect to odbc: [dbd_odbc] Invalid DBD Parameters - open returned SQL_ERROR (-1) at /tmp/buildd/apr-util-1.5:1146
[Fri May 15 09:38:31.905888 2015] [dbd:error] [pid 5218:tid 140452627486592] (20014)Internal error: AH00633: failed to initialise
[Fri May 15 09:38:31 2015] [dbd_odbc] Invalid DBD Parameters - open returned SQL_ERROR (-1) at /tmp/buildd/apr-util-1.5:1146
[Fri May 15 09:38:31.906424 2015] [dbd:error] [pid 5219:tid 140452627486592] (20014)Internal error: AH00629: Can't connect to odbc: [dbd_odbc] Invalid DBD Parameters - open returned SQL_ERROR (-1) at /tmp/buildd/apr-util-1.5:1146
[Fri May 15 09:38:31.906528 2015] [dbd:error] [pid 5219:tid 140452627486592] (20014)Internal error: AH00633: failed to initialise
[Fri May 15 09:38:31.915211 2015] [dbd:crit] [pid 5218:tid 140452627486592] (20014)Internal error: AH00636: child init failed!
[Fri May 15 09:38:31.915578 2015] [dbd:crit] [pid 5219:tid 140452627486592] (20014)Internal error: AH00636: child init failed!
DBDParams must be separated with comma: DBDParams param1=value1[,param2=value2]
http://httpd.apache.org/docs/2.4/mod/mod_dbd.html
in my.conf try
[client]
protocol=tcp
The reference Connecting to the MySQL Server provides an explanation of how to override the default connection methodology.
The reference Using Option Files vaguely explains what values can be placed in the my.conf file. Essentially an argument that can be passed to the mysql command on the command line (ie. --protocol) can be specified, without the dashes, in the option file.
Related
I deployed my Django project that uses Apache and MySQL. all apps features work fine, but in an application's views.py, when I try to access it, it raises this error.
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 9735: ordinal not in range(128)
it works fine in localhost , my query contains some arabic character
I searched a lot but none of them works for me. The views.py of the app has many queries (for calculating), annotate and aggregate also Case(When())?
this is my error.log
[Fri Aug 21 14:30:46.907352 2020] [wsgi:error] [pid 20969:tid 140683116439296] [remote 95.159.84.254:12151] File "/var/www/projectname/venv/lib/python3.6/site-packages/django/views/debug.py", line 94, in technical_500_response
[Fri Aug 21 14:30:46.907356 2020] [wsgi:error] [pid 20969:tid 140683116439296] [remote 95.159.84.254:12151] html = reporter.get_traceback_html()
[Fri Aug 21 14:30:46.907362 2020] [wsgi:error] [pid 20969:tid 140683116439296] [remote 95.159.84.254:12151] File "/var/www/projectname/venv/lib/python3.6/site-packages/django/views/debug.py", line 332, in get_traceback_html
[Fri Aug 21 14:30:46.907379 2020] [wsgi:error] [pid 20969:tid 140683116439296] [remote 95.159.84.254:12151] t = DEBUG_ENGINE.from_string(fh.read())
[Fri Aug 21 14:30:46.907387 2020] [wsgi:error] [pid 20969:tid 140683116439296] [remote 95.159.84.254:12151] File "/usr/lib/python3.6/encodings/ascii.py", line 26, in decode
[Fri Aug 21 14:30:46.907391 2020] [wsgi:error] [pid 20969:tid 140683116439296] [remote 95.159.84.254:12151] return codecs.ascii_decode(input, self.errors)[0]
[Fri Aug 21 14:30:46.907402 2020] [wsgi:error] [pid 20969:tid 140683116439296] [remote 95.159.84.254:12151] UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 9735: ordinal not in range(128)
[Fri Aug 21 14:30:50.086155 2020] [wsgi:error] [pid 20969:tid 140683116439296] [remote 95.159.84.254:12181] Not Found: /favicon.ico
[Fri Aug 21 11:36:30.228905 2020] [mpm_event:notice] [pid 20966:tid 140683347807168] AH00491: caught SIGTERM, shutting down
[Fri Aug 21 11:36:30.330450 2020] [mpm_event:notice] [pid 21882:tid 140691412487104] AH00489: Apache/2.4.29 (Ubuntu) mod_wsgi/4.5.17 Python/3.6 configured -- resuming normal operations
[Fri Aug 21 11:36:30.330585 2020] [core:notice] [pid 21882:tid 140691412487104] AH00094: Command line: '/usr/sbin/apache2'
[Fri Aug 21 12:15:09.336685 2020] [mpm_event:notice] [pid 21882:tid 140691412487104] AH00491: caught SIGTERM, shutting down
[Fri Aug 21 12:15:09.451585 2020] [mpm_event:notice] [pid 22113:tid 139983902116800] AH00489: Apache/2.4.29 (Ubuntu) mod_wsgi/4.5.17 Python/3.6 configured -- resuming normal operations
[Fri Aug 21 12:15:09.451973 2020] [core:notice] [pid 22113:tid 139983902116800] AH00094: Command line: '/usr/sbin/apache2'
[Fri Aug 21 12:51:39.616795 2020] [mpm_event:notice] [pid 22113:tid 139983902116800] AH00491: caught SIGTERM, shutting down
[Fri Aug 21 12:51:39.714991 2020] [mpm_event:notice] [pid 22639:tid 140292123478976] AH00489: Apache/2.4.29 (Ubuntu) mod_wsgi/4.5.17 Python/3.6 configured -- resuming normal operations
[Fri Aug 21 12:51:39.715191 2020] [core:notice] [pid 22639:tid 140292123478976] AH00094: Command line: '/usr/sbin/apache2'
If you are converting to or from UTF-8, it does have a specific format that must be followed.
If the data that has been submitted is not submitted in UTF-8 format, then it will not correctly decode as UTF-8
That is, if the international characters (non 7-bit characters) have been encoded using a different text-encoding, then
its likely they will not decode as UTF-8, giving the error you are seeing
the decoded data will come out completely wrong - its like translating English to French, but then translating [the French] back to English by treating it as German - the result will be errors & nonsense.
For any modern system, especially one that you want to be fully multi-lingual, you should ensure all data is always submitted as UTF-8
libidn2 has the function u8_check that will do a UTF-8 validation on any UTF-8 encoded data.
Also, NOTE - "utf8" in MySQL is NOT correct UTF-8, its an early implementation that is not fully compliant.
You should use utf8mb4 instead - using the older one could also cause similar problems to what you have - https://medium.com/#adamhooper/in-mysql-never-use-utf8-use-utf8mb4-11761243e434
I'm struggling to run an apache2 server for django. I wanted to try gunicorn, but as I expect apache to be installed in in workplaces more frequently, so I'll stick to it.
Problem currently lies (I think) in an Import Error visible in the excerpt from apache error.log. I've tried quite a lot of possible configs, and before it didn't even import django. I'm using virtual env. The developer server from django works just fine both for the app and database.
1 [Sun Apr 02 20:58:52.082706 2017] [wsgi:warn] [pid 13495] mod_wsgi: Compiled for Python/3.4.2rc1+.
2 [Sun Apr 02 20:58:52.082907 2017] [wsgi:warn] [pid 13495] mod_wsgi: Runtime using Python/3.4.2.
3 [Sun Apr 02 20:58:52.104626 2017] [mpm_prefork:notice] [pid 13495] AH00163: Apache/2.4.10 (Raspbian) mod_wsgi/4.3.0 Python/3.4.2 configu red -- resuming normal operations
4 [Sun Apr 02 20:58:52.104798 2017] [core:notice] [pid 13495] AH00094: Command line: '/usr/sbin/apache2'
5 [Sun Apr 02 21:00:18.727276 2017] [wsgi:error] [pid 13499] [remote 192.168.1.106:0] mod_wsgi (pid=13499): Target WSGI script '/home/pi/d jangoProjects/pidjay/pidjay/wsgi.py' cannot be loaded as Python module.
6 [Sun Apr 02 21:00:18.727660 2017] [wsgi:error] [pid 13499] [remote 192.168.1.106:0] mod_wsgi (pid=13499): Exception occurred processing WSGI script '/home/pi/djangoProjects/pidjay/pidjay/wsgi.py'.
7 [Sun Apr 02 21:00:18.727938 2017] [wsgi:error] [pid 13499] [remote 192.168.1.106:0] Traceback (most recent call last):
8 [Sun Apr 02 21:00:18.729807 2017] [wsgi:error] [pid 13499] [remote 192.168.1.106:0] File "/home/pi/djangoProjects/pidjay/venv/lib/pyth on3.5/site-packages/django/db/backends/mysql/base.py", line 25, in <module>
9 [Sun Apr 02 21:00:18.729866 2017] [wsgi:error] [pid 13499] [remote 192.168.1.106:0] import MySQLdb as Database
10 [Sun Apr 02 21:00:18.730794 2017] [wsgi:error] [pid 13499] [remote 192.168.1.106:0] File "/home/pi/djangoProjects/pidjay/venv/lib/pyth on3.5/site-packages/MySQLdb/__init__.py", line 19, in <module>
11 [Sun Apr 02 21:00:18.730848 2017] [wsgi:error] [pid 13499] [remote 192.168.1.106:0] import _mysql
12 [Sun Apr 02 21:00:18.731024 2017] [wsgi:error] [pid 13499] [remote 192.168.1.106:0] ImportError: No module named '_mysql'
Now the config from sites-available folder:
<Directory /home/pi/djangoProjects/pidjay/pidjay>
<Files wsgi.py>
Require all granted
</Files>
</Directory>
WSGIDaemonProcess pidjay python-path=/home/pi/djangoProjects/pidjay:/home/pi/djangoProjects/pidjay/venv/lib/python3.5/site-packages
WSGIProcessGroup pidjay
WSGIScriptAlias / /home/pi/djangoProjects/pidjay/pidjay/wsgi.py
As You can see I specified the virtual env folder with a colon, other ways resulted in django being impossible to import. The python in the environment is ver 3.5 (checked twice), with sqlclient and django installed. When I try to import "_mysql" in python interpreter inside venv (activated) it works just fine.
This is databases setting from project's settings.py:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': "pidjay",
"USER": "user",
"PASSWORD": "password"
}}
And as I said it works on development server. Please help me with this and great thank You in advance! I will be happy to provide any additional info!
As pointed out above, this is one way to do it.
wget https://github.com/GrahamDumpleton/mod_wsgi/archive/4.5.14.tar.gz
tar -zxvf 4.5.14.tar.gz
cd mod_wsgi-4.5.14
./configure --with-python=/usr/bin/python3.5
make
make install
chmod 755 /usr/lib64/httpd/modules/mod_wsgi.so
The problem lied in version mismatch as Graham kindly pointed out. After compiling mod_wsgi for python 3.5 with with the help of official docs and loading it into apache it worked as expected.
OK: Not only is my WAMP Icon Red but I can't get anything to appear if I right or left click on it. Hovering over the icon I get "None of 2 services running - server off line".
I have
Installed VC C++ Redist from 2008 - 2015.
Uninstalled Skype.
Disabled World Wide Web Publishing Services.
Made sure my Host file had "127.0.0.1 localhost" and "::1 localhost" enabled.
Installed 32bit version of WAMP.
I would given changing the listening Ports a crack but not being able to click on the WAMP icon I wasn't confident enough to change the files in the folders (Eg. Found multiple copies of httpd.conf). Would have thought steps 2 and 3 would have made this unnecessary anyway.
If in Services, I manually start wampapache and wampmysql I can access localhost/phpmyadmin and localhost/domainfolder, set up databases, install wordpress, etc. Clearly something is going wrong and I'm sure it's destined to give me furthur grief. Any Ideas? I have included my error logs and a screen shot below with my system info.
"Apache_error_log"
[Thu May 05 13:17:27.453022 2016] [auth_digest:notice] [pid 8056:tid 120] AH01757: generating secret for digest authentication ...
[Thu May 05 13:17:27.484243 2016] [mpm_winnt:notice] [pid 8056:tid 120] AH00455: Apache/2.4.17 (Win32) PHP/5.6.15 configured -- resuming normal operations
[Thu May 05 13:17:27.484243 2016] [mpm_winnt:notice] [pid 8056:tid 120] AH00456: Apache Lounge VC14 Server built: Oct 11 2015 16:06:02
[Thu May 05 13:17:27.484243 2016] [core:notice] [pid 8056:tid 120] AH00094: Command line: 'C:\wamp\bin\apache\apache2.4.17\bin\httpd.exe -d C:/wamp/bin/apache/apache2.4.17'
[Thu May 05 13:17:27.484243 2016] [mpm_winnt:notice] [pid 8056:tid 120] AH00418: Parent: Created child process 6692
[Thu May 05 13:17:27.874894 2016] [auth_digest:notice] [pid 6692:tid 428] AH01757: generating secret for digest authentication ...
[Thu May 05 13:17:27.890536 2016] [mpm_winnt:notice] [pid 6692:tid 428] AH00354: Child: Starting 64 worker threads.
[Thu May 05 14:14:30.816395 2016] [authz_core:error] [pid 6692:tid 1100] [client 192.168.0.166:2569] AH01630: client denied by server configuration: C:/wamp/www/
[Thu May 05 14:30:49.331784 2016] [mpm_winnt:notice] [pid 8056:tid 120] AH00422: Parent: Received shutdown signal -- Shutting down the server.
[Thu May 05 14:30:51.363140 2016] [mpm_winnt:notice] [pid 6692:tid 428] AH00364: Child: All worker threads have exited.
[Thu May 05 14:30:53.144329 2016] [mpm_winnt:notice] [pid 8056:tid 120] AH00430: Parent: Child process 6692 exited successfully.
[Thu May 05 15:01:43.930134 2016] [auth_digest:notice] [pid 7168:tid 592] AH01757: generating secret for digest authentication ...
[Thu May 05 15:01:44.273944 2016] [mpm_winnt:notice] [pid 7168:tid 592] AH00455: Apache/2.4.17 (Win32) PHP/5.6.15 configured -- resuming normal operations
[Thu May 05 15:01:44.273944 2016] [mpm_winnt:notice] [pid 7168:tid 592] AH00456: Apache Lounge VC14 Server built: Oct 11 2015 16:06:02
[Thu May 05 15:01:44.273944 2016] [core:notice] [pid 7168:tid 592] AH00094: Command line: 'C:\wamp\bin\apache\apache2.4.17\bin\httpd.exe -d C:/wamp/bin/apache/apache2.4.17'
[Thu May 05 15:01:44.273944 2016] [mpm_winnt:notice] [pid 7168:tid 592] AH00418: Parent: Created child process 628
[Thu May 05 15:01:44.711410 2016] [auth_digest:notice] [pid 628:tid 492] AH01757: generating secret for digest authentication ...
[Thu May 05 15:01:44.805095 2016] [mpm_winnt:notice] [pid 628:tid 492] AH00354: Child: Starting 64 worker threads.
"Last 10 lines of PHP_error_log"
[05-May-2016 05:14:53 UTC] PHP Warning: fopen(C:/wamp/bin/apache/apache2.4.17/conf/httpd.conf): failed to open stream: Permission denied in C:\wamp\scripts\wampserver.lib.php on line 307
[05-May-2016 05:14:53 UTC] PHP Warning: fwrite() expects parameter 1 to be resource, boolean given in C:\wamp\scripts\wampserver.lib.php on line 308
[05-May-2016 05:14:53 UTC] PHP Warning: fclose() expects parameter 1 to be resource, boolean given in C:\wamp\scripts\wampserver.lib.php on line 309
[05-May-2016 05:14:54 UTC] PHP Warning: fopen(../wampmanager.ini): failed to open stream: Permission denied in C:\wamp\scripts\refresh.php on line 1205 [05-May-2016 05:14:54 UTC] PHP Warning: fwrite() expects parameter 1 to be resource, boolean given in C:\wamp\scripts\refresh.php on line 1206
[05-May-2016 05:14:54 UTC] PHP Warning: fclose() expects parameter 1 to be resource, boolean given in C:\wamp\scripts\refresh.php on line 1207 [05-May-2016 05:14:54 UTC] PHP Warning: unlink(C:/wamp/bin/apache/apache2.4.17/bin/icudt54.dll): Permission denied in C:\wamp\scripts\wampserver.lib.php on line 78
[05-May-2016 05:14:54 UTC] PHP Warning: symlink(): Cannot create symlink, error code(1314) in C:\wamp\scripts\wampserver.lib.php on line 81 [05-May-2016 05:14:54 UTC] PHP Warning: unlink(C:/wamp/bin/apache/apache2.4.17/bin/icuin54.dll): Permission denied in C:\wamp\scripts\wampserver.lib.php on line 78
[05-May-2016 05:14:54 UTC] PHP Warning: symlink(): Cannot create symlink, error code(1314) in C:\wamp\scripts\wampserver.lib.php on line 81 [05-May-2016 05:14:54 UTC] PHP Warning: unlink(C:/wamp/bin/apache/apache2.4.17/bin/icuio54.dll): Permission denied in C:\wamp\scripts\wampserver.lib.php on line 78
[05-May-2016 05:14:54 UTC] PHP Warning: symlink(): Cannot create symlink, error code(1314) in C:\wamp\scripts\wampserver.lib.php on line 81 [05-May-2016 05:14:54 UTC] PHP Warning: unlink(C:/wamp/bin/apache/apache2.4.17/bin/icule54.dll): Permission denied in C:\wamp\scripts\wampserver.lib.php on line 78
System Info
Did you install WAMPServer 3 as an Administrator, using the "Run as Administrator" as instructed in the install instructions.
The installer must be run "as an administrator"
If you did not, uninstall WAMPServer and then reinstall it doing this:
Right click on the installer .exe and select "Run as Administrator"
did you have any missing DLLs while installing wampserver?
I had the same problem and the solution was
close the wampserver tray (from task manager)
go Here and download the Visual C++ Redistributable for Visual Studio and install it.
now open Wamp as administrator
the problem should be gone by now (at least that was the solution for me)
Apache not running :
My xampp configuration for apache is changed to :
apache prot: 80 > 81
apache ssl port : 443 > 1378
apache run as administrator
before run xampp i'm stop IIS services and disable startup
MySQL is running but apache run in 1 sec and shutdown !!!
that is xampp log :
15:10:36 [Apache] Attempting to start Apache app...
15:10:36 [Apache] Status change detected: running
15:10:37 [Apache] Status change detected: stopped
15:10:37 [Apache] Error: Apache shutdown unexpectedly.
15:10:37 [Apache] This may be due to a blocked port, missing dependencies,
15:10:37 [Apache] improper privileges, a crash, or a shutdown by another method.
15:10:37 [Apache] Press the Logs button to view error logs and check
15:10:37 [Apache] the Windows Event Viewer for more clues
15:10:37 [Apache] If you need more help, copy and post this
15:10:37 [Apache] entire log window on the forums
and that's apache logs :
[Fri Mar 11 15:04:13.976216 2016] [ssl:warn] [pid 4052:tid 384] AH01909: www.example.com:1378:0 server certificate does NOT include an ID which matches the server name
[Fri Mar 11 15:04:14.085597 2016] [ssl:warn] [pid 4052:tid 384] AH01909: www.example.com:1378:0 server certificate does NOT include an ID which matches the server name
[Fri Mar 11 15:04:14.116853 2016] [mpm_winnt:notice] [pid 4052:tid 384] AH00455: Apache/2.4.18 (Win32) OpenSSL/1.0.2e PHP/7.0.4 configured -- resuming normal operations
[Fri Mar 11 15:04:14.116853 2016] [mpm_winnt:notice] [pid 4052:tid 384] AH00456: Apache Lounge VC14 Server built: Dec 9 2015 10:17:39
[Fri Mar 11 15:04:14.116853 2016] [core:notice] [pid 4052:tid 384] AH00094: Command line: 'c:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache'
[Fri Mar 11 15:04:14.116853 2016] [mpm_winnt:notice] [pid 4052:tid 384] AH00418: Parent: Created child process 4088
[Fri Mar 11 15:04:14.601248 2016] [ssl:warn] [pid 3280:tid 376] AH01909: www.example.com:1378:0 server certificate does NOT include an ID which matches the server name
[Fri Mar 11 15:04:14.710628 2016] [ssl:warn] [pid 3280:tid 376] AH01909: www.example.com:1378:0 server certificate does NOT include an ID which matches the server name
[Fri Mar 11 15:04:14.741882 2016] [mpm_winnt:crit] [pid 3280:tid 376] (OS 6)The handle is invalid. : AH00389: Child: Unable to access the scoreboard from the parent
[Fri Mar 11 15:04:14.741882 2016] [mpm_winnt:crit] [pid 4052:tid 384] AH00419: master_main: create child process failed. Exiting.
Please help me.
I'm trialling switching to Google Cloud SQL from hosting my own MySQL server for my django application. The application has been running with the same configuration (aside from the MySQL SSL certificates) against a Galera Cluster (also on GCE) for several weeks without the below problem.
I've set up my django application application on a Google Cloud Compute VM, and configured to point at my Cloud SQL instance. I've set up a load balancer (albeit with only 1 VM in the backend for the purposes of this experiment) with a https healthcheck pointing at the login page of my application (checks running every 5 seconds)
I've exported a copy of my database and loaded into Google Cloud SQL, created a user with access from a single IP address and restricted to enforce SSL connections only.
Everything appears to be working fine - I can log into the application and use it within normal parameters, however when I check the apache error logs, I can see intermittent django failures:
[Tue Dec 01 14:33:14.015189 2015] [:error] [pid 1890:tid 139827841804032] ERROR Internal Server Error: /accounts/login/
[Tue Dec 01 14:33:14.016202 2015] [:error] [pid 1890:tid 139827841804032] Traceback (most recent call last):
[Tue Dec 01 14:33:14.016380 2015] [:error] [pid 1890:tid 139827841804032] File "/home/myuser/.virtualenvs/myapp/lib/python3.4/site-packages/django/db/backends/base/base.py", line 130, in ensure_connection
[Tue Dec 01 14:33:14.016553 2015] [:error] [pid 1890:tid 139827841804032] self.connect()
[Tue Dec 01 14:33:14.016697 2015] [:error] [pid 1890:tid 139827841804032] File "/home/myuser/.virtualenvs/myapp/lib/python3.4/site-packages/django/db/backends/base/base.py", line 119, in connect
[Tue Dec 01 14:33:14.016884 2015] [:error] [pid 1890:tid 139827841804032] self.connection = self.get_new_connection(conn_params)
[Tue Dec 01 14:33:14.017138 2015] [:error] [pid 1890:tid 139827841804032] File "/home/myuser/.virtualenvs/myapp/lib/python3.4/site-packages/django/db/backends/mysql/base.py", line 276, in get_new_connection
[Tue Dec 01 14:33:14.017296 2015] [:error] [pid 1890:tid 139827841804032] conn = Database.connect(**conn_params)
[Tue Dec 01 14:33:14.017445 2015] [:error] [pid 1890:tid 139827841804032] File "/home/myuser/.virtualenvs/myapp/lib/python3.4/site-packages/opbeat/instrumentation/packages/base.py", line 131, in __call__
[Tue Dec 01 14:33:14.017604 2015] [:error] [pid 1890:tid 139827841804032] args, kwargs)
[Tue Dec 01 14:33:14.017739 2015] [:error] [pid 1890:tid 139827841804032] File "/home/myuser/.virtualenvs/myapp/lib/python3.4/site-packages/opbeat/instrumentation/packages/base.py", line 222, in call_if_sampling
[Tue Dec 01 14:33:14.017918 2015] [:error] [pid 1890:tid 139827841804032] return self.call(module, method, wrapped, instance, args, kwargs)
[Tue Dec 01 14:33:14.018156 2015] [:error] [pid 1890:tid 139827841804032] File "/home/myuser/.virtualenvs/myapp/lib/python3.4/site-packages/opbeat/instrumentation/packages/mysql.py", line 26, in call
[Tue Dec 01 14:33:14.018305 2015] [:error] [pid 1890:tid 139827841804032] return MySQLConnectionProxy(wrapped(*args, **kwargs))
[Tue Dec 01 14:33:14.018442 2015] [:error] [pid 1890:tid 139827841804032] File "/home/myuser/.virtualenvs/myapp/lib/python3.4/site-packages/newrelic-2.54.0.41/newrelic/hooks/database_dbapi2.py", line 102, in __call__
[Tue Dec 01 14:33:14.018593 2015] [:error] [pid 1890:tid 139827841804032] *args, **kwargs), self._nr_dbapi2_module, (args, kwargs))
[Tue Dec 01 14:33:14.018731 2015] [:error] [pid 1890:tid 139827841804032] File "/home/myuser/.virtualenvs/myapp/lib/python3.4/site-packages/MySQLdb/__init__.py", line 81, in Connect
[Tue Dec 01 14:33:14.018885 2015] [:error] [pid 1890:tid 139827841804032] return Connection(*args, **kwargs)
[Tue Dec 01 14:33:14.019087 2015] [:error] [pid 1890:tid 139827841804032] File "/home/myuser/.virtualenvs/myapp/lib/python3.4/site-packages/MySQLdb/connections.py", line 204, in __init__
[Tue Dec 01 14:33:14.019159 2015] [:error] [pid 1890:tid 139827841804032] super(Connection, self).__init__(*args, **kwargs2)
[Tue Dec 01 14:33:14.019312 2015] [:error] [pid 1890:tid 139827841804032] _mysql_exceptions.OperationalError: (2026, 'SSL connection error: unknown error number')
I am also using celery to run background tasks for the same application. These tasks all involve background manipulation of records through the django models. The celery logs show me that of 7951 tasks in the last hour, 57 have failed with the same 2026/SSL connection error: unknown error. I realise this is <1% error rate, but I won't settle for this when I don't know why it is happening!
Because the error is intermittent, I would have thought it is not a problem with the certificates or configuration (otherwise it would fail all the time?) - Any thoughts on what the problem might be? I don't want to make the switch whole heartedly knowing that as users that using the system that errors may reintroduce.