Server setup

Questions and Answers on installation, deployment, management, locking, tranasactions of Servoy Application Server

Server setup

Postby Morley » Sun Mar 13, 2005 1:43 am

We're attempting to setup Servoy Server for the first time and are having a frustrating time at it. Yes, we've gone through the manual very carefully. All the more frustrating for both of us, we successfully did exactly the same process in a test last fall and got it to work. But not this time.

I want to transfer what's on my WinXP Pro development environment onto an Xserve and begin serving it. This is a fresh installation that starts out with the solution and data (Sybase) currently on our development machine.

We've succeeded in getting the Server running. In fact, you can go to http://216.234.61.98:8080/index.html right now and download a client to run the CRM demo.

In attempting to get our solution and database into place we DID add the database in Servoy Prefs/DB Servers and we DID add it to the Sybase.config file. And we DID move ALL database files from Servoy Database directory and ALL the files from the Sybase_db directory. We also checked to make sure permissions are properly set.

But our tables are not in place (didn't have this problem last fall). Opening our solution shows the opening screen but reports relationship failures throughout the opening script.

Very puzzling. Assistance appreciated.

While I'm at it, a secondary question. We're not clear how to quit Servoy Developer and leave Servoy Server running.
Morley Chalmers
7Office Inc.
User avatar
Morley
 
Posts: 891
Joined: Fri Apr 25, 2003 4:54 pm
Location: Toronto, Canada

Postby IT2Be » Sun Mar 13, 2005 12:50 pm

Morley,

We've succeeded in getting the Server running. In fact, you can go to http://216.234.61.98:8080/index.html right now and download a client to run the CRM demo.
I did that and all is running ok...

In attempting to get our solution and database into place we DID add the database in Servoy Prefs/DB Servers and we DID add it to the Sybase.config file.
OK

And we DID move ALL database files from Servoy Database directory and ALL the files from the Sybase_db directory. We also checked to make sure permissions are properly set.

This I don't understand, moving db files is ok since they are cross platform but moving xp sybase (config) files and executables doesn't make sense to me or do I misenterpret what you are doing here?

But our tables are not in place (didn't have this problem last fall). Opening our solution shows the opening screen but reports relationship failures throughout the opening script.
Is your db just not running? Or not available in Servoy? Or are the relations screwed up?
In case of the first or second what do your sybase.config and servoy.config files look like?

While I'm at it, a secondary question. We're not clear how to quit Servoy Developer and leave Servoy Server running.

First of all running the server and developer at the same time is not advised. Any changes in the solution made by developer can only be seen by the server/client after a solution flush or a reset of the system (maybe that's where your issues come from).
Second, if you do so, you can just close down developer and your server keeps on running. They are different applications. The only thing you have to think of is that develper doesn't close your db's.

Hope this helps a little,

marcel
Marcel J.G. Trapman (IT2BE)
SAN partner - Freelance Java and Servoy
Servoy Components - IT2BE Plug-ins and Beans for Servoy
ServoyForge - Open Source Components for Servoy
User avatar
IT2Be
Servoy Expert
 
Posts: 4766
Joined: Tue Oct 14, 2003 7:09 pm
Location: Germany

Postby ROCLASI » Sun Mar 13, 2005 1:22 pm

Hi Morley,

I have Servoy Server running on an Xserve without problems.

To answer your last question first.
When you have Servoy Server (as service) running then opening and closing Developer on the same machine won't quit Servoy Server.
But your question suggests that you don't have Servoy Server running as a service.

Marcel Trapman posted a great tip on Servoy magazine about how to get Servoy server running on Mac OS X. But the website didn't kept the long lines intact but added breaks.
So for you (and others) I post my working files.

servoy_server.sh (in /Applications/<Servoy folder>)
Code: Select all
#!/bin/sh

cd /Applications/Servoy
export DYLD_LIBRARY_PATH=/Applications/Servoy/sybase_db
/Applications/Servoy/sybase_db/dbsrv9 @/Applications/Servoy/sybase_db/sybase.config &

while true
do
        java -Djava.awt.headless=true -classpath .:lib/commons-collections.jar:lib/commons-dbcp.jar:lib/commons-pool.jar:lib/activation.jar:lib/antlr.jar:lib/j2db.jar:lib/j2dbdev.jar:lib/compat141.jar:lib/jh.jar:lib/jndi.jar:lib/js.jar:lib/jta.jar:lib/mail.jar:lib/jug.jar:lib/jdbc2_0-stdext.jar:lib/naming-common.jar:lib/naming-resources.jar:lib/servlet.jar:lib/xerces.jar:lib/server-bootstrap.jar:lib/commons-fileupload-1.0.jar:lib/commons-logging.jar:lib/hibernate2.jar com.servoy.j2db.server.ApplicationServer "$@"
        EXITCODE=$?
        if [ "$EXITCODE" != 99 ]; then exit $EXITCODE; fi
done


sybase.config (in /Applications/<servoy folder>/sybase_db/
Code: Select all
-ti 0 -x tcpip{dobroadcast=no} -ud -qs -qw -o sybase_db/sybase_log.txt
database/servoy_repository.db
database/user_data.db
database/example.db
database/log_data.db
database/crm.db


In /Library/StartupItems/ you create a folder named Servoy.
In that Servoy folder you create the following 2 files.
Owner of this folder and files is root.
The folder and the Servoy file have permission 755.
StartupParameters.plist has permission 644.

Servoy
Code: Select all
#!/bin/sh
##
# Servoy Application Server
##
. /etc/rc.common
StartService () {
        ConsoleMessage "Starting Servoy Application Server..."
        cd /Applications/Servoy/
        . /Applications/Servoy/servoy_server.sh&
}
StopService()
{
        ConsoleMessage "In the future Stop Servoy Application Server here"
}
RestartService ()
{
        ConsoleMessage "Restarting Servoy Application Server..."
        StopService
        StartService
}
RunService "$1"


StartupParameters.plist
Code: Select all
{
        Description = "Servoy Application Server";
        Provides = ("Servoy");
        Requires = ("Resolver");
        Preference = "Late";
        Messages =
        {
                 start = "Starting Servoy Application Server";
                 stop = "Stopping Servoy Application Server";
        };
}


Morley wrote:In attempting to get our solution and database into place we DID add the database in Servoy Prefs/DB Servers and we DID add it to the Sybase.config file. And we DID move ALL database files from Servoy Database directory and ALL the files from the Sybase_db directory. We also checked to make sure permissions are properly set


Why did you copy the sybase_db directory over?
Servoy installer already puts that on the server for you.
You only have to copy your database directory over.
This directory holds all Sybase databases.


Hope this helps.
Robert Ivens
SAN Developer / Servoy Valued Professional / Servoy Certified Developer

ROCLASI Software Solutions / JBS Group, Partner
Mastodon: @roclasi
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5438
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium

Postby Morley » Sun Mar 13, 2005 6:37 pm

Both Marcel's and Robert's responses are helpful. This is an interim followup, won't have access to the server again until Monday.

IT2BE wrote:
Morley wrote:And we DID move ALL database files from Servoy Database directory and ALL the files from the Sybase_db directory. We also checked to make sure permissions are properly set.
This I don't understand, moving db files is ok since they are cross platform but moving xp sybase (config) files and executables doesn't make sense to me or do I misenterpret what you are doing here?

That's exactly what we did, we didn't consider the cross platform issues. We were overly focused on the absence of platform issues with Java and failed to consider the Sybase backend separately.

I'm not personally skilled in server issues and am therefore working with an IT consultant who is not himself overly familiar with Sybase issues. These are the resources we have available at hand.

IT2BE wrote:
Morley wrote:But our tables are not in place (didn't have this problem last fall). Opening our solution shows the opening screen but reports relationship failures throughout the opening script.
Is your db just not running? Or not available in Servoy? Or are the relations screwed up?
In case of the first or second what do your sybase.config and servoy.config files look like?

Yes, Sybase is up and running and a database called "seven_office" is running (because we manually created in Servoy Prefs/DB Servers). Going into Dataprovider definitions we can see two icons there only (don't recall their names as I write) and zero tables.

ROCLASI wrote:
Morley wrote:In attempting to get our solution and database into place we DID add the database in Servoy Prefs/DB Servers and we DID add it to the Sybase.config file. And we DID move ALL database files from Servoy Database directory and ALL the files from the Sybase_db directory. We also checked to make sure permissions are properly set
Why did you copy the sybase_db directory over?
Servoy installer already puts that on the server for you.
You only have to copy your database directory over.
This directory holds all Sybase databases.

Because the WinXP sybase_db directory contains a database and a text file by the name of "seven_office" and the sybase_db directory installed on the Xserve does not.
Way back at the beginning (last June) we were told we needed to create a separate database for our solution, which we did with Sybase Central.

I remain unclear how to rectify the Sybase issue -- how to migrate the data structure and the data itself from the WinXP installation to the Xserve installation. This issue has not been resolved.

IT2BE wrote:
Morley wrote:While I'm at it, a secondary question. We're not clear how to quit Servoy Developer and leave Servoy Server running.
First of all running the server and developer at the same time is not advised. Any changes in the solution made by developer can only be seen by the server/client after a solution flush or a reset of the system (maybe that's where your issues come from).
Second, if you do so, you can just close down developer and your server keeps on running. They are different applications. The only thing you have to think of is that develper doesn't close your db's.

Something else we missed entirely. Neither of us caught on to the concept of launching Servoy as a "Service" from Servoy's docs. (Yes, I'm sure it's there but not sufficiently prominent for either of us to catch it.)

I've noted Robert's reposting of Marcel's solution to running Servoy as a service on an Xserve. Will put his fix into place on Monday.

Sounds as if a tutorial on this subject would be a useful amplication of the Server documentation.
Morley Chalmers
7Office Inc.
User avatar
Morley
 
Posts: 891
Joined: Fri Apr 25, 2003 4:54 pm
Location: Toronto, Canada

Postby IT2Be » Sun Mar 13, 2005 9:29 pm

Morley, a tutorial for the mac is slightly more difficult and 'personal' than with the pc as I understand. That's why I wrote my article for Servoy Magazine. I won't be in the office tomorrow but, when you still have an issue on tuesday you are welcome to call me. Please make sure to send me an email beforehand so we can schedule a time :-)
Marcel J.G. Trapman (IT2BE)
SAN partner - Freelance Java and Servoy
Servoy Components - IT2BE Plug-ins and Beans for Servoy
ServoyForge - Open Source Components for Servoy
User avatar
IT2Be
Servoy Expert
 
Posts: 4766
Joined: Tue Oct 14, 2003 7:09 pm
Location: Germany

Mac OS X Startup - still problems....

Postby daveheff » Mon May 09, 2005 3:41 pm

Robert,

I tried the original post from Servoy Magazine and now I have tried using your code but I still get this error when I try:

./Servoy to test it....

./Servoy: line 21: $1: unbound variable

What am I doing wrong?

Dave
daveheff
 
Posts: 34
Joined: Wed Dec 08, 2004 2:31 pm
Location: Adelaide, Australia

Re: Mac OS X Startup - still problems....

Postby ROCLASI » Mon May 09, 2005 6:16 pm

daveheff wrote:Robert,

I tried the original post from Servoy Magazine and now I have tried using your code but I still get this error when I try:

./Servoy to test it....

./Servoy: line 21: $1: unbound variable

What am I doing wrong?

Dave


You need to give the command a start, restart or stop argument.

Code: Select all
./Servoy start
Robert Ivens
SAN Developer / Servoy Valued Professional / Servoy Certified Developer

ROCLASI Software Solutions / JBS Group, Partner
Mastodon: @roclasi
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5438
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium

Postby daveheff » Tue May 10, 2005 1:04 am

Robert,

Sorry, but now I get this:
(by the way, I have ensured this is an exact copy and paste from your sample i.e. - one line)


dave-08:33:18$ sudo ./Servoy start
Starting Servoy Application Server...
dave-08:33:21$ -classpath requires class path specification
Usage: java [-options] class [args...]
(to execute a class)
or java [-options] -jar jarfile [args...]
(to execute a jar file)

where options include:
-client to select the "client" VM
-server to select the "server" VM
-jvm is a synonym for the "client" VM [deprecated]
-hotspot is a synonym for the "client" VM [deprecated]
The default VM is client.

-cp <class search path of directories and zip/jar files>
-classpath <class search path of directories and zip/jar files>
A : separated list of directories, JAR archives,
and ZIP archives to search for class files.
-D<name>=<value>
set a system property
-verbose[:class|gc|jni]
enable verbose output
-version print product version and exit
-version:<value>
require the specified version to run
-showversion print product version and continue
-jre-restrict-search | -jre-no-restrict-search
include/exclude user private JREs in the version search
-? -help print this help message
-X print help on non-standard options
-ea[:<packagename>...|:<classname>]
-enableassertions[:<packagename>...|:<classname>]
enable assertions
-da[:<packagename>...|:<classname>]
-disableassertions[:<packagename>...|:<classname>]
disable assertions
-esa | -enablesystemassertions
enable system assertions
-dsa | -disablesystemassertions
disable system assertions
./Servoy: line 10: .:lib/commons-collections.jar:lib/commons-dbcp.jar:lib/commons-pool.jar:lib/activation.jar:lib/antlr.jar:lib/j2db.jar:lib/j2dbdev.jar:lib/compat141.jar:lib/jh.jar:lib/jndi.jar:lib/js.jar:lib/jta.jar:lib/mail.jar:lib/jug.jar:lib/jdbc2_0-stdext.jar:lib/naming-common.jar:lib/naming-resources.jar:lib/servlet.jar:lib/xerces.jar:lib/server-bootstrap.jar:lib/commons-fileupload-1.0.jar:lib/commons-logging.jar:lib/hibernate2.jar: No such file or directory


Dave
daveheff
 
Posts: 34
Joined: Wed Dec 08, 2004 2:31 pm
Location: Adelaide, Australia

Postby ROCLASI » Tue May 10, 2005 1:14 am

Dave,

What Mac OS X version is this and what Java version do you have installed?
Robert Ivens
SAN Developer / Servoy Valued Professional / Servoy Certified Developer

ROCLASI Software Solutions / JBS Group, Partner
Mastodon: @roclasi
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5438
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium

Postby ROCLASI » Tue May 10, 2005 1:25 am

Dave,

Also I see in the last line of your error message:

./Servoy: line 10: .:lib/commons-collections.jar:lib/commons-dbcp.jar:lib/commons-pool.jar:lib/activation.jar:lib/antlr.jar:lib/j2db.jar:lib/j2dbdev.jar:lib/compat141.jar:lib/jh.jar:lib/jndi.jar:lib/js.jar:lib/jta.jar:lib/mail.jar:lib/jug.jar:lib/jdbc2_0-stdext.jar:lib/naming-common.jar:lib/naming-resources.jar:lib/servlet.jar:lib/xerces.jar:lib/server-bootstrap.jar:lib/commons-fileupload-1.0.jar:lib/commons-logging.jar:lib/hibernate2.jar: No such file or directory


That colon behind 'hibernate2.jar' shouldn't be there.
Check your servoy_server.sh script again with the script I posted in this thread.
Robert Ivens
SAN Developer / Servoy Valued Professional / Servoy Certified Developer

ROCLASI Software Solutions / JBS Group, Partner
Mastodon: @roclasi
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5438
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium

Postby ROCLASI » Thu May 19, 2005 12:16 pm

I've put the startup and config files described in this thread on my server for download.

Servoy Server startup and config files for Mac OS X 10.3 (Server)

Just make sure you set the correct owners and permissions as previously described in this thread.
I hope this makes your installation more smoothly :)
Robert Ivens
SAN Developer / Servoy Valued Professional / Servoy Certified Developer

ROCLASI Software Solutions / JBS Group, Partner
Mastodon: @roclasi
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5438
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium


Return to Servoy Server

Who is online

Users browsing this forum: No registered users and 3 guests

cron