upgrade 1.0.6 > 1.1.1 problem

Asked by kthamma

I used 1.0.6 server & 1.0.7 client everything is ok ..

Problem 1 (server and client on the same local network)
When I upgrade to 1.1.1 server and set xibo config to connect 1.1.1 server , when client run the client cannot get new xlf file from server and run only xibo screen ..

Problem 2 (server on internet) => http://htmdgw.dyndns.org:82/xibo-server-1.1.1
I cannot use this url to register display , have an error about SOAP and here is an error

SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://htmdgw.dyndns.org/xibo-server-1.1.1/xmds.php?wsdl' : failed to load external entity "http://htmdgw.dyndns.org/xibo-server-1.1.1/xmds.php?wsdl"

but when I used 1.0.6 this url http://htmdgw.dyndns.org:82/xibo-server-1.0.6 are OK ..
and now I cannot back to use 1.0.6 after upgrade to 1.1.1.... T_T

what 's wrong and how do I have to do next ^_^

Question information

Language:
English Edit question
Status:
Answered
For:
Xibo Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Alex Harrington (alexharrington) said :
#1

1. On your server machine, what do you get if you go to http://localhost/xibo-server-1.1.1/xmds.php?wsdl

2. I think this is likely to be the same problem as 1, just giving slightly different output. My suspicion is the new webservice code doesn't like running on a different port number.

The release notes for 1.1.1 clearly recommend you clone your 1.0.6 database and then upgrade the cloned database as 1.1.1 is still a development preview release and as such is likely to have major flaws. You should not be using it on a production system.

What you need to do is restore your 1.0.6 database from a backup, then install 1.0.6 server in to your xibo-server-1.0.6 server directory, copy back in your settings.php file from your 1.1.1 installation and then run the upgrade. It will realise you're upgrading from 1.0.6 to 1.0.6 and do a nil upgrade.

If you then want to try 1.1.1, then you should follow the instructions in the release notes by cloning your database, installing 1.1.1 in to a separate folder and then editing settings.php to use the cloned database before running the upgrade.

Alex

Revision history for this message
Alex Harrington (alexharrington) said :
#2

http://bazaar.launchpad.net/~xibo-maintainers/xibo/encke-lineendings/annotate/head%3A/server/lib/app/kit.class.php#L417

On Line 420 I'm going to take a punt and guess that the line should read:

return 'http://' . $_SERVER['SERVER_NAME'] . ':' . $_SERVER['SERVER_PORT'] . $request[0];

Also needs to be adjusted to check if $_SERVER['HTTPS'] is set and use HTTPS in that URL if it is - but that's not important here.

Can you change that line please in xibo-server-1.1.1/lib/app/kit.class.php and let me know what the result is.

Alex

Revision history for this message
Dan Garner (dangarner) said :
#3

I think Alex is right - it wants to be more like the code in the above
function (345 - 365).

Revision history for this message
kthamma (k-dhammarat) said :
#4

to Alex

when I try this URL http://localhost/xibo-server-1.1.1/xmds.php?wsdl I get a XML file show , you can try http://localhost/xibo-server-1.1.1/xmds.php?wsdl to see ..it 's the same

and when I changed the line 420 that you invite , It's still error same when client register ..

Thank you for your response .. this fine If cannot fix now, I will back to use 1.0.6 ^_^

Revision history for this message
kthamma (k-dhammarat) said :
#5
Revision history for this message
Alex Harrington (alexharrington) said :
#6

OK. So that's an improvement. Before that url was giving an error.

What message do you get now if you try and register a new client?

Alex

This email carries a disclaimer, a copy of which may be read at http://learning.longhill.org.uk/disclaimer

Revision history for this message
kthamma (k-dhammarat) said :
#7

This is error message after I change line 420 ..

SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://htmdgw.dyndns.org:82/xibo-server-1.1.1/xmds.php?wsdl' : failed to load external entity "http://htmdgw.dyndns.org:82/xibo-server-1.1.1/xmds.php?wsdl"

Revision history for this message
Alex Harrington (alexharrington) said :
#8

Can you set me up an administrative login on your xibo server and email the details to <email address hidden>

Thanks

Alex

Revision history for this message
Alex Harrington (alexharrington) said :
#9

From the server machine itself, can you get to http://htmdgw.dyndns.org:82/xibo-server-1.1.1/xmds.php?wsdl

It looks to me like we're telling the server to load the WSDL from there and it's failing to open the XML at that URL.

Alex

Revision history for this message
kthamma (k-dhammarat) said :
#10

Local network & server itself connected no need to set port 82 , it just use standard port .. if we use port 82 when connect itself it contain error cannect this page ..

Revision history for this message
kthamma (k-dhammarat) said :
#11

port 82 I just use for port forward when connect from internet . Forward port 82 to 80 ..

Revision history for this message
Alex Harrington (alexharrington) said :
#12

I'm sorry I don't understand.

The webservice doesn't know anything about how your local network is arranged. The Xibo server will try and get to the XML at http://htmdgw.dyndns.org:82/xibo-server-1.1.1/xmds.php?wsdl

Are you saying that it isn't possible for your server to get to that URL?

Revision history for this message
kthamma (k-dhammarat) said :
#13

My bad English too ..

http://htmdgw.dyndns.org:82/xibo-server-1.1.1/xmds.php?wsdl

from my server I cannot access that URL ..

Revision history for this message
kthamma (k-dhammarat) said :
#14

If I want to connect itself I have to use

http://192.168.1.11/xibo-server-1.1.1

or

http://127.0.0.1/xibo-server-1.1.1

with use standard port ..

Revision history for this message
Alex Harrington (alexharrington) said :
#15

So there I think is the problem.

I'll speak with Dan to see if it's necessary for it to work that way - or if the server can get that XML some other way.

Alex

Revision history for this message
Dan Garner (dangarner) said :
#16

Is your client on the local network or is it trying to address the server
from the internet?

Whichever URL is used to access the server will be the URL that serves the
WSDL - if your client connects from server:82/xmds.php?wsdl then the
resulting wsdl will contain :82, if your client connects from
server/xmds.php?wsdl then the resulting wsdl will contain the default port.

If your client is on the local network you will need to set the server
address in client config to: http://192.168.1.11/xibo-server-1.1.1/ .
If it is on the internet you will need to set it to:
http://htmdgw.dyndns.org:82/xibo-server-1.1.1/<http://htmdgw.dyndns.org:82/xibo-server-1.1.1/xmds.php?wsdl>

I am missing something!?!

Revision history for this message
Alex Harrington (alexharrington) said :
#17

You're missing something.

The server is listening only on port 80. There's then a NAT router that's doing port redirection from the outside.

When something is requested from XMDS, the server tries to setup the webservice by going to http://url:82/xibo-server-1.1.1/xmds.php?wsdl but it has no route to be able to do that, so we get that error message.

I need to talk to you about why the server is requesting that WSDL externally - rather than just passing it through internally as a string or something.

A

Revision history for this message
Dan Garner (dangarner) said :
#18

Ah I see...

The PHP SOAP implementation requires you to provide the URL of the WSDL when
you initialise a Soap Server. Because the location can effectively be
anywhere (depends where the user has installed their copy) I have to work it
out from the request.

The easiest solution would be to have the local server listen on port 82?

Revision history for this message
Alex Harrington (alexharrington) said :
#19

The constructor actually takes a local file name too - so there's no reason I can see that we can't write out a local file to initialise the service from?

I'm just thinking there are lots of scenarios - mainly where NAT is involved where the external address for the service will differ from the internal address with no easy way of reconsiling the two.

Alex

Revision history for this message
Dan Garner (dangarner) said :
#20

It's already a local file - however there is some processing that has to
happen when it is requested to fill in the port binding (i.e. the address of
the server). This is done every time it is requested (simple string
replacement).

I didn't want to write it to disk with the string replacement done as that
is bound to cause problems with people moving their site around.

I suppose I could write it to disk every single time xmds was called - that
seems a little clumsy.

Now if the SoapServer also took a string - then we would be cooking on
gas..... We can take this off-line and have a chat about it.

Revision history for this message
Alex Harrington (alexharrington) said :
#21

It doesn't take a string - only files or URLs. But I think it should take an Input Stream in filter mode:

http://php.net/manual/en/wrappers.php.php

If I/we can figure out the syntax it should be possible to point it directly to the static file on disk and have the {{}} tag replaced inline.

Alex

Revision history for this message
Luis Recuenco (luisrecuenco) said :
#22

I have installed the new version xibo-server-1.2 rc1 and we have the same problem using NAT in the router of ther server (from port 8001 to port 80). When we try to register a new player using the url http://217.125.40.4:8001/xibo, we obtain the next error message:

"SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://217.125.40.4:8001/xibo/xmds.php?wsdl' : failed to load external entity "http://217.125.40.4:8001/xibo/xmds.php?wsdl""

We have read in another post that this problem was fixed with the version 1.2 rc1. Can you help us? Thanks a lot.

Revision history for this message
Alex Harrington (alexharrington) said :
#23

The problem is fixed in so far as the server will now work on ports other than 80.

In your case, you need to make your webserver listen locally on port 8001 as well. When the client connects, the server tries to connect to the same address as the client is using to setup the webservice. If it can't get to that address, then you'll get the error you have now.

Alex

Revision history for this message
Alex Harrington (alexharrington) said :
#24

http://httpd.apache.org/docs/2.0/mod/mpm_common.html#listen

Instructions for configuring Apache to listen on more than one port.

Alex

Revision history for this message
Luis Recuenco (luisrecuenco) said :
#25

I've already changed /etc/apache2/ports.conf so as to listen to 8001 port, with no luck :(

By the way, is this something new in version 1.2 right? With 1.0.7 the was no need to do this and everything worked just flawlessly.

Any idea of how to accomplish this?

Looking forward to your quick reply. Getting the answer five seconds after I've posted the question is something that really blows me away :-).

Thanks 4 the great support

Luis

Revision history for this message
Alex Harrington (alexharrington) said :
#26

OK. Lets go back to first principles.

On the server machine, please use a webbrowser (either Firefox or IE if it's Windows/Linux with GUI or something like lynx or wget if Linux console) and go to http://217.125.40.4:8001/xibo/xmds.php?wsdl

What is served to you?

Alex

Revision history for this message
Luis Recuenco (luisrecuenco) said :
#27

Registered the Display on the Xibo Network The files required by the requesting display Gets the file requested Gets the schedule Recieves the Log Xml Set media to be blacklisted Submit Logging from the Client Submit Display statistics from the Client

Revision history for this message
Alex Harrington (alexharrington) said :
#28

You should get a load of xml. Are you sure you had the ?wsdl on the end of the URL?

Alex

This email carries a disclaimer, a copy of which may be read at http://learning.longhill.org.uk/disclaimer

Revision history for this message
Luis Recuenco (luisrecuenco) said :
#29

This is what I get within firefox. Any idea?

<definitions targetNamespace="urn:xmds">

<types>

<xsd:schema targetNamespace="urn:xmds">
<xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
<xsd:import namespace="http://schemas.xmlsoap.org/wsdl/"/>
</xsd:schema>
</types>

<message name="RegisterDisplayRequest">
<part name="serverKey" type="xsd:string"/>
<part name="hardwareKey" type="xsd:string"/>
<part name="displayName" type="xsd:string"/>
<part name="version" type="xsd:string"/>
</message>

<message name="RegisterDisplayResponse">
<part name="ActivationMessage" type="xsd:string"/>
</message>

<message name="RequiredFilesRequest">
<part name="serverKey" type="xsd:string"/>
<part name="hardwareKey" type="xsd:string"/>
<part name="version" type="xsd:string"/>
</message>

<message name="RequiredFilesResponse">
<part name="RequiredFilesXml" type="xsd:string"/>
</message>

<message name="GetFileRequest">
<part name="serverKey" type="xsd:string"/>
<part name="hardwareKey" type="xsd:string"/>
<part name="filePath" type="xsd:string"/>
<part name="fileType" type="xsd:string"/>
<part name="chunkOffset" type="xsd:int"/>
<part name="chuckSize" type="xsd:int"/>
<part name="version" type="xsd:string"/>
</message>

<message name="GetFileResponse">
<part name="file" type="xsd:base64Binary"/>
</message>

<message name="ScheduleRequest">
<part name="serverKey" type="xsd:string"/>
<part name="hardwareKey" type="xsd:string"/>
<part name="version" type="xsd:string"/>
</message>

<message name="ScheduleResponse">
<part name="ScheduleXml" type="xsd:string"/>
</message>

<message name="RecieveXmlLogRequest">
<part name="serverKey" type="xsd:string"/>
<part name="hardwareKey" type="xsd:string"/>
<part name="xml" type="xsd:string"/>
<part name="version" type="xsd:string"/>
</message>

<message name="RecieveXmlLogResponse">
<part name="success" type="xsd:boolean"/>
</message>

<message name="BlackListRequest">
<part name="serverKey" type="xsd:string"/>
<part name="hardwareKey" type="xsd:string"/>
<part name="mediaId" type="xsd:int"/>
<part name="type" type="xsd:string"/>
<part name="reason" type="xsd:string"/>
<part name="version" type="xsd:string"/>
</message>

<message name="BlackListResponse">
<part name="success" type="xsd:boolean"/>
</message>

<message name="SubmitLogRequest">
<part name="version" type="xsd:string"/>
<part name="serverKey" type="xsd:string"/>
<part name="hardwareKey" type="xsd:string"/>
<part name="logXml" type="xsd:string"/>
</message>

<message name="SubmitLogResponse">
<part name="success" type="xsd:boolean"/>
</message>

<message name="SubmitStatsRequest">
<part name="version" type="xsd:string"/>
<part name="serverKey" type="xsd:string"/>
<part name="hardwareKey" type="xsd:string"/>
<part name="statXml" type="xsd:string"/>
</message>

<message name="SubmitStatsResponse">
<part name="success" type="xsd:boolean"/>
</message>

<portType name="xmdsPortType">

<operation name="RegisterDisplay">
<documentation>Registered the Display on the Xibo Network</documentation>
<input message="tns:RegisterDisplayRequest"/>
<output message="tns:RegisterDisplayResponse"/>
</operation>

<operation name="RequiredFiles">
<documentation>The files required by the requesting display</documentation>
<input message="tns:RequiredFilesRequest"/>
<output message="tns:RequiredFilesResponse"/>
</operation>

<operation name="GetFile">
<documentation>Gets the file requested</documentation>
<input message="tns:GetFileRequest"/>
<output message="tns:GetFileResponse"/>
</operation>

<operation name="Schedule">
<documentation>Gets the schedule</documentation>
<input message="tns:ScheduleRequest"/>
<output message="tns:ScheduleResponse"/>
</operation>

<operation name="RecieveXmlLog">
<documentation>Recieves the Log Xml</documentation>
<input message="tns:RecieveXmlLogRequest"/>
<output message="tns:RecieveXmlLogResponse"/>
</operation>

<operation name="BlackList">
<documentation>Set media to be blacklisted</documentation>
<input message="tns:BlackListRequest"/>
<output message="tns:BlackListResponse"/>
</operation>

<operation name="SubmitLog">
<documentation>Submit Logging from the Client</documentation>
<input message="tns:SubmitLogRequest"/>
<output message="tns:SubmitLogResponse"/>
</operation>

<operation name="SubmitStats">
<documentation>Submit Display statistics from the Client</documentation>
<input message="tns:SubmitStatsRequest"/>
<output message="tns:SubmitStatsResponse"/>
</operation>
</portType>

<binding name="xmdsBinding" type="tns:xmdsPortType">
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>

<operation name="RegisterDisplay">
<soap:operation soapAction="urn:xmds#RegisterDisplay" style="rpc"/>

<input>
<soap:body use="encoded" namespace="urn:xmds" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</input>

<output>
<soap:body use="encoded" namespace="urn:xmds" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</output>
</operation>

<operation name="RequiredFiles">
<soap:operation soapAction="urn:xmds#RequiredFiles" style="rpc"/>

<input>
<soap:body use="encoded" namespace="urn:xmds" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</input>

<output>
<soap:body use="encoded" namespace="urn:xmds" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</output>
</operation>

<operation name="GetFile">
<soap:operation soapAction="urn:xmds#GetFile" style="rpc"/>

<input>
<soap:body use="encoded" namespace="urn:xmds" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</input>

<output>
<soap:body use="encoded" namespace="urn:xmds" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</output>
</operation>

<operation name="Schedule">
<soap:operation soapAction="urn:xmds#Schedule" style="rpc"/>

<input>
<soap:body use="encoded" namespace="urn:xmds" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</input>

<output>
<soap:body use="encoded" namespace="urn:xmds" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</output>
</operation>

<operation name="RecieveXmlLog">
<soap:operation soapAction="urn:xmds#RecieveXmlLog" style="rpc"/>

<input>
<soap:body use="encoded" namespace="urn:xmds" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</input>

<output>
<soap:body use="encoded" namespace="urn:xmds" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</output>
</operation>

<operation name="BlackList">
<soap:operation soapAction="urn:xmds#BlackList" style="rpc"/>

<input>
<soap:body use="encoded" namespace="urn:xmds" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</input>

<output>
<soap:body use="encoded" namespace="urn:xmds" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</output>
</operation>

<operation name="SubmitLog">
<soap:operation soapAction="urn:xmds#SubmitLog" style="rpc"/>

<input>
<soap:body use="encoded" namespace="urn:xmds" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</input>

<output>
<soap:body use="encoded" namespace="urn:xmds" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</output>
</operation>

<operation name="SubmitStats">
<soap:operation soapAction="urn:xmds#SubmitLog" style="rpc"/>

<input>
<soap:body use="encoded" namespace="urn:xmds" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</input>

<output>
<soap:body use="encoded" namespace="urn:xmds" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</output>
</operation>
</binding>

<service name="xmds">

<port name="xmdsPort" binding="tns:xmdsBinding">
<soap:address location="http://217.125.40.4:8001/xibo/xmds.php"/>
</port>
</service>
</definitions>

Revision history for this message
Alex Harrington (alexharrington) said :
#30

That's in Firefox on the server machine itself?

If so, that's absolutely right. I don't see why it should be failing then.

Alex

Revision history for this message
Luis Recuenco (luisrecuenco) said :
#31

That's from the outside. Within firefox on the server I get an error:

Firefox can't connect to 217.124.40.4:8001

Revision history for this message
Alex Harrington (alexharrington) said :
#32

> Firefox can't connect to 217.124.40.4:8001
>

In which case neither can our software running on your server.

That's what you need to fix.

One option would be to use a dynamic DNS provider to give your server a
DNS name (say myserver.dns.com).

Your clients should then connect to myserver.dns.com:8001.

On your server, add a record to it's local hosts file that points
myserver.dns.com to 127.0.0.1 or it's local IP address. Then when the
server tries to access itself at myserver.dns.com:8001, it will resolve
to the local address and work.

Alex

This email carries a disclaimer, a copy of which may be read at http://learning.longhill.org.uk/disclaimer

Revision history for this message
Luis Recuenco (luisrecuenco) said :
#33

Thank you so much. It really worked! :-)

Luis

Revision history for this message
Luis Recuenco (luisrecuenco) said :
#34

And last but not least...

I would like to help everyone out bumping into the same problem by telling that there is no need to make your webserver listen locally on port 8001 (in this case), rather, you can stick to port 80 cause this problem is solved by using a hostname pointing to your ip in /etc/hosts.

Thank you again

Luis

Revision history for this message
Alex Harrington (alexharrington) said :
#35

I don't think that's the case. The server will try and connect to itself using the same details as the client uses. So if the client is trying on port 8001 then the server should be too.

If it isn't, then that's a bug that needs to be addressed.

Alex

Revision history for this message
Luis Recuenco (luisrecuenco) said :
#36

That's not the case. I think there's been a misunderstanding. 8001 is the external port used by the router to use NAT and forward the request to the server running under a virtual machine. But the server keeps on waiting requests on port 80.

Revision history for this message
Alex Harrington (alexharrington) said :
#37

I understand your NAT setup.

What happens is your client connects to http://yourserver.com:8001/xmds.php

Xibo looks at the request and figures out that it's URL is http://yourserver.com:8001/ based on that request. As part of the webservice setup, it needs to access it's own WSDL file which is dynamically generated, so the SERVER will then open a connection to http://yourserver.com:8001/xmds.php?wsdl

If you're giving a local IP address in response to yourserver.com, then the server needs to be listening locally on port 8001 as well for the connection to be made.

Alex

Can you help with this problem?

Provide an answer of your own, or ask kthamma for more information if necessary.

To post a message you must log in.