Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
bcl
Channel Surfer

Possible bug with hostname:port URL format

I'm finding some places where using http://hostname:port/ for referencing content isn't working. In other places it does. I need to track the usage back into the videoplayer app, but one such place is in the Category XML, like this:

<category title="Brian" description="Brian's Favorites" sd_img="http://wyatt.home:8888/movies/images/Brian.png" hd_img="http://wyatt.home:8888/movies/images/Brian.png">


Is this a known problem?

I'll add more details later tonight after I give the kids their bath 🙂
0 Kudos
4 REPLIES 4
Shlepzig
Newbie

Re: Possible bug with hostname:port URL format

I was able to direct the Categories XML document to local destinations succesfully.

I used the IP rather than a DNS lookup, and I did not specify the port number. I am using a bone stock plain Apache install in ubnuntu (desktop). The only modifications I have made to the Apache server is adding a couple path aliases.

<category title="Stuff" description="My Favorite Stuff" sd_img="http://192.168.1.2/Roku/images/Stuff.png" hd_img="http://192.168.1.2/Roku/images/Stuff.png">


My second experiment with the SDK was to rewrite the sample videoplayer app to stream all the content from local sources.

My choice to use the IP was simply for simplicity. I don't have DNS set up in the DHCP my home network, and it is so small, I can manage 10-20 static IP addresses for my computers and other devices and still have plenty left for dynamic IPs should I need them.

-Shlep[/code]
0 Kudos
bcl
Channel Surfer

Re: Possible bug with hostname:port URL format

Yeah, I have all of that working. The problem seems to be that some (but not all) url's suport adding the port number. I moved everything over to port 80 and it works fine.

The problem is that to run a server on port 80 (on unix any way) you need to be root -- or setup a firewall rule to redirect port 80 to the server port, which is what I ended up doing.
0 Kudos
Shlepzig
Newbie

DUH

I had a huge duh moment later after I posted that I hadn't fully considered the issue. Sorry about that.

I was later reading through the http functions, and the way the utilities functions handle parsing the xml utiltiies parse the xml data, and then hand it off to the http (url) utilities process the array object elements to pass them onto the internal web client. I didn't see anything that would make it handle a port call within the url any differently than a regular call.

It's possible that your server box is reserving port 8888 for another operation, or is listening for a particular protocol. The intermittent errors you are experiencing could be if a specific application is using it, and takes it now and again and then releases it later. The interwebs indicate that there are a number of programs that use that port. This is especially possible if the machine is not a dedicated sever.

The other option is that the Roku is reserving port 8888 (possibly for music streaming GNUmp3 is listed as using port 8888). Perhaps one of the Roku team can pipe in on any reserved ports within the Roku server setup.

As for the other, my understanding is that apache only needs to start in root, then you can control it as a user. My distro starts the apache server in the backgound at boot so it always running as root. I can control it as a user in an interface program or by co-opting it with sudo at the command line.

What is more interesting, is why are you enabling port control for the calls from the Roku?

-Shlep
0 Kudos
bcl
Channel Surfer

Re: Possible bug with hostname:port URL format

I'm not using Apache anymore. I'm working on a cross-platform solution and not everyone will want to (or be able to) run it on port 80 so I was trying to use an alternate port. On Un*x systems you have to be root to bind to a port below 1024, I'm not sure if the same is true on Windows or not.

The problem wasn't intermittent, and nothing else is using that port. Some requests from the roku would make it to the server, others wouldn't (eg. poster images failed, but XML requests worked).

Brian
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.