Page 2 of 2

Re:Remote connection to server

PostPosted:Wed Dec 31, 2008 9:19 am
by alloydog
pavila wrote:<snip>... if you want JBoss to be accessed from another computer you have to start it with the -b 0.0.0.0 parameter. And OpenKM is a web application that runs in JBoss.
That is what I am doing. I start OpenKm with:
Code: Select all
:~$ sudo /opt/OpenKM-3.0_JBoss-4.2.2.GA/bin/run.sh -b 0.0.0.0
Which results in:
Code: Select all
11:08:57,996 INFO  [Server] JBoss (MX MicroKernel) [4.2.2.GA (build: SVNTag=JBoss_4_2_2_GA date=200710221139)] Started in 34s:788ms
(See attached file: jboss_startup.txt for full startup messages)


But when viewing http://<server.name>/OpenKM/ with a web browser, I still get 404 not found.

[file name=jboss_startup.txt size=18622]http://www.openkm.com/images/fbfiles/fi ... tartup.txt[/file]

UPDATE:
I found this howto from the Ubuntu forums. It says the same as here, but I had not realised I still needed to point the web browser at port 8080:
Code: Select all
http://<server.name>:8080/
I now get the Welcome to JBoss page.

Re:Remote connection to server

PostPosted:Mon Jan 05, 2009 1:28 pm
by alloydog
If it helps others, the start-up script I used was copied from another application, (Webmin) and edited appropriately.

I used Vim to edit the file in situ, as guaranteed the file was of the correct encoding - previously, I edited the file on a Windows PC, with a plain text editor, and the encoding was wrong, so the script failed to work.

Here is the script:
Code: Select all
#!/bin/sh
# Start/stop OpenKM

case \"$1\" in
\'start\')
        /opt/OpenKM-3.0/bin/run.sh -b 0.0.0.0  >/dev/null 2>&1 </dev/null
        RETVAL=$?
        ;;
\'stop\')
        /opt/OpenKM-3.0/bin/shutdown
        RETVAL=$?
        ;;
\'restart\')
        /opt/OpenKM-3.0/bin/shutdown ; /opt/OpenKM-3.0/bin/run.sh -b 0.0.0.0
        RETVAL=$?
        ;;
*)
        echo \"Usage: $0 { start | stop }\"
        RETVAL=1
        ;;
esac
exit $RETVAL
Naturally, the path /opt/OpenKM-3.0/ needs to be edited to the correct path for your system.

I then ran update-rc.d to generate the start-up and shutdown shortcuts in the rcn.d directories.

OpenKM now runs from start up.