{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/msphpsql/issues/805","repository_url":"https://api.github.com/repos/Microsoft/msphpsql","labels_url":"https://api.github.com/repos/Microsoft/msphpsql/issues/805/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/msphpsql/issues/805/comments","events_url":"https://api.github.com/repos/Microsoft/msphpsql/issues/805/events","html_url":"https://github.com/Microsoft/msphpsql/issues/805","id":335492829,"node_id":"MDU6SXNzdWUzMzU0OTI4Mjk=","number":805,"title":"Apache httpd times out, will not start, when SQLSRV enabled","user":{"login":"jamesmontalvo3","id":716482,"node_id":"MDQ6VXNlcjcxNjQ4Mg==","avatar_url":"https://avatars0.githubusercontent.com/u/716482?v=4","gravatar_id":"","url":"https://api.github.com/users/jamesmontalvo3","html_url":"https://github.com/jamesmontalvo3","followers_url":"https://api.github.com/users/jamesmontalvo3/followers","following_url":"https://api.github.com/users/jamesmontalvo3/following{/other_user}","gists_url":"https://api.github.com/users/jamesmontalvo3/gists{/gist_id}","starred_url":"https://api.github.com/users/jamesmontalvo3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamesmontalvo3/subscriptions","organizations_url":"https://api.github.com/users/jamesmontalvo3/orgs","repos_url":"https://api.github.com/users/jamesmontalvo3/repos","events_url":"https://api.github.com/users/jamesmontalvo3/events{/privacy}","received_events_url":"https://api.github.com/users/jamesmontalvo3/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":23,"created_at":"2018-06-25T17:08:16Z","updated_at":"2018-07-02T19:10:34Z","closed_at":null,"author_association":"NONE","body":"When `extension=sqlsrv.so` and `extension=pdo_sqlsrv.so` are enabled, Apache httpd will timeout and not start. This is occurring on one server, but I cannot replicate on two other servers. All servers are managed through the same Ansible scripts and should be very consistently built. I'm having trouble determining what is causing this issue. \r\n\r\nIf I run `sudo systemctl restart httpd`, then after 3 minutes (exactly), this error occurs:\r\n\r\n> Job for httpd.service failed because a fatal signal was delivered to the control process. See \"systemctl status httpd.service\" and \"journalctl -xe\" for details.\r\n\r\nRemoving file `/etc/php.d/20-sqlsrv.ini` results in the same problem. Reinstating `/etc/php.d/20-sqlsrv.ini` and instead removing `/etc/php.d/30-pdo_sqlsrv.ini` results in the same problem. Removing both allows Apache httpd to start normally.\r\n\r\nBelow I make reference to the \"Failing system\" which is showing this error and the \"Comparison system\" which is not seeing the error. I've also run the same setup on a VirtualBox CentOS setup and haven't seen the problem. I'm at a loss for how to determine why this one system will not work.\r\n\r\n## PHP Driver version or file name\r\n\r\n`php --re sqlsrv | head -1` gives:\r\n\r\nFailing system: `Extension [ <persistent> extension #43 sqlsrv version 5.2.0 ] {`\r\nComparison system: `Extension [ <persistent> extension #43 sqlsrv version 5.2.0 ] {`\r\n\r\n`php -re pdo_sqlsrv | head -1` gives:\r\n\r\nFailing system: `Extension [ <persistent> extension #56 pdo_sqlsrv version 5.2.0 ] {`\r\nComparison system: `Extension [ <persistent> extension #56 pdo_sqlsrv version 5.2.0 ] {`\r\n\r\n## SQL Server version\r\n\r\nN/A. Can't even get Apache to start. This exact setup has worked on Microsoft SQL Server 2016 without issue.\r\n\r\n## Client operating system\r\n\r\nFailing system: Red Hat Enterprise Linux Server release 7.5 (Maipo)\r\nComparison system: CentOS Linux release 7.5.1804 (Core)\r\n\r\n## PHP version\r\n\r\nFailing system: PHP 7.0.30 (cli) (built: Apr 26 2018 13:30:55) ( NTS )\r\nComparison system: PHP 7.0.30 (cli) (built: Apr 26 2018 13:30:35) ( NTS )\r\n\r\n## Microsoft ODBC Driver version\r\n\r\nDoing `yum info msodbcsql17` yields the following:\r\n\r\nFailing system:\r\n```\r\nInstalled Packages\r\nName        : msodbcsql17\r\nArch        : x86_64\r\nVersion     : 17.1.0.1\r\nRelease     : 1\r\nSize        : 17 M\r\nRepo        : installed\r\nFrom repo   : packages-microsoft-com-prod\r\nSummary     : ODBC Driver for Microsoft(R) SQL Server(R)\r\nLicense     : https://aka.ms/odbc170eula\r\nDescription : This package provides an ODBC driver that can connect to Microsoft(R) SQL Server(R).\r\n```\r\n\r\nComparison system:\r\n```\r\nInstalled Packages\r\nName        : msodbcsql17\r\nArch        : x86_64\r\nVersion     : 17.1.0.1\r\nRelease     : 1\r\nSize        : 17 M\r\nRepo        : installed\r\nFrom repo   : packages-microsoft-com-prod\r\nSummary     : ODBC Driver for Microsoft(R) SQL Server(R)\r\nLicense     : https://aka.ms/odbc170eula\r\nDescription : This package provides an ODBC driver that can connect to Microsoft(R) SQL Server(R).\r\n```\r\n\r\n## Table schema\r\n\r\nN/A\r\n\r\n## Problem description\r\n\r\nSee above.\r\n\r\n## Expected behavior and actual behavior\r\n\r\nExpected: Apache starts\r\nActual: Apache times out and fails\r\n\r\n## Repro code or steps to reproduce\r\n\r\nInstallation is managed by a set of Ansible scripts. Specifically:\r\n\r\n* Apache: https://github.com/enterprisemediawiki/meza/blob/31.x/src/roles/apache-php/tasks/main.yml\r\n* PHP: https://github.com/enterprisemediawiki/meza/blob/31.x/src/roles/apache-php/tasks/php.yml\r\n* PHP driver for MSSQL: https://github.com/enterprisemediawiki/meza/blob/master/src/roles/apache-php/tasks/mssql_driver_for_php.yml\r\n\r\n## Relevant logs\r\n\r\nAfter running `echo $(date) && sudo systemctl restart httpd` below are the relevant log files after the echoed time stamp `Mon Jun 25 11:46:25 CDT 2018`. Estimated failure time at 11:49:25 since it's been timing out 3 minutes after running `restart httpd`.\r\n\r\n### journalctl -xe output\r\n\r\n```\r\nJun 25 11:46:25 server-that-fails sudo[11948]: someusername : TTY=pts/0 ; PWD=/opt/data-meza/logs ; USER=root ; COMMAND=/bin/systemctl restart httpd\r\nJun 25 11:46:25 server-that-fails polkitd[843]: Registered Authentication Agent for unix-process:11949:21590202 (system bus name :1.983 [/usr/bin/pkttyagent --notify-fd 5 --fallback], object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8)\r\nJun 25 11:46:25 server-that-fails systemd[1]: Starting The Apache HTTP Server...\r\n-- Subject: Unit httpd.service has begun start-up\r\n-- Defined-By: systemd\r\n-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel\r\n--\r\n-- Unit httpd.service has begun starting up.\r\nJun 25 11:47:56 server-that-fails systemd[1]: httpd.service start operation timed out. Terminating.\r\nJun 25 11:49:26 server-that-fails systemd[1]: httpd.service stop-final-sigterm timed out. Killing.\r\nJun 25 11:49:26 server-that-fails systemd[1]: httpd.service: main process exited, code=killed, status=9/KILL\r\nJun 25 11:49:26 server-that-fails systemd[1]: Failed to start The Apache HTTP Server.\r\n-- Subject: Unit httpd.service has failed\r\n-- Defined-By: systemd\r\n-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel\r\n--\r\n-- Unit httpd.service has failed.\r\n--\r\n-- The result is failed.\r\nJun 25 11:49:26 server-that-fails systemd[1]: Unit httpd.service entered failed state.\r\nJun 25 11:49:26 server-that-fails systemd[1]: httpd.service failed.\r\nJun 25 11:49:26 server-that-fails polkitd[843]: Unregistered Authentication Agent for unix-process:11949:21590202 (system bus name :1.983, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8) (disconnected from bus)\r\n```\r\n### /var/log/secure\r\n\r\n```\r\nJun 25 11:46:25 server-that-fails sudo: someusername : TTY=pts/0 ; PWD=/opt/data-meza/logs ; USER=root ; COMMAND=/bin/systemctl restart httpd\r\nJun 25 11:46:25 server-that-fails polkitd[843]: Registered Authentication Agent for unix-process:11949:21590202 (system bus name :1.983 [/usr/bin/pkttyagent --notify-fd 5 --fallback], object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8)\r\nJun 25 11:49:26 server-that-fails polkitd[843]: Unregistered Authentication Agent for unix-process:11949:21590202 (system bus name :1.983, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8) (disconnected from bus)\r\n```\r\n\r\n### php error log\r\n\r\nNo entries from this time period\r\n\r\n### `/var/log/httpd/error_log`\r\n\r\nNote: Apache `LogLevel` set to `debug`.\r\n\r\n```\r\n[Mon Jun 25 11:46:25.959154 2018] [core:notice] [pid 11956] SELinux policy enabled; httpd running as context system_u:system_r:httpd_t:s0\r\n[Mon Jun 25 11:46:25.960487 2018] [suexec:notice] [pid 11956] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)\r\n[Mon Jun 25 11:46:25.960626 2018] [ssl:debug] [pid 11956] ssl_engine_pphrase.c(181): AH02199: SSL not enabled on vhost server-that-fails.example.com:80, skipping SSL setup\r\n[Mon Jun 25 11:46:25.960638 2018] [ssl:debug] [pid 11956] ssl_engine_pphrase.c(181): AH02199: SSL not enabled on vhost server-that-fails.example.com:8090, skipping SSL setup\r\n[Mon Jun 25 11:46:25.960646 2018] [ssl:debug] [pid 11956] ssl_engine_pphrase.c(181): AH02199: SSL not enabled on vhost MezaMainEntrypoint:80, skipping SSL setup\r\n[Mon Jun 25 11:46:25.960657 2018] [ssl:info] [pid 11956] AH01887: Init: Initializing (virtual) servers for SSL\r\n[Mon Jun 25 11:46:25.960689 2018] [ssl:info] [pid 11956] AH01876: mod_ssl/2.4.6 compiled against Server: Apache/2.4.6, Library: OpenSSL/1.0.2k\r\n[Mon Jun 25 11:46:25.991267 2018] [auth_digest:notice] [pid 11956] AH01757: generating secret for digest authentication ...\r\n[Mon Jun 25 11:46:25.991300 2018] [auth_digest:debug] [pid 11956] mod_auth_digest.c(250): AH01759: done\r\n[Mon Jun 25 11:46:25.992240 2018] [slotmem_shm:debug] [pid 11956] mod_slotmem_shm.c(448): AH02301: attach looking for /run/httpd/slotmem-shm-mod_heartmonitor.shm\r\n[Mon Jun 25 11:46:25.992260 2018] [lbmethod_heartbeat:notice] [pid 11956] AH02282: No slotmem from mod_heartmonitor\r\n[Mon Jun 25 11:46:25.992363 2018] [ssl:debug] [pid 11956] ssl_engine_pphrase.c(181): AH02199: SSL not enabled on vhost server-that-fails.example.com:80, skipping SSL setup\r\n[Mon Jun 25 11:46:25.992374 2018] [ssl:debug] [pid 11956] ssl_engine_pphrase.c(181): AH02199: SSL not enabled on vhost server-that-fails.example.com:8090, skipping SSL setup\r\n[Mon Jun 25 11:46:25.992381 2018] [ssl:debug] [pid 11956] ssl_engine_pphrase.c(181): AH02199: SSL not enabled on vhost MezaMainEntrypoint:80, skipping SSL setup\r\n[Mon Jun 25 11:46:25.992401 2018] [ssl:warn] [pid 11956] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]\r\n[Mon Jun 25 11:46:25.992408 2018] [ssl:info] [pid 11956] AH01887: Init: Initializing (virtual) servers for SSL\r\n[Mon Jun 25 11:46:25.992425 2018] [ssl:info] [pid 11956] AH01876: mod_ssl/2.4.6 compiled against Server: Apache/2.4.6, Library: OpenSSL/1.0.2k\r\n[Mon Jun 25 11:48:31.921182 2018] [core:warn] [pid 11956] AH00098: pid file /run/httpd/httpd.pid overwritten -- Unclean shutdown of previous Apache run?\r\n[Mon Jun 25 11:48:31.927498 2018] [mpm_prefork:notice] [pid 11956] AH00163: Apache/2.4.6 (Red Hat Enterprise Linux) OpenSSL/1.0.2k-fips PHP/7.0.30 configured -- resuming normal operations\r\n[Mon Jun 25 11:48:31.927531 2018] [mpm_prefork:info] [pid 11956] AH00164: Server built: Jan  8 2018 06:49:04\r\n[Mon Jun 25 11:48:31.927559 2018] [core:notice] [pid 11956] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'\r\n[Mon Jun 25 11:48:31.927577 2018] [mpm_prefork:debug] [pid 11956] prefork.c(1005): AH00165: Accept mutex: sysvsem (default: sysvsem)\r\n[Mon Jun 25 11:48:31.929526 2018] [proxy:debug] [pid 12376] proxy_util.c(1843): AH00925: initializing worker proxy:reverse shared\r\n[Mon Jun 25 11:48:31.929573 2018] [proxy:debug] [pid 12376] proxy_util.c(1885): AH00927: initializing worker proxy:reverse local\r\n[Mon Jun 25 11:48:31.929616 2018] [proxy:debug] [pid 12376] proxy_util.c(1936): AH00931: initialized single connection worker in child 12376 for (*)\r\n[Mon Jun 25 11:48:31.929832 2018] [proxy:debug] [pid 12377] proxy_util.c(1843): AH00925: initializing worker proxy:reverse shared\r\n[Mon Jun 25 11:48:31.929879 2018] [proxy:debug] [pid 12377] proxy_util.c(1885): AH00927: initializing worker proxy:reverse local\r\n[Mon Jun 25 11:48:31.929919 2018] [proxy:debug] [pid 12377] proxy_util.c(1936): AH00931: initialized single connection worker in child 12377 for (*)\r\n[Mon Jun 25 11:48:31.930093 2018] [proxy:debug] [pid 12374] proxy_util.c(1843): AH00925: initializing worker proxy:reverse shared\r\n[Mon Jun 25 11:48:31.930128 2018] [proxy:debug] [pid 12374] proxy_util.c(1885): AH00927: initializing worker proxy:reverse local\r\n[Mon Jun 25 11:48:31.930166 2018] [proxy:debug] [pid 12374] proxy_util.c(1936): AH00931: initialized single connection worker in child 12374 for (*)\r\n[Mon Jun 25 11:48:31.930791 2018] [proxy:debug] [pid 12378] proxy_util.c(1843): AH00925: initializing worker proxy:reverse shared\r\n[Mon Jun 25 11:48:31.930825 2018] [proxy:debug] [pid 12378] proxy_util.c(1885): AH00927: initializing worker proxy:reverse local\r\n[Mon Jun 25 11:48:31.930862 2018] [proxy:debug] [pid 12378] proxy_util.c(1936): AH00931: initialized single connection worker in child 12378 for (*)\r\n[Mon Jun 25 11:48:31.931137 2018] [proxy:debug] [pid 12379] proxy_util.c(1843): AH00925: initializing worker proxy:reverse shared\r\n[Mon Jun 25 11:48:31.931169 2018] [proxy:debug] [pid 12379] proxy_util.c(1885): AH00927: initializing worker proxy:reverse local\r\n[Mon Jun 25 11:48:31.931205 2018] [proxy:debug] [pid 12379] proxy_util.c(1936): AH00931: initialized single connection worker in child 12379 for (*)\r\n```\r\n\r\n## More info\r\n\r\n* SELinux is in \"permissive\" mode\r\n* Apache from `yum install httpd-devel`, PHP 7.0 from IUS repository\r\n"},"comment":{"url":"https://api.github.com/repos/Microsoft/msphpsql/issues/comments/401904823","html_url":"https://github.com/Microsoft/msphpsql/issues/805#issuecomment-401904823","issue_url":"https://api.github.com/repos/Microsoft/msphpsql/issues/805","id":401904823,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMTkwNDgyMw==","user":{"login":"jamesmontalvo3","id":716482,"node_id":"MDQ6VXNlcjcxNjQ4Mg==","avatar_url":"https://avatars0.githubusercontent.com/u/716482?v=4","gravatar_id":"","url":"https://api.github.com/users/jamesmontalvo3","html_url":"https://github.com/jamesmontalvo3","followers_url":"https://api.github.com/users/jamesmontalvo3/followers","following_url":"https://api.github.com/users/jamesmontalvo3/following{/other_user}","gists_url":"https://api.github.com/users/jamesmontalvo3/gists{/gist_id}","starred_url":"https://api.github.com/users/jamesmontalvo3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamesmontalvo3/subscriptions","organizations_url":"https://api.github.com/users/jamesmontalvo3/orgs","repos_url":"https://api.github.com/users/jamesmontalvo3/repos","events_url":"https://api.github.com/users/jamesmontalvo3/events{/privacy}","received_events_url":"https://api.github.com/users/jamesmontalvo3/received_events","type":"User","site_admin":false},"created_at":"2018-07-02T19:10:34Z","updated_at":"2018-07-02T19:10:34Z","author_association":"NONE","body":"Update: If I start Apache httpd manually (`sudo httpd -X`) rather than with systemd (`sudo systemctl start httpd`) then everything works. Pages are served, SQLSRV is able to query the MS SQL Server databases, etc. For some reason the presence of SQLSRV causes Apache to not start via systemd, though. Still toubleshooting. Any thoughts?"}}
{"actor":{"display_login":"jamesmontalvo3"}}