Logout problem - error message and re-login impossible

25Jan2011

I've installed MediaMosa latest stable release (v2.2.7) and everything is working so far: login as administrator, configuration, customization and so on. But a problem occurs during logout:
Browser reports something like this: "No stylesheet information is attached with this XML file ... tree view is shown" and in the browser window the following error message:

−<response>−
<header>
<item_count>0</item_count>
<item_count_total>0</item_count_total>
<item_offset>0</item_offset>
<request_class>mediamosa_rest_call_user_get</request_class>
<request_matched_method>GET</request_matched_method>
<request_matched_uri>/user/$user_id</request_matched_uri>
<request_process_time>0.022</request_process_time>
<request_result>error</request_result>
<request_result_description>Authenticate - access denied</request_result_description>
<request_result_id>1601</request_result_id>
<request_uri>[GET] user/logout</request_uri>
<version>2.2.7.1010</version>
</header>
<items/>
</response>

As a result of this error, I cannot re-login anymore with another user account (the login form doesn't show up), but only go back and continue work with the account I was logged in when the error occured. To re-login again, I have to delete the session cookie first.

So, what's going wrong??

Thanx, Dietmar

Comments

App interface

Dietmar,

This doesn't seem a bug. You probably have only one MediaMosa installation, and you used that as admin interface and app interface together.

You may change your settings. You can create an admin and an app interface separately on different urls. Then this problem will never happen again.

Re: App Interface - but WHERE???

Dear "Forgacs",

thank you for your response.

This my next and main problem: after installation you can log into the admin interface and play around with configuration etc., but there's no possibility to upload videos or do anything related to that - in contrast to the demo on the Mediamosa website where it is possible via "Add content - Mediamosa". I guess this also works only in a client website (what you call "app interface"?). But it's NOWHERE described how to setup a client website resp. "app interface" and connect it with Mediamosa... In the installation guide is described to create a new folder in the /sites subdirectory and copy and adapt the settings.php, but how can this work?? (it doesn't!!)

For explanation: I installed MM only for evaluation purposes on an Ubuntu virtual machine with LAMPP, so the main MM installation resides in .../htdocs/mediamosa and can accessed via localhost/mediamosa. Where do I have to put the client/app interface (in the /sites directory??), and how can it be and accessed via URL and connected to the main MM backend (via localhost/mediamosa/NAME or localhost/mediamosa/sites/NAME)? Do I have to set some symbolic links first in order to run the index.php in the MM root (and where)??

Sorry for my silly questions, I'm no IT expert... ;-)

MediaMosa

Dietmar,

"after installation you can log into the admin interface and play around with configuration etc., but there's no possibility to upload videos or do anything related to that"

MediaMosa is a video backend. If you want to upload videos, you need a video frontend application. Eg. WLE.
http://mediamosa.org/downloads

"in contrast to the demo on the Mediamosa website where it is possible via "Add content - Mediamosa". I guess this also works only in a client website (what you call "app interface"?)."

App interface is not the video frontend. App interface is "face" of MediaMosa, where the client applications can communicate with MediaMosa using REST calls.

"But it's NOWHERE described how to setup a client website resp. "app interface" and connect it with Mediamosa... In the installation guide is described to create a new folder in the /sites subdirectory and copy and adapt the settings.php, but how can this work?? (it doesn't!!)"

Ok. First of all your normal 1 server installation (without separating the interfaces) should work perfectly (except the logout problem).

If you really want to create an app server separately, please, follow the instruction in MediaMosa install profile. If you have any questions about this process, please, write me.

Bit more info...

Just to help you a bit with setting up a multi-site under Drupal 7 using one 'server' and WLE later in this comment.

Each interface (app, upload, download, job) is for Drupal just another website using the same Drupal installation. So in short; you are re-using your MediaMosa installation for more than one 'interface'. The admin is the main website and should be your default. So under sites/default is the administration website. Here you find settings.php. In this (default.)settings.php at the end you find 4 switches;

$conf['mediamosa_app'] = TRUE;
$conf['mediamosa_app_upload'] = TRUE;
$conf['mediamosa_app_download'] = TRUE;
$conf['mediamosa_admin'] = TRUE;

In the default setup, these are all TRUE. This will allow some basic testing and is only for testing. As you already noticed, this will give problems with the /user URI.

So for /sites/default/settings.php, turn all to FALSE except the $conf['mediamosa_admin'], keep that on TRUE. Now you have your admin.

Now under sites you'll find example URL's; sites/app1.mediamosa.local, sites/app2.mediamosa.local etc.

The start of each map basically tells you what it suppose to do. App/job interfaces are for executing REST calls. Upload and download are also REST interfaces, but are restricted to upload and download REST calls. This is required because these URLs are public for uploading and downloading content to and from MediaMosa.

You either rename the maps into the URL you use or leave them, that's up to you. If you would leave them, then http://app1.mediamosa.local will be your 1st REST interface. And http://job1.mediamosa.local/ will be your 1st job server. Now these maps have files called 'example.settings.php'. Copy these in the same map and call them 'settings.php'. These examples in each of these maps are already setup for the type of interfaces. So the example file in sites/job1.mediamosa.local already is setup for usage and renaming them will make them work.

Now you have setup Drupal for your basic 1 server setup. The reason we don't create a complete working 1 server version is that we don't recommend it. But for testing its just fine.

Now you need to edit your apache (or other website). This information is provided during the installation (run /install.php) you likely already did.

The only think left is to setup your hosts file so your different interfaces will work for testing. In linux this is found under /etc/hosts. Just add 127.0.0.1 app1.mediamosa.local and the other interfaces to this file. 127.0.0.1 is the localhost IP.

If you are using windows, then i recommend reading; http://helpdeskgeek.com/windows-7/windows-7-hosts-file/

After editing your hosts file, app1.mediamosa.local should be found now and resolve to the IP number you entered in the hosts file. You can test this by doing 'ping app1.mediamosa.local'. The IP number you see should be the one entered in your hosts file. Remember that the hosts file trick will only work on the PC where you do the request. So if your browser is on a 2nd PC, then that PC need its hosts file edited as well. But this time the IP number you enter is the IP number of the PC where your MediaMosa installtion is or else that PC will not be able to figure out the IP number.

My hosts file for testing looks like this;

127.0.0.1 mediamosa.local
127.0.0.1 app1.mediamosa.local
127.0.0.1 app2.mediamosa.local
127.0.0.1 job1.mediamosa.local
127.0.0.1 job2.mediamosa.local
127.0.0.1 upload.mediamosa.local
127.0.0.1 download.mediamosa.local

To setup WLE, you need to add another website beside mediamosa. So no adding to /sites/ of MediaMosa. WLE is a seperate website with its own www dir. If you have installed MediaMosa, you might have done this under /var/www/mediamosa. So WLE should be put in /var/www/wle.

WLE is setup also using the /install.php. After that you setup one client application under MediaMosa and then setup WLE VPX-connector (VPX is old name for MediaMosa). The URL you enter under VPX-Connector should be http://app1.mediamosa.local (or what ever you are using).

good luck and any questions, let us know.

WLE problem

I'm new to mediamosa and I must say it is not easy to setup the whole thing.

After installing mm 2.2.7 I followed your steps. Is it correct that I get the message 'Drupal already installed' when installing WLE? When I then go to http://mediamosa.local/wle/ I get a blank page.

When installing WLE I filled in the same database as I use for mediamosa. Isn't this correct?

I have created a client app in mediamosa, but WLE is not working to setup the VPX connector. Also wle/update.php results in a blank page.

WLE and MediaMosa is two

WLE and MediaMosa is two different Drupal installation, so you need two databases.

I have installed WLE and also

I have installed WLE and also upgraded Drupal for WLE. I was logged in as admin, but then I logged out and now I cannot log in anymore, I get always the Access denied message. There is no login field, only Browse videos.

Try

Try this:
http://wle/user
(You should change "wle" to the URI of your WLE.)

I have done a reinstall of

I have done a reinstall of WLE.

Now I get under VP-X connector settings after filling in username/password/URL:
Login test failed!

Do I also need a Mediamosa internal password ?

Maybe I have to

Maybe I have to change:
Allowed Master/Slave Apps No applications allowed.
in MediaMosa?

You don't have to allow

You don't have to allow master/slave.

You should create a client application in MediaMosa:
admin/mediamosa/config/app

Then you should fill the WLE connector:
User name (WLE) = Client application name (MediaMosa)
Password (WLE) = Shared key (MediaMosa)
URL (WLE) = URL of app server of your MediaMosa (eg. http://app1.mediamosa.local or http://mediamosa or http://app1.example.com)

Yes I did that and I use the

Yes I did that and I use the same values for username and password. I use the default app1.mediamosa.local directory and I have mapped app1.mediamosa.local to 127.0.0.1 in the hosts table.

Have you put http:// at the

Have you put http:// at the beginning of URL?

yes. When I browse site from

yes.

When I browse from another pc to the WLE site, I don't get the login field, is that normal behaviour?

.../wle/user does not exists. Do I need the clean URLs enabled? My Apache does not support it now.

It doesn't seem normal

It doesn't seem normal behavior.

Without clean URL:
http://wle/?q=user

Does it matter in this setup

Does it matter in this setup what I fill in for the URL as long as it resolves to 127.0.0.1?

If you load this page, what

If you load this page, what do you see?
http://127.0.0.1

It should be an XML response, like this:

<?xml version="1.0" encoding="UTF-8"?>
<response>
<header>
<item_count>0</item_count>
<item_count_total>0</item_count_total>
<item_offset>0</item_offset>
<request_process_time>0.0923</request_process_time>
<request_result>error</request_result>
<request_result_description>Page not found: admin/mediamosa (method: -, parameters: -)</request_result_description>
<request_result_id>404</request_result_id>
<request_uri>[GET] /</request_uri>
<version>2.4.0.1504</version>
<request_query_count>1</request_query_count>
</header>
<items/>
</response>

Then you can use http://127.0.0.1.
Same with other URIs.

No then I get: Index of /

No then I get:

Index of /

* mediamosa/
* test.php
* wle/

After installation of mediamosa and before installation of wle I moved the content of /www to /www/mediamosa
Obviously something is messed up now?

Probably your app

Probably your app is:
http://127.0.0.1/mediamosa

You can reinstall your MediaMosa, or you must check your server and other settings:
admin/mediamosa/config
admin/mediamosa/config/server
...

http://127.0.0.1/mediamosa

http://127.0.0.1/mediamosa results in the login page of my mediamosa, that is also what I expect. I don't understand how you get the XML response. I only get that after log out from mediamosa, just like the original poster of this topic wrote.

I mean before I installed WLE

I mean before I installed WLE I got that XML response when logging out from mediamosa.

Reinstalled mediamosa but

Reinstalled mediamosa but still the same problem.

MediaMosa:
MediaMosa client application WLE has been created.
Submitted by admin on Tue, 03/08/2011 - 18:32
Parameter Value
Name WLE
Application ID 16
Quota 40
Shared Key mmwle
Default time zone Europe/Amsterdam
Description
Status Enabled
REST call version LATEST
Owner
Allowed Master/Slave Apps No applications allowed.
Created 03/08/2011 - 18:32
Changed 03/08/2011 - 18:32

WLE:
VP-X connector settings
Login test failed!
The configuration options have been saved.
Connection settings
Username: WLE
Password: mmwle
URL: http://app1.mediamosa.local

I think the problem is the virtual host configuration or doesn't that matter since I work locally? Maybe the hosts table is wrong? http://app1.mediamosa.local/ results in the index with mediamosa and wle as subdirs, but I should get an XML response?

A part of the virtualhoist config:
( I have created a /etc/httpd/conf.d/mediamosa.local.conf (I have RHEL5))

ServerName app1.mediamosa.local/mediamosa.local
ServerAdmin eval(unescape('%64%6f%63%75%6d%65%6e%74%2e%77%72%69%74%65%28%27%3c%61%20%68%72%65%66%3d%22%6d%61%69%6c%74%6f%3a%77%65%62%6d%61%73%74%65%72%40%6d%65%64%69%61%6d%6f%73%61%2e%6c%6f%63%61%6c%22%3e%77%65%62%6d%61%73%74%65%72%40%6d%65%64%69%61%6d%6f%73%61%2e%6c%6f%63%61%6c%3c%2f%61%3e%27%29%3b'))/mediamosa.local
DocumentRoot /www/mediamosa

Options FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all

ErrorLog /var/log/apache2/app1.mediamosa.local/mediamosa_error.log
CustomLog /var/log/apache2/app1.mediamosa.local/mediamosa_access.log combined
ServerSignature On

Your admin and app interface

Your admin and app interface is probably common.
You can check your app interface with this URI:
http://127.0.0.1/mediamosa/version
(It gives back the version number of your MediaMosa in XML format.)
Then your app interface is:
http://127.0.0.1/mediamosa

If you install your MediaMosa, then you have two possibility:
You can create a standalone MediaMosa version (like you). Then all interfaces are on the same (local)host.
Or you can create vhosts with your apache. I suggest you try this.
When you install your MediaMosa with the MediaMosa install profile, you get instructions, how you can set up your application.

If you want to I can send you my vhost file. And you can check / use the VM image of MediaMosa:
http://mediamosa.org/content/vm-image

It works! After changing some

It works!

After changing some virtual host settings the interfaces work properly by returning the XML responses.

However, I still could not connect. Then I read this topic: http://www.mediamosa.org/node/245447
I had to recompile Apache to enable the mod_rewrite module. Then I could enable the clean URLs and make the VPX connection.

So it seems that clean URLs have to be enabled.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.