https://redmine.pfsense.org/https://redmine.pfsense.org/favicon.ico?16780521162011-05-30T14:04:26ZpfSense bugtrackerpfSense - Bug #1564: rc.stop_packages causes reboot to only works from SSH, not from Web interfacehttps://redmine.pfsense.org/issues/1564?journal_id=58692011-05-30T14:04:26ZScott Ullrichsullrich@gmail.com
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Feedback</i></li></ul><p>Cannot replicate this issue.</p> pfSense - Bug #1564: rc.stop_packages causes reboot to only works from SSH, not from Web interfacehttps://redmine.pfsense.org/issues/1564?journal_id=58712011-05-30T16:42:00ZPerry Masoncrazypark2@yahoo.dk
<ul></ul><p>I can confirm on snapshot May 30 11:53:52 nanobsd 4G when I remove rc.stop_packages <a class="external" href="https://github.com/bsdperimeter/pfsense/commit/a1b86994a0b2895d0d81fb12f680639bfc1d9b42">https://github.com/bsdperimeter/pfsense/commit/a1b86994a0b2895d0d81fb12f680639bfc1d9b42</a> I can reboot from gui</p> pfSense - Bug #1564: rc.stop_packages causes reboot to only works from SSH, not from Web interfacehttps://redmine.pfsense.org/issues/1564?journal_id=58722011-05-30T16:45:17ZScott Ullrichsullrich@gmail.com
<ul><li><strong>Status</strong> changed from <i>Feedback</i> to <i>New</i></li></ul> pfSense - Bug #1564: rc.stop_packages causes reboot to only works from SSH, not from Web interfacehttps://redmine.pfsense.org/issues/1564?journal_id=58762011-05-30T22:21:33Zlude ludekinckinc@gmail.com
<ul></ul><p>I can confirm that I have this issue using 2.0-RC2 (i386) Mon May 30 11:06:53.<br />Tried to reboot from reboot.php. Webgui was no longer responding. Logged in with ssh restarted the webCon. WebGUI would not respond. Rebooted from ssh.</p> pfSense - Bug #1564: rc.stop_packages causes reboot to only works from SSH, not from Web interfacehttps://redmine.pfsense.org/issues/1564?journal_id=58802011-05-31T00:21:02ZEvgeny Yurchenkoey@tm-k.com
<ul></ul><p>It seems that this is related to bug in php <a class="external" href="http://bugs.php.net/bug.php?id=11430">http://bugs.php.net/bug.php?id=11430</a> "Impossible to execute .php from inside .php by using exec()"</p>
<p>When I replaced<br /> + mwexec("/etc/rc.stop_packages");<br />in Ermal's commit with<br /> + include("/etc/rc.stop_packages");<br />the problem disappeared with stop_packages being executed first. If you are ok with this solution I can commit it.</p> pfSense - Bug #1564: rc.stop_packages causes reboot to only works from SSH, not from Web interfacehttps://redmine.pfsense.org/issues/1564?journal_id=58882011-05-31T10:33:05ZKarsten G
<ul></ul><p><a class="issue tracker-4 status-3 priority-4 priority-default closed" title="Todo: Don't sync on every filter reload (Resolved)" href="https://redmine.pfsense.org/issues/5">#5</a> Solution works for me as well, for me please commit ...</p> pfSense - Bug #1564: rc.stop_packages causes reboot to only works from SSH, not from Web interfacehttps://redmine.pfsense.org/issues/1564?journal_id=58912011-05-31T16:52:12ZBill Marquettebill.marquette@gmail.com
<ul></ul><p>The php.net bug is a decade old. While include() may 'fix' this, IMHO it really obfuscates what it's trying to do and I'm not sure it's the right fix. I also notice that the shebang line includes '-f' which seems a tad odd (and in most of our scripts so it's unlikely at issue), not sure where we picked that up from.</p>
<p>Does mwexec("/usr/local/bin/php -f /etc/rc.stop_packages"); work any better?</p> pfSense - Bug #1564: rc.stop_packages causes reboot to only works from SSH, not from Web interfacehttps://redmine.pfsense.org/issues/1564?journal_id=58942011-05-31T19:39:09ZChris Buechlercbuechler@gmail.com
<ul><li><strong>Subject</strong> changed from <i>Reboot only works from console/SSH but not from Web interface</i> to <i>Reboot only works from SSH but not from Web interface</i></li></ul><p>same from console menu option 5</p> pfSense - Bug #1564: rc.stop_packages causes reboot to only works from SSH, not from Web interfacehttps://redmine.pfsense.org/issues/1564?journal_id=58972011-06-01T00:08:49ZEvgeny Yurchenkoey@tm-k.com
<ul></ul><p>I've spent some time trying to understand why we get three processes rc.stop_packages after clicking reboot from gui:<br />[2.0-RC2][<a class="email" href="mailto:admin@pfsense.localdomain">admin@pfsense.localdomain</a>]/root(9): ps -eaxfj | grep stop_<br />ps: Process environment requires procfs(5)<br />root 17981 41684 17981 17981 0 Ss ?? 0:00.03 /usr/local/bin/php -f /etc/rc.stop_packages<br />root 18183 17981 17981 17981 0 S ?? 0:00.00 /usr/local/bin/php -f /etc/rc.stop_packages<br />root 18335 17981 17981 17981 0 S ?? 0:00.00 /usr/local/bin/php -f /etc/rc.stop_packages</p>
<p>Not being able to find reasonable explanation and after making sure the same call works perfectly when you run it from console I asked google. Note that the first process parents two others and this correlates very well with what is described in article mentioned above, this is why I thought that this is probably related to this bug in php.<br />BTW I could not find any other place in pfSense when we do similar call (/etc/rc.something from php).<br />Totally agree that include is very ugly 'solution' in this case, that is why I haven't tried to commit this 'fix'.<br />And finally - anyway we have to fix this (remove this call? write other function stopping packages?)</p> pfSense - Bug #1564: rc.stop_packages causes reboot to only works from SSH, not from Web interfacehttps://redmine.pfsense.org/issues/1564?journal_id=58982011-06-01T00:13:25ZEvgeny Yurchenkoey@tm-k.com
<ul></ul><p>Forgot to mention: mwexec("/usr/local/bin/php -f /etc/rc.stop_packages"); does not work either.</p> pfSense - Bug #1564: rc.stop_packages causes reboot to only works from SSH, not from Web interfacehttps://redmine.pfsense.org/issues/1564?journal_id=59052011-06-01T06:20:12ZWarren Bakerwarren@thepackethub.co.za
<ul></ul><p>Changing rc.stop_packages to a shell script works. Which is a small trivial change and the following works for me:</p>
<pre>
#!/bin/sh
/usr/local/bin/php -q <<ENDPHP
<?php
require_once("config.inc");
require_once("functions.inc");
require_once("filter.inc");
require_once("shaper.inc");
require_once("captiveportal.inc");
require_once("pkg-utils.inc");
require_once("pfsense-utils.inc");
require_once("service-utils.inc");
...
..
.
/* The rest of the current rc.stop_packages php code HERE */
?>
ENDPHP
</pre>
<p>I can commit this change, unless someone else sees a potential problem with this approach?</p> pfSense - Bug #1564: rc.stop_packages causes reboot to only works from SSH, not from Web interfacehttps://redmine.pfsense.org/issues/1564?journal_id=59072011-06-01T06:37:13ZErmal Luçieri@pfsense.org
<ul></ul><p>I will look at this a bit since its related to some other hangs that happen at times.</p> pfSense - Bug #1564: rc.stop_packages causes reboot to only works from SSH, not from Web interfacehttps://redmine.pfsense.org/issues/1564?journal_id=59492011-06-02T08:58:35ZJim Pingle
<ul></ul><p>For the moment I disabled the package stop on reboot.</p>
<p>Though after sleeping on it, I remembered a similar problem I hit before. I wonder if it's the same root cause as <a class="issue tracker-1 status-3 priority-4 priority-default closed" title="Bug: restore using GUI doesnt work (Resolved)" href="https://redmine.pfsense.org/issues/602">#602</a></p> pfSense - Bug #1564: rc.stop_packages causes reboot to only works from SSH, not from Web interfacehttps://redmine.pfsense.org/issues/1564?journal_id=59592011-06-02T17:23:24ZEvgeny Yurchenkoey@tm-k.com
<ul></ul><p>Just tested<br />exec("/etc/rc.reboot");<br />works ok. Probably because /etc/rc.reboot does not contain php code.</p> pfSense - Bug #1564: rc.stop_packages causes reboot to only works from SSH, not from Web interfacehttps://redmine.pfsense.org/issues/1564?journal_id=64562011-07-22T04:14:50ZPeter Baumann
<ul></ul><p>Just want to let you know that I use many pfSense 2.0-RC3 firewalls here for testing.<br />I use amd64 and i386 in XenServer vm and ALIX boards.<br />Today I had to do some config changes on all these firewalls and I tried to reboot the firewalls over the web interface, this was working without any problems.<br />At the moment I use</p>
<p>2.0-RC3 (amd64)<br />built on Thu Jul 21 22:37:35 EDT 2011</p>
<p>and</p>
<p>2.0-RC3 (i386)<br />built on Wed Jul 20 19:51:58 EDT 2011</p>
<p>Peter</p> pfSense - Bug #1564: rc.stop_packages causes reboot to only works from SSH, not from Web interfacehttps://redmine.pfsense.org/issues/1564?journal_id=65322011-07-28T15:40:16ZJim Pingle
<ul><li><strong>Subject</strong> changed from <i>Reboot only works from SSH but not from Web interface</i> to <i>rc.stop_packages causes reboot to only works from SSH, not from Web interface</i></li></ul><p>rc.stop_packages is currently disabled which is why reboots are still working now.</p>
<p>Since the upgrade to PHP 5.2.17 I figured it was worth trying this again, and I found that neither mwexec nor exec work for calling /etc/rc.stop_packages.</p>
<p>Warren's method from <a class="issue tracker-2 status-3 priority-4 priority-default closed" title="Feature: Allow multiple syslog servers (Resolved)" href="https://redmine.pfsense.org/issues/11">#11</a> works, that should be fine to do.</p> pfSense - Bug #1564: rc.stop_packages causes reboot to only works from SSH, not from Web interfacehttps://redmine.pfsense.org/issues/1564?journal_id=65332011-07-28T15:45:10ZJim Pingle
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Feedback</i></li><li><strong>% Done</strong> changed from <i>0</i> to <i>100</i></li></ul><p>Applied in changeset <a class="changeset" title="Rework rc.stop_packages a little. Fixes #1564" href="https://redmine.pfsense.org/projects/pfsense/repository/2/revisions/3e8fad13ae4a029fc6d872d87399f98f04a752cb">3e8fad13ae4a029fc6d872d87399f98f04a752cb</a>.</p> pfSense - Bug #1564: rc.stop_packages causes reboot to only works from SSH, not from Web interfacehttps://redmine.pfsense.org/issues/1564?journal_id=65342011-07-28T15:45:11ZJim Pingle
<ul></ul><p>Applied in changeset <a class="changeset" title="Rework rc.stop_packages a little. Fixes #1564" href="https://redmine.pfsense.org/projects/pfsense/repository/2/revisions/0124456b0c4d602adea538cee35fc67c977e9f2e">0124456b0c4d602adea538cee35fc67c977e9f2e</a>.</p> pfSense - Bug #1564: rc.stop_packages causes reboot to only works from SSH, not from Web interfacehttps://redmine.pfsense.org/issues/1564?journal_id=67122011-08-13T23:22:00ZChris Buechlercbuechler@gmail.com
<ul><li><strong>Status</strong> changed from <i>Feedback</i> to <i>Resolved</i></li></ul>