[7. June 2013] Youporn available now | [19. April 2013] A-400 Advanced Network Setup | [11 Jan. 2013] Customize your A-400 Home Screen

Firmware: A-400 [13 May 2013] | C-300 [30 Nov. 2012] | A-300 [30 Nov. 2012] | C-200 RC1 [13 June 2013] | A-200/A-210 RC1 [13 June 2013]

Just got your NMT | WIKI has the answers | Search the forum | Forum Rules/Policy | Firmware & Official NMT News | Popcornhour manuals



User(s) browsing this thread: 1 Guest(s)
Thread Closed 
Ubuntu / MyiHome 5.2 script issues.
02-24-2010, 07:54 PM (This post was last modified: 02-24-2010 07:59 PM by Mathias90.)
Post: #1
Ubuntu / MyiHome 5.2 script issues.
Hi.

I'm new to this forum - this seems to be a nice community for NMT-users!


I am experiencing issues with my recently installed Ubuntu and my MyiHome 5.2!

Yesterday I installed MyiHome which went perfectly. I were able to start the server, by changing directory to the location of MyiHome and by running the ./startserver command.

I thought having to start MyiHome manually every time would become a pain in the ***, so I decided to write a script. Apparently someone already did that, so I found the already written script and edited to fit my configuration.

This is the script:
Quote:#!/bin/bash
cd /home/mathias/myiHome/
./startserver.sh

Then I found this tutorial for adding the script to the startup scripts:
http://www.debian-administration.org/art...ith_Debian

So I put the script in the init.d folder, and ran this command to add the necessary
symlinks:
Quote:update-rc.d myiHome defaults


Then I rebooted the machine. The service initially indeed seamed to be started, but loading the iHome directories for video resp. photos and music on my Popcorn Hour A-110, did not show any files (as it did yesterday when I ran the script manually).

I tried to stop/start the service with the
Quote:service myiHome stop resp. start
command, but the application returned the following error with both commands:

Quote:[Server@cbf30e]: [Thread[HSQLDB Server @cbf30e,5,main]]: run()/openServerSocket():
java.net.BindException: Address already in use
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:365)
at java.net.ServerSocket.bind(ServerSocket.java:319)
at java.net.ServerSocket.(ServerSocket.java:185)
at java.net.ServerSocket.(ServerSocket.java:97)
at org.hsqldb.HsqlSocketFactory.createServerSocket(Unknown Source)
at org.hsqldb.Server.openServerSocket(Unknown Source)
at org.hsqldb.Server.run(Unknown Source)
at org.hsqldb.Server.access$000(Unknown Source)
at org.hsqldb.Server$ServerThread.run(Unknown Source)
[Server@cbf30e]: Initiating shutdown sequence...
[Server@cbf30e]: Shutdown sequence completed in 10 ms.
[Server@cbf30e]: 2010-02-24 19:35:25.796 SHUTDOWN : System.exit() is called next


I tried to reboot once again. This time I realized, that my Samba daemon service hang during shut down, so I had to "kill" the machine by removing the power cord. This happened several times afterwards.

I tried to remove the script from init.d with this command:
Quote:update-rc.d myiHome remove
and to re-add it with the command mentioned earlier, but that did not help.

Am I doing anything wrong?
What might cause these issues?


/Mathias
Find all posts by this user
02-24-2010, 08:10 PM
Post: #2
RE: Ubuntu / MyiHome 5.2 script issues.
i have KDE and scripts saved in ~/.kde/Autostart folder are run after login. In Gnome (I think) you can add items in /usr/share/autostart.
Find all posts by this user
02-24-2010, 08:22 PM
Post: #3
RE: Ubuntu / MyiHome 5.2 script issues.
(02-24-2010 08:10 PM)JKG Wrote:  i have KDE and scripts saved in ~/.kde/Autostart folder are run after login. In Gnome (I think) you can add items in /usr/share/autostart.

Thanks for the answer.

Well. I do have a usr/share/autostart folder, but putting the script in there doesn't seem to start it after a reboot anyway.

Any other ideas?
Find all posts by this user
02-24-2010, 08:28 PM
Post: #4
RE: Ubuntu / MyiHome 5.2 script issues.
(02-24-2010 08:22 PM)Mathias90 Wrote:  Well. I do have a usr/share/autostart folder, but putting the script in there doesn't seem to start it after a reboot anyway.

Any other ideas?
If you have any other files in the folder, you can check the syntax. They are not script files.

I think the autostart folder for Gnome is /etc/xdg/autostart. At least i have some Gnome autostart files there. There seems to be only KDE files in /usr/share/autostart.
Find all posts by this user
02-24-2010, 08:29 PM (This post was last modified: 02-24-2010 09:01 PM by Mathias90.)
Post: #5
RE: Ubuntu / MyiHome 5.2 script issues.
OK. This is weird. (or maybe not?)

I have removed the scrip from init.d and rebooted the machine, but now MyiHome won't even show me any video resp. photos or music on my PCH.

This is the output of my preference.xml:

Quote:






(I can't seem to quote the code - all my directories point to my desktop and my desktop contains matroska files, so they should be detected as video files (as they did yesterday).
Hi again.

Thanks for the proposal. The script issue is already fixed - It turned out that I had a second preference.xml in my root folder. After correcting the pointers in that file, the script ran after a reboot plus I was able to see the index. :-)


What is still nagging me, is the "Samba Daemon stopping" hang that comes immediately after clicking the reboot button. Any solution for that? It looks like I may have misconfigured something in the /etc/init.d folder. I'm not sure what though. If you need any configuration snapshots to troubleshoot closer, please ask.
Find all posts by this user
05-05-2010, 04:45 PM
Post: #6
RE: Ubuntu / MyiHome 5.2 script issues.
Hello,

It appears I am having similar issues... any help would be GREATLY appreciated on this, as I am unable to run myiHome due to this "Address already in use" deal. I currently get the following issue when I try to run ./startserver.sh:

Quote:>> IHOME_HOME = /home/mediaserver/Documents/myiHome/myiHomeLinux-v5.2.0
>> audioextpath = /home/mediaserver/Documents/myiHome/myiHomeLinux-v5.2.0/webapps/ROOT/xml/music.xml
>> langxml = /home/mediaserver/Documents/myiHome/myiHomeLinux-v5.2.0/webapps/ROOT/xml/index.xml
>> videopath = /home/mediaserver/Downloads
>> audiopath = /home/mediaserver/My Music
>> photopath = /home/mediaserver/My Pictures
>> exportpath = /home/mediaserver/Library/myiHome/export
>> thumbpath = /home/mediaserver/Library/myiHome/thumb
[Server@21b220]: [Thread[main,5,main]]: checkRunning(false) entered
[Server@21b220]: [Thread[main,5,main]]: checkRunning(false) exited
[Server@21b220]: Startup sequence initiated from main() method
[Server@21b220]: Loaded properties from [/home/mediaserver/Documents/myiHome/myiHomeLinux-v5.2.0/server.properties]
[Server@21b220]: Initiating startup sequence...
[Server@21b220]: [Thread[HSQLDB Server @21b220,5,main]]: run()/openServerSocket():
java.net.BindException: Address already in use
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:365)
at java.net.ServerSocket.bind(ServerSocket.java:319)
at java.net.ServerSocket.(ServerSocket.java:185)
at java.net.ServerSocket.(ServerSocket.java:97)
at org.hsqldb.HsqlSocketFactory.createServerSocket(Unknown Source)
at org.hsqldb.Server.openServerSocket(Unknown Source)
at org.hsqldb.Server.run(Unknown Source)
at org.hsqldb.Server.access$000(Unknown Source)
at org.hsqldb.Server$ServerThread.run(Unknown Source)
[Server@21b220]: Initiating shutdown sequence...
[Server@21b220]: Shutdown sequence completed in 26 ms.
[Server@21b220]: 2010-05-05 11:34:31.803 SHUTDOWN : System.exit() is called next

I currently have Java™ SE Runtime Environment (build 1.6.0_20-b02), and cannot seem to find any processes running on Port 8000 (though when I try to go to localhost:8000 it pulls up an error page "HTTP Status 404 - Servlet syabas.myihome.index_jsp is not available")

Any ideas?

Thanks in advance!
Find all posts by this user
05-22-2010, 09:43 PM
Post: #7
RE: Ubuntu / MyiHome 5.2 script issues.
What worked for me was lifting chunks from stuff in Shaika-Dzari's thread, linux package and daemon script. I noticed when I started myihome as root it didn't read my ~/Library/myiHome/preference.xml. My /etc/init.d/myihomeStart is a sym link to /home/john/myihomeStart, which looks like this:
Code:
#!/bin/bash
. /lib/lsb/init-functions
NAME=myihome
LOGFILE=$NAME.log
case "$1" in
        start)
                log_daemon_msg "Starting myiHome daemon"
                cd /home/john/myiHome
                #sudo -u john ./startserver.sh  > $LOGFILE
                sudo -u john java -Djava.endorsed.dirs=Contents/Resources/Java/lib/endorsed -classpath .:QTJava.zip:myiHome-server.jar:syabas-content.jar:syabas-media.jar:syabas-news.jar:syabas-portal.jar syabas.myihome.server.TomcatServer &> /home/john/myiHome/myihome.log &
                  > $LOGFILE
                ;;
        stop)
                log_daemon_msg "Stopping myiHome daemon"
                pkill -f myiHome
                exit 0
                ;;
        restart)
                log_daemon_msg "Restarting myiHome daemon"
                $0 stop
                sleep 3
                $0 start
                ;;
        *)
                echo "Usage: /etc/init.d/myihomeStart {start|stop|restart}"
                exit 1
                ;;
esac

exit 0
Note that the "sudo -u" line is all one very long line. The thing that made this work is starting java as me ("sudo -u john") instead of as root.

Now I can use my a200's Network Browser to go to my NAS and play videos from it. Alas, I've installed and run yamj, copied it's index.html file and Jukebox directory over to the a200's harddrive, seen it show-up on the TV in all its glory when hte a200 is turned-on, but selecting a movie to watch results in a "could not play" error. Obviously, the href link in the html has the path wrong. What should it say? To play /mnt/raid/public/TVshows/Rome/rome.S01E01.mpg what should the link be?
http://192.168.1.70/TVshows/Rome/rome.S01E01.mpg?
http://192.168.1.70:8000/TVshows/Rome/rome.S01E01.mpg? Something else?
Find all posts by this user
05-22-2010, 09:43 PM (This post was last modified: 05-23-2010 02:11 PM by artships.)
Post: #8
RE: Ubuntu / MyiHome 5.2 script issues.
What worked for me was lifting chunks from stuff in Shaika-Dzari's thread, linux package and daemon script. I noticed when I started myihome as root it didn't read my ~/Library/myiHome/preference.xml. My /etc/init.d/myihomeStart is a sym link to /home/john/myihomeStart, which looks like this:
Code:
#!/bin/bash
. /lib/lsb/init-functions
NAME=myihome
LOGFILE=$NAME.log
case "$1" in
        start)
                log_daemon_msg "Starting myiHome daemon"
                cd /home/john/myiHome
                #sudo -u john ./startserver.sh  > $LOGFILE
                sudo -u john java -Djava.endorsed.dirs=Contents/Resources/Java/lib/endorsed -classpath .:QTJava.zip:myiHome-server.jar:syabas-content.jar:syabas-media.jar:syabas-news.jar:syabas-portal.jar syabas.myihome.server.TomcatServer &> /home/john/myiHome/myihome.log &
                  > $LOGFILE
                ;;
        stop)
                log_daemon_msg "Stopping myiHome daemon"
                pkill -f myiHome
                exit 0
                ;;
        restart)
                log_daemon_msg "Restarting myiHome daemon"
                $0 stop
                sleep 3
                $0 start
                ;;
        *)
                echo "Usage: /etc/init.d/myihomeStart {start|stop|restart}"
                exit 1
                ;;
esac

exit 0
Note that the "sudo -u" line is all one very long line. The thing that made this work is starting java as me ("sudo -u john") instead of as root.

Now I can use my a200's Network Browser to go to my NAS and play videos from it.

Alas, I've installed and run yamj, copied it's index.html file and Jukebox directory over to the a200's harddrive, seen it show-up on the TV in all its glory when the a200 is turned-on, but selecting a movie to watch results in a "could not play" error. Obviously, the href link in the html has the path wrong. To play /mnt/raid/public/TVshows/Rome/rome.S01E01.mpg what should the link be?
http://192.168.1.70:8000/TVshows/Rome/rome.S01E01.mpg doesn't work.
Find all posts by this user
Thread Closed 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  When loading myIhome the UI get Stuck (win 7 32 bit) tomcat383 10 3,287 06-01-2013 09:36 AM
Last Post: ofersin
  Myihome phboersm 0 834 02-08-2013 11:33 AM
Last Post: phboersm
  Myihome on a A-400 Paheve 1 828 01-09-2013 10:22 PM
Last Post: werner
  can not download myihome Ken74 5 1,227 12-07-2012 02:39 AM
Last Post: dev
  myiHome start/stop script krasny13 3 2,795 10-31-2012 10:05 PM
Last Post: Gwindor
  myiHome is not working Mountain Lion NilsBasel 6 1,621 10-18-2012 07:59 PM
Last Post: NilsBasel
Bell myihome ---> windows7 x64 issue (quick fix) Costas 5 3,502 10-11-2012 05:53 AM
Last Post: NilsBasel
  myIhome and C-300 bobytt 1 931 10-08-2012 03:15 PM
Last Post: chris57
  A-200 NO myihome? doronshami 0 666 10-01-2012 08:49 AM
Last Post: doronshami
  Java issues! freeman77 8 4,314 09-17-2012 02:56 PM
Last Post: bmisencik

Forum Jump: