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: 
renojim
Community Streaming Expert

Re: My Media - Your Music and Video on the Roku DVP

"writerguy" wrote:
However, when I went to http://192.168.0.101:8001 , I got the FIrefox "Unable to connect" screen, telling me: "Firefox can't establish a connection to the server at 192.168.0.101:8001."

Digging deep into my very shallow knowledge of coding, Internet, etc., Smiley LOL , I suspect the port 8001 is being used somehow by something else. Would that be likely? If so, would you have a suggestion about what I should do? Something I should edit, a different port in the storm, etc.?

Hmm... Just to be sure, you are running mymedia.bat and then leaving the window open, right? It doesn't seem likely that port 8001 is being used, but I guess it's possible. I'm not as familiar with the server as I am with the channel so I don't know if it would complain about the port being in use.

I just discovered a new command that will list the ports in use. At the command line, or just from the start menu search box, type netstat -a. It will list the ports in use. On my Windows 7 machine with MyMedia running I see one line with:
TCP 0.0.0.0:8001 JTs_machine:0 LISTENING

Of course, without the MyMedia server running that line doesn't appear.

So I guess first try netstat without MyMedia running and see if you see 8001 anywhere. Then run mymedia.bat and see if port 8001 shows up.

Also, since you've been at this for a while, run Task Manager (either run taskmgr from the command line or the Start menu or press Ctrl-Alt-Delete and run it from there) and click on the Processes tab and see if you have any "python" tasks running. If you don't think the server is running, then there probably shouldn't be any python tasks. Feel free to click on any you see and then click on "End Process".

-JT
Roku Community Streaming Expert

Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.

I am not a Roku employee.
0 Kudos
Phil65
Visitor

Re: My Media - Your Music and Video on the Roku DVP

"renojim" wrote:
You should be leaving the channel on the registration screen when you go to register at appspot.com If the registration was successful, the channel should automatically go to the main screen. If the registration fails for some reason, which some people have had happen, there is a workaround by editing config.ini and entering the regid there.

-JT


I'm afraid that it's still not working for me, including the config.ini workaround. I'm just stuck on the registration screen in an endless loop. Is there a particular part of the config.ini where I should enter the code? I'm not sure why I can never get things to work when it seems so easy for others. Any suggestions?

Added: the other thing that confuses me is that when I click on "Configure your server" there doesn't seem anything to "configure". I just get a series of links like "My media", etc. (I tried to include a screenshot, but naturally I can't make it work). Am I missing something?
0 Kudos
writerguy
Visitor

Re: My Media - Your Music and Video on the Roku DVP

"renojim" wrote:
... Hmm... Just to be sure, you are running mymedia.bat and then leaving the window open, right? It doesn't seem likely that port 8001 is being used, but I guess it's possible. I'm not as familiar with the server as I am with the channel so I don't know if it would complain about the port being in use. ...


OK, JT, I realized from what you replied above that I hadn't done the mymedia.bat AFTER finding my server IP. So I ran mymedia.bat and left it open.

That immediately let me get through the registration process for MyMedia on roku.com.

But when I started configuring music and video locations, etc., I suddenly got this message on my TV screen from Roku:

"Server Problem. Communications with the server has been lost."

I immediately maximized the server window and I see this message running in a loop (I guess you'd call it a "loop" -- it keeps repeating itself constantly) in the server window:

"192.168.0.104:57968 - - [09/May/2011 19:19:00] "HTTP/1.1 GET /media" - 401 Unaut
horized"

That message is running over and over again, with the number, i.e., "57968" increasing in increments of "1" each time the message runs in the server window.

Is there something I need to reconfigure or set differently in the config.ini file in the server directories, or something I need to do with my Windows firewall and/or my broadband modem firewall. (I haven't a clue whether I can configure ANYTHING on my broadband modem. Suppose I would call Mediacom about that, I dunno.)

Gary
0 Kudos
renojim
Community Streaming Expert

Re: My Media - Your Music and Video on the Roku DVP

Can you post the contents of config.ini? It's in the netguy204-roku_media_server-xxxx\server directory. Just double-click it and it should open in Notepad. Select everything (Ctrl-A), copy it (Ctrl-C) and then paste it in your reply (Ctrl-V). I suspect your directories aren't setup quite right.

-JT
Roku Community Streaming Expert

Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.

I am not a Roku employee.
0 Kudos
Phil65
Visitor

Re: My Media - Your Music and Video on the Roku DVP

"renojim" wrote:
Can you post the contents of config.ini? It's in the netguy204-roku_media_server-xxxx\server directory. Just double-click it and it should open in Notepad. Select everything (Ctrl-A), copy it (Ctrl-C) and then paste it in your reply (Ctrl-V). I suspect your directories aren't setup quite right.

-JT


Here are the contents of the config.ini:

[config]
roku_ip = ROKU IP ADDRESS
server_ip = 192.168.1.101
server_port = 8001
collapse_collections = False
max_folders_before_split = 10
theme = default
music_dir = /Users/administrator/Music/iTunes/iTunes Music
video_dir = /Users/administrator/Movies
photo_dir = /Users/administrator/Pictures/iPhoto Library
python_path = /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python


Something else I forgot to mention: when I control click on mymedia.py and select open with Python, Python starts to launch for a fraction of a second and then immediately closes. Alternately I have been opening springboard.py (which I saw suggested elsewhere in the thread) and it appears to start my server. I apologize once again for any confusion, but I obviously don't know what I'm doing.
0 Kudos
writerguy
Visitor

Re: My Media - Your Music and Video on the Roku DVP

"renojim" wrote:
Can you post the contents of config.ini? It's in the netguy204-roku_media_server-xxxx\server directory. Just double-click it and it should open in Notepad. Select everything (Ctrl-A), copy it (Ctrl-C) and then paste it in your reply (Ctrl-V). I suspect your directories aren't setup quite right.

-JT


Sure, JT, here's the contents of the config.ini:


[config]
music_dir = C:\Users\Gary\Music
video_dir = C:\Users\Gary\My Documents\My Videos
server_ip = 192.168.0.101
roku_ip = ROKU IP ADDRESS
max_folders_before_split = 10
python_path = c:\python26\python.exe
theme = default
collapse_collections = False
server_port = 8001
photo_dir = C:\Users\Gary\My Documents\My Pictures
regid = pomp


I'm positive that the music_dir is listed correctly.

The video_dir needs to be changed, but I had the server "communications lost" error message before I got a chance to change it via the computer configuration screen. It should be "C:\Users\Gary\Videos"

Oh, and also, the Pictures directory should be "C:\Users\Gary\Pictures"

As for the rest of the config.ini content, I'm sure the IP address and port number ARE correct. and the regid is correct. But from there, I dunno.

Thanks again for your help!

Gary
0 Kudos
renojim
Community Streaming Expert

Re: My Media - Your Music and Video on the Roku DVP

Gary,

Your config.ini looks ok, so that's not it. I don't recall any firewall issues, but did you get any messages about python and its access?

Let's go back to the browser. Go to http://192.168.0.101:8001/feed and see what happens. Also, look in my_media_log.txt in the server directory (double-click on it and it should open in Notepad) and see if there are any error messages.

-JT
Roku Community Streaming Expert

Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.

I am not a Roku employee.
0 Kudos
renojim
Community Streaming Expert

Re: My Media - Your Music and Video on the Roku DVP

Phil65,

Sorry, I sort of missed your post about not being able to register. It doesn't look like you've added the registration ID to config.ini. However, you're going to have a problem since it looks like you have Python version 2.7 I've been able to get the server started with 2.7, but a lot of things don't work. I'm not a Mac person, so I'm going to be of limited help. Did you install Python, or does it come pre-installed on a Mac? If you installed it, I'd suggest uninstalling it and installing 2.6. If it comes pre-installed, you may have to do some research on how to install 2.6.

Having said all that, it's not clear that the server is really starting. If you can't start it by selecting open with Python, I would think something is wrong. When you start it via springboard.py, does a window open with something like:
warning: this server has not completed rendezvous
http://0.0.0.0:8001/

If so and you'd like to see if you can make it past the registration, close the server and start the channel and then add the four character registration ID that's displayed to config.ini. Just add a line anywhere:
regid = xxxx

Of course, replace xxxx with the four character ID. Then restart the server and it should spit out:
submitting 'http://192.168.1.101:8001' to rendezvous server as xxxx
http://0.0.0.0:8001/

If all goes well, the channel should automatically go past the registration screen. However, like I said I don't think you'll be able to play any music or view photos.

-JT
Roku Community Streaming Expert

Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.

I am not a Roku employee.
0 Kudos
writerguy
Visitor

Re: My Media - Your Music and Video on the Roku DVP

"renojim" wrote:
Gary,

Your config.ini looks ok, so that's not it. I don't recall any firewall issues, but did you get any messages about python and its access?

Let's go back to the browser. Go to http://192.168.0.101:8001/feed and see what happens. Also, look in my_media_log.txt in the server directory (double-click on it and it should open in Notepad) and see if there are any error messages.

-JT


OK, when I went to the above address for the feed, I got a screen titled "MyMedia Feed" with links to the correct "My Music" "My Videos" "My Photos" and "My Streams" folders. I clicked on the "My Music" link and got a huge screen full of errors that started with this message:


"<type 'exceptions.TypeError'> at /feed
expected string or buffer
Python c:\python26\lib\re.py in match, line 136
Web GET http://192.168.0.101:8001/feed"


I can paste in the whole thing if it'll be of any help?

I opened the my_media_log.txt file and found a huge number of lines with messages like this:


"WARNING:root:SECURITY WARNING: Someone was trying to access images/videos_square.jpg. The MyMedia client shouldn't do this"


followed by a huge number of lines that were like this:


"DEBUG:root:http://192.168.0.101:8001/media?name=12361.jpg&key=photo"


I can copy and paste the entire contents of that file here if you think it would be helpful.

As far as anything related to python or access -- what I've given you above is about all that I can find anywhere.

Oh, also, as I was running the feed and looking through stuff above, the server window showed these messages:


"192.168.0.101:57082 - - [09/May/2011 22:04:40] "HTTP/1.1 GET /feed" - 200 OK
192.168.0.101:57082 - - [09/May/2011 22:04:41] "HTTP/1.1 GET /favicon.ico" - 404
Not Found
192.168.0.101:57082 - - [09/May/2011 22:04:41] "HTTP/1.1 GET /favicon.ico" - 404
Not Found
192.168.0.101:57082 - - [09/May/2011 22:04:41] "HTTP/1.1 GET /favicon.ico" - 404
Not Found
Traceback (most recent call last):
File "C:\netguy204-roku_media_server-23c75dc\server\web\application.py", line
242, in process
return self.handle()
File "C:\netguy204-roku_media_server-23c75dc\server\web\application.py", line
233, in handle
return self._delegate(fn, self.fvars, args)
File "C:\netguy204-roku_media_server-23c75dc\server\web\application.py", line
412, in _delegate
return handle_class(cls)
File "C:\netguy204-roku_media_server-23c75dc\server\web\application.py", line
387, in handle_class
return tocall(*args)
File "C:\netguy204-roku_media_server-23c75dc\server\mymedia.py", line 909, in
GET
return getdoc(feed.key, path, base_dir, range, config, collapse_collections)
.to_xml()
File "C:\netguy204-roku_media_server-23c75dc\server\mymedia.py", line 584, in
getdoc
image_icon = getart(fpath) or curr_image
File "C:\netguy204-roku_media_server-23c75dc\server\mymedia.py", line 350, in
getart
thmb = thumbnail.create_thumbnail(path, size="large")
File "C:\netguy204-roku_media_server-23c75dc\server\thumbnail.py", line 69, in
create_thumbnail
if re.match("video/\.*", mimetype):
File "c:\python26\lib\re.py", line 137, in match
return _compile(pattern, flags).match(string)
TypeError: expected string or buffer

192.168.0.101:57082 - - [09/May/2011 22:04:45] "HTTP/1.1 GET /feed" - 500 Intern
al Server Error
192.168.0.101:57103 - - [09/May/2011 22:05:58] "HTTP/1.1 GET /feed" - 200 OK
192.168.0.101:57103 - - [09/May/2011 22:06:02] "HTTP/1.1 GET /feed" - 200 OK
Traceback (most recent call last):
File "C:\netguy204-roku_media_server-23c75dc\server\web\application.py", line
242, in process
return self.handle()
File "C:\netguy204-roku_media_server-23c75dc\server\web\application.py", line
233, in handle
return self._delegate(fn, self.fvars, args)
File "C:\netguy204-roku_media_server-23c75dc\server\web\application.py", line
412, in _delegate
return handle_class(cls)
File "C:\netguy204-roku_media_server-23c75dc\server\web\application.py", line
387, in handle_class
return tocall(*args)
File "C:\netguy204-roku_media_server-23c75dc\server\mymedia.py", line 909, in
GET
return getdoc(feed.key, path, base_dir, range, config, collapse_collections)
.to_xml()
File "C:\netguy204-roku_media_server-23c75dc\server\mymedia.py", line 584, in
getdoc
image_icon = getart(fpath) or curr_image
File "C:\netguy204-roku_media_server-23c75dc\server\mymedia.py", line 350, in
getart
thmb = thumbnail.create_thumbnail(path, size="large")
File "C:\netguy204-roku_media_server-23c75dc\server\thumbnail.py", line 69, in
create_thumbnail
if re.match("video/\.*", mimetype):
File "c:\python26\lib\re.py", line 137, in match
return _compile(pattern, flags).match(string)
TypeError: expected string or buffer

192.168.0.101:57103 - - [09/May/2011 22:06:10] "HTTP/1.1 GET /feed" - 500 Intern
al Server Error"

Hope some of that is helpful?

Thanks.

Gary
0 Kudos
renojim
Community Streaming Expert

Re: My Media - Your Music and Video on the Roku DVP

Ouch! Let me do some research. I noticed el.wubo updated the server last week, but a quick glance didn't reveal any big changes, although that "thumbnail" thing was a new addition. Let me install that version and see what I find. I believe you said you installed PIL, correct?

If you'd like to try the previous version of the server, download this. Unzip it to wherever you like. Putting it where you did with the last version off of C:\ is as good a place as any. Copy the config.ini from the old server directory to this one (it should create a netguy204-roku_media_server-19c6690 directory with a server directory under that). Make sure you close the server if it's running and start the one from the "19c6690" server directory.

Edit: I'm starting to think this new server update may have some problems. It looks like PIL is now mandatory where it used to be optional (but highly recommended). By the way, does "12361.jpg" mean anything to you? I'm wondering where that came from.

-JT
Roku Community Streaming Expert

Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.

I am not a Roku employee.
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.