Opened 14 years ago
Closed 14 years ago
Last modified 14 years ago
#7561 closed defect (invalid)
Mythweb stopped working after Ubuntu 9.04 -> 9.10 upgrade
Reported by: | Owned by: | Rob Smith | |
---|---|---|---|
Priority: | minor | Milestone: | unknown |
Component: | Plugin - MythWeb | Version: | 0.22-fixes |
Severity: | medium | Keywords: | |
Cc: | Ticket locked: | yes |
Description
Following errormessage is shown:
datetime: 2009-11-13 21:59:25 (EET)
errornum: 256
error type: User Error
error string: MasterServerIP or MasterServerPort? not found! You mayneed to check your settings.php file or re-run mythtv-setup
filename: /usr/share/mythtv/mythweb/classes/MythBackend.php
error line: 45
Attachments (1)
Change History (29)
Changed 14 years ago by
Attachment: | mythweb_error.txt added |
---|
comment:2 Changed 14 years ago by
comment:3 Changed 14 years ago by
comment:5 follow-up: 6 Changed 14 years ago by
Replying to mdean:
See http://www.gossamer-threads.com/lists/mythtv/dev/407636#407636
a) MythTV is configured, it works just fine, both the backend and a separate frontend b) mysqlcheck -r returns OK for all the tables c) the config.xml is correctly configured
I was not trying to access streaming, the error comes when accessing the mythweb home page (http://<hostname>/mythweb)
- Petri
comment:6 Changed 14 years ago by
Replying to anonymous:
Replying to mdean:
See http://www.gossamer-threads.com/lists/mythtv/dev/407636#407636
a) MythTV is configured, it works just fine, both the backend and a separate frontend b) mysqlcheck -r returns OK for all the tables c) the config.xml is correctly configured
I was not trying to access streaming, the error comes when accessing the mythweb home page (http://<hostname>/mythweb)
- Petri
When I hardcoded both the $port and $host in /usr/share/mythtv/mythweb/classes/MythBackend.php I got the mythweb (almost working) so the problem lies somewhere fetching the backend server name and port. I lack competence in debugging this any more deeply.
comment:7 Changed 14 years ago by
I am having the same problem following the upgrade to 0.22. I've checked all of the above, and I can't find the problem. Without tracing the problem back through the code, all I can surmise is that mythweb is somehow not getting its connection to the database. Everything else is working.
comment:8 follow-up: 9 Changed 14 years ago by
I have more details about this problem in this thread:
comment:9 follow-up: 11 Changed 14 years ago by
Replying to gwhodgson@…:
I have more details about this problem in this thread:
This is how I got it (partially) working:
- modified the classes/MythBackend.php so that instead of assigning $host and $port through setting(), they are directly set to ip-address and port number
- modified modules/status/handler.php and hardcoded $masterhost and $statusport to localhost and 6544
Would someone please explain from which files the values above are supposedly taken from and provide an example content of the files?
My config.xml and mysql.txt in $HOME/.mythtv directory are links to the files in /etc/mythtv -directory having correct values for the relevant fields.
/etc/apache2/sites-enabled/mythweb.conf also has the correct db name, server, login, and password values
comment:10 Changed 14 years ago by
I have a similar problem. I am running Fedora 10 I ran the yum updates the other day and now I am running mythweb-0.22-222.fc10.i386, it works ok except when I try to schedule a recording I am getting
Forbidden
You don't have permission to access /mythweb/tv/detail/1005/1260475200 on this server.
It was working fine before the upgrade.
comment:11 Changed 14 years ago by
Replying to anonymous:
Replying to gwhodgson@…:
I have more details about this problem in this thread:
This is how I got it (partially) working:
- modified the classes/MythBackend.php so that instead of assigning $host and $port through setting(), they are directly set to ip-address and port number
- modified modules/status/handler.php and hardcoded $masterhost and $statusport to localhost and 6544
Would someone please explain from which files the values above are supposedly taken from and provide an example content of the files?
My config.xml and mysql.txt in $HOME/.mythtv directory are links to the files in /etc/mythtv -directory having correct values for the relevant fields.
/etc/apache2/sites-enabled/mythweb.conf also has the correct db name, server, login, and password values
Thanks man!
Here how I modified.
... // Looking for the master backend? if (is_null($host)) { $host = 'localhost'; $port = '6543'; ....
comment:13 follow-up: 15 Changed 14 years ago by
comment:14 Changed 14 years ago by
I resolved my issue. When I ran the upgrades I also upgraded mod_security which installs with a default deny rule once I changed deny to pass it started working as designed. I found this link which helped me.
https://lists.owasp.org/pipermail/owasp-modsecurity-core-rule-set/2009-August/000032.html
Hope this helps.
JT
comment:15 follow-up: 16 Changed 14 years ago by
Priority: | blocker → minor |
---|---|
Severity: | high → medium |
Status: | new → infoneeded_new |
Version: | unknown → 0.22-fixes |
Replying to anonymous:
Replying to xris:
did [22983] fix this?
No, it did not help.
Is anyone capable of creating a short wrapper script that would use the mythweb definitions and print out:
- from which file(s) the hostname and db port read attempts are made
- the values that are read from the file(s) above
Note, also, that [22983] was applied to trunk, only, so if you're using 0.22-fixes, you'll need to apply the same changes (click the Unified Diff download link) to your local install of MythWeb.
Does either applying those changes or using the above-linked changes to modsecurity fix the issue for others who have experienced the issue?
comment:16 Changed 14 years ago by
Replying to mdean:
Note, also, that [22983] was applied to trunk, only, so if you're using 0.22-fixes, you'll need to apply the same changes (click the Unified Diff download link) to your local install of MythWeb.
I made the changes of [22983] by hand, removed my hardcoded addresses, restarted apache and checked. Did not help.
Does either applying those changes or using the above-linked changes to modsecurity fix the issue for others who have experienced the issue?
I could not figure out what really should be configured for the modsecurity fix as there is no file named modsecurity_crs_49_enforcement.conf anywhere in my system so I can not verify whether that would help or not.
comment:17 follow-ups: 19 22 Changed 14 years ago by
If everything is configured correctly then it is not Mythweb's problem. You are not getting a connection to the database. Can you post a Tail of the http error log that shows the steps where Mythweb fails?
comment:18 Changed 14 years ago by
I have nothing in the error logs regarding mythweb at all. I see the usual hits to the skins and other files in the access logs. Should I be turning up error reporting or something?
comment:19 Changed 14 years ago by
Replying to jtumblin:
If everything is configured correctly then it is not Mythweb's problem. You are not getting a connection to the database. Can you post a Tail of the http error log that shows the steps where Mythweb fails?
There is no errormessage in Apache's log(s). The framework of the Mythweb works but the frame in which the basic page (by accessing <hostname>/mythweb) returns the errormessage described in the 1st message of this chain.
comment:20 follow-up: 21 Changed 14 years ago by
There has to be something in the httpd/error_log of the Mythweb server because you are generating an error message. If you could post some of the log entries here maybe I can make a suggestion that will get your box fixed. The error_log should be a seperate log located in the directory with the access log.
comment:21 Changed 14 years ago by
Replying to Jtumblin:
There has to be something in the httpd/error_log of the Mythweb server because you are generating an error message. If you could post some of the log entries here maybe I can make a suggestion that will get your box fixed. The error_log should be a seperate log located in the directory with the access log.
No there is not. Only entries in /var/log/apache2/error.log are about restarting the apache: [Tue Dec 22 16:46:29 2009] [notice] caught SIGTERM, shutting down [Tue Dec 22 16:46:30 2009] [notice] Apache/2.2.12 (Ubuntu) PHP/5.2.10-2ubuntu6.3 with Suhosin-Patch configured -- resuming normal operations
comment:22 Changed 14 years ago by
Replying to jtumblin:
If everything is configured correctly then it is not Mythweb's problem. You are not getting a connection to the database. Can you post a Tail of the http error log that shows the steps where Mythweb fails?
Yes I know the problem is the database connection as stated above:
--- clip ---
This is how I got it (partially) working:
- modified the classes/MythBackend.php so that instead of assigning $host and $port through setting(), they are directly set to ip-address and port number
- modified modules/status/handler.php and hardcoded $masterhost and $statusport to localhost and 6544
Would someone please explain from which files the values above are supposedly taken from and provide an example content of the files?
My config.xml and mysql.txt in $HOME/.mythtv directory are links to the files in /etc/mythtv -directory having correct values for the relevant fields.
/etc/apache2/sites-enabled/mythweb.conf also has the correct db name, server, login, and password values
--- clip ---
So the mytbackend itself works properly. Another PC configured as a standalone mythfrontend gets the connection to backend properly. As soon as the hardcoded entries above are used, also mythweb can access the system properly. It just does not read correct values from the configuration files.
comment:23 follow-up: 24 Changed 14 years ago by
How do you know it is not read the correct values from the config files? Do you see some pages or just blanks?
comment:24 Changed 14 years ago by
Replying to jtumblin:
How do you know it is not read the correct values from the config files? Do you see some pages or just blanks?
Well I know it because IF I HARDCODE THE VALUES DEFINED IN THE CONFIG FILES AS DESCRIBED ABOVE THEN THE SYSTEM WORKS. If I used the non-modified mythweb php files, the mythweb main page has the mythweb framework but the 'main frame' has the backtrace
When the MythBackend?.php is configured with hardcoded $host and $port values, the mythweb works except the backend status -page which works when the modules/status/handler.php is modified with hardcoded $masterhost and $statusport values.
comment:25 Changed 14 years ago by
Resolution: | → invalid |
---|---|
Status: | infoneeded_new → closed |
Please discuss elsewhere, whatever the problem it is not yet well understood to file a bug report and spam all developers and mythtv trunk users with the discussion.
comment:26 Changed 14 years ago by
This is not solely Ubuntu problem. Happens with Fedora 10, svn trunk 23401, too. Long time myth BE/FE, decided to use Mythweb. Same error, same fix (hardcoding values). Note, I have no file called settings.php. Is it that file which does the query which we side-step by hardcoding?
comment:27 Changed 14 years ago by
Modifying classes/MythBackend.php and modules/status/handler.php worked for me as well. But, as I was playing around with trying to figure out what is wrong, I decided to look at the mythconverg.settings table. I noticed lots of entries with NULL hostnames, but none that defined the three values that were needed to be hardcoded above.
So, I inserted the rows like so:
insert into settings (value, data) VALUES ('BackendStatusPort?', '6544'); insert into settings (value, data) VALUES ('MasterServerPort?', '6543'); insert into settings (value, data) VALUES ('MasterServerIP', '<my_ip_address>);
I removed the localmodded files, and voila! It works!
As far as I can tell, that fixed all the issues with it erroring out.
I am not convinced this is the "correct" fix, as I am not sure why we would need to rely on 'NULL' hostname values, but if it works, it works.
comment:28 Changed 14 years ago by
Ticket locked: | set |
---|
What part of "please discuss elsewhere" was misunderstood?
backtrace