Last modified: 2014-09-08 21:37:53 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T68588, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 66588 - "Unable to determine IP" error in phpsh
"Unable to determine IP" error in phpsh
Status: RESOLVED FIXED
Product: MediaWiki-Vagrant
Classification: Unclassified
General (Other open bugs)
unspecified
All All
: Unprioritized normal
: ---
Assigned To: Bryan Davis
:
: 67009 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-06-13 14:58 UTC by Matthew Flaschen
Modified: 2014-09-08 21:37 UTC (History)
6 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Matthew Flaschen 2014-06-13 14:58:33 UTC
I haven't determined where the underlying issue is yet, but starting phpsh gives an internal error, "Unable to determine IP":

---

<html><head><title>Internal error - devwiki</title><style>body { font-family: sans-serif; margin: 0; padding: 0.5em 2em; }</style></head><body>
<p>[7b2701b4] /usr/local/lib/python2.7/dist-packages/phpsh/phpsh.php   Exception from line 1123 of /vagrant/mediawiki/includes/WebRequest.php: Unable to determine IP.</p><p>Backtrace:</p><p>#0 /vagrant/mediawiki/includes/User.php(1934): WebRequest-&gt;getIP()<br />
#1 /vagrant/mediawiki/includes/db/Database.php(1024): User-&gt;getName()<br />
#2 /vagrant/mediawiki/includes/db/Database.php(1601): DatabaseBase-&gt;query(string, string)<br />
#3 [internal function]: DatabaseBase-&gt;select(string, string, array, string)<br />
#4 /vagrant/mediawiki/includes/db/LoadBalancer.php(1180): call_user_func_array(array, array)<br />
#5 /vagrant/mediawiki/includes/jobqueue/JobQueueDB.php(617): DBConnRef-&gt;__call(string, array)<br />
#6 /vagrant/mediawiki/includes/jobqueue/JobQueueDB.php(617): DBConnRef-&gt;select(string, string, array, string)<br />
#7 /vagrant/mediawiki/includes/jobqueue/JobQueue.php(666): JobQueueDB-&gt;doGetSiblingQueuesWithJobs(array)<br />
#8 /vagrant/mediawiki/includes/jobqueue/JobQueueGroup.php(284): JobQueue-&gt;getSiblingQueuesWithJobs(array)<br />
#9 /vagrant/mediawiki/includes/jobqueue/JobQueueGroup.php(265): JobQueueGroup-&gt;getQueuesWithJobs()<br />
#10 /vagrant/mediawiki/includes/Wiki.php(670): JobQueueGroup-&gt;queuesHaveJobs(integer)<br />
#11 /vagrant/mediawiki/includes/Wiki.php(463): MediaWiki-&gt;triggerJobs()<br />
#12 /vagrant/mediawiki/index.php(46): MediaWiki-&gt;run()<br />
#13 /etc/phpsh/rc.php(15): include_once(string)<br />
#14 /usr/local/lib/python2.7/dist-packages/phpsh/phpsh.php(60): require_once(string)<br />
#15 {main}</p>
</body></html>

---

Since it's database-related, I tried update.php, but that didn't fix it.
Comment 1 PiRSquared17 2014-06-17 22:52:20 UTC
Any idea how to get around it?
Comment 2 Bryan Davis 2014-06-23 23:01:35 UTC
Looks to be caused by I9541afa408d895c3fd337a883ecfe4ce0ba57090.
Comment 3 Bryan Davis 2014-06-23 23:05:35 UTC
Hack workaround is to run `REMOTE_ADDR=127.0.0.1 phpsh` so that WebRequest::getRawIP() will return an non-null value.
Comment 4 Bryan Davis 2014-06-23 23:14:26 UTC
*** Bug 67009 has been marked as a duplicate of this bug. ***
Comment 5 Gerrit Notification Bot 2014-08-20 00:44:46 UTC
Change 155174 had a related patch set uploaded by BryanDavis:
Set _SERVER['REMOTE_ADDR'] in cli mode

https://gerrit.wikimedia.org/r/155174
Comment 6 Gerrit Notification Bot 2014-08-21 02:52:20 UTC
Change 155174 merged by jenkins-bot:
Set _SERVER['REMOTE_ADDR'] in cli mode

https://gerrit.wikimedia.org/r/155174
Comment 7 Bryan Davis 2014-09-08 18:11:14 UTC
This fix was reverted in I288974f6cb8899862eccd6dba5a37adba101855e. Hopefully most people are using hhvm and not phpsh now.
Comment 8 Matthew Flaschen 2014-09-08 21:33:17 UTC
Somehow phpsh is still working for me (when zend role is enabled), albeit with:

---
subprocess died with return code: 0
PHP died. Restarting php
---

Not sure the cause of that bug.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links