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: pet@… 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)

mythweb_error.txt (6.9 KB) - added by anonymous 14 years ago.
backtrace

Download all attachments as: .zip

Change History (29)

Changed 14 years ago by anonymous

Attachment: mythweb_error.txt added

backtrace

comment:1 Changed 14 years ago by sphery

Status: newinfoneeded_new

Did you actually upgrade MythWeb (and make sure you didn't leave any of the old MythWeb behind)? This is a dup of #7557.

comment:2 in reply to:  1 Changed 14 years ago by anonymous

Replying to mdean:

Did you actually upgrade MythWeb (and make sure you didn't leave any of the old MythWeb behind)? This is a dup of #7557.

Yes, the installed version is 0.22.0+fixes22594-0ubuntu1

comment:3 Changed 14 years ago by anonymous

I'm not exactly sure what 'didn't leave any of the old MythWeb behind' means but I tried to uninstall the MythWeb, re-installed it and it still does not work. The MythTv? itself works a-ok (one backendserver, one frontend) so the MythTv? setup is ok. What can I debug in order to make MythWeb work?

comment:5 in reply to:  4 ; Changed 14 years ago by 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

comment:6 in reply to:  5 Changed 14 years ago by anonymous

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 gwhodgson@…

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 Changed 14 years ago by gwhodgson@…

I have more details about this problem in this thread:

http://ubuntuforums.org/showthread.php?t=1342624

comment:9 in reply to:  8 ; Changed 14 years ago by anonymous

Replying to gwhodgson@…:

I have more details about this problem in this thread:

http://ubuntuforums.org/showthread.php?t=1342624

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 jtumblin@…

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 in reply to:  9 Changed 14 years ago by t1ger

Replying to anonymous:

Replying to gwhodgson@…:

I have more details about this problem in this thread:

http://ubuntuforums.org/showthread.php?t=1342624

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:12 Changed 14 years ago by xris

Status: infoneeded_newnew

did [22983] fix this?

comment:13 in reply to:  12 ; Changed 14 years ago by 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

comment:14 Changed 14 years ago by jtumblin

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 in reply to:  13 ; Changed 14 years ago by sphery

Priority: blockerminor
Severity: highmedium
Status: newinfoneeded_new
Version: unknown0.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 in reply to:  15 Changed 14 years ago by anonymous

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 Changed 14 years ago by 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?

comment:18 Changed 14 years ago by gwhodgson@…

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 in reply to:  17 Changed 14 years ago by anonymous

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 Changed 14 years ago by 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.

comment:21 in reply to:  20 Changed 14 years ago by anonymous

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 in reply to:  17 Changed 14 years ago by anonymous

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 Changed 14 years ago by jtumblin

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 in reply to:  23 Changed 14 years ago by anonymous

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 danielk

Resolution: invalid
Status: infoneeded_newclosed

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 newbury@…

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 gwhodgson@…

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 robertm

Ticket locked: set

What part of "please discuss elsewhere" was misunderstood?

Note: See TracTickets for help on using tickets.