[Glass] [] WAGemStoneRunSmalltalkServer

Sebastian Heidbrink sebastian_heidbrink at yahoo.de
Fri Aug 9 08:51:17 PDT 2013

Hi Dale,

I tried it and I get the same result....

Meanwhile I realized that my script only works if I commit my 
transaction prior to starting the gem like this:

WAGemStoneRunSmalltalkServer addServerOfClass: ZnServer withName: 
'myserver' on: #(9001).
.... commit the transaction ...
WAGemStoneRunSmalltalkServer startGems: (WAGemStoneRunSmalltalkServer 
serverNamed: 'myserver').

Otherwise the (WAGemStoneRunSmalltalkServer  serverNamed: 'myserver') is 
nil in WAGemStoneRunSmalltalkServer startServer: serverName On: portInteger.

Since the remote debugging does not work with the currently delivered 
runSmalltalkerver scriptsfor I have to work with "halt" and 
looking into the logs.

I already tried to change the script this way: see attached

It seems the listenloop is running, but I never end up in 
"handleRequest" :-/


-------------- next part --------------

if [ -s $GEMSTONE/seaside/etc/gemstone.secret ]; then
    . $GEMSTONE/seaside/etc/gemstone.secret
    echo 'Missing password file $GEMSTONE/seaside/etc/gemstone.secret'
    exit 1

# Requires a port number as a parameter
if [ "a$1" = "a" ]; then
        echo 'Missing argument <server port number>'
        exit 1

cat << EOF | nohup $GEMSTONE/bin/topaz -l -T50000 2>&1 >> $GEMSTONE_LOGDIR/${1}_server-${2}.log &

set user DataCurator pass $GEMSTONE_CURATOR_PASS gems $GEMSTONE_NAME

display oops
iferror where


"record gems pid in the pid file"
| file |
(GsFile isServerDirectory: '$GEMSTONE_DATADIR') ifFalse: [ ^nil ].
file := GsFile openWriteOnServer: '$GEMSTONE_DATADIR/${1}_server-${2}.pid'.
file nextPutAll: (System gemVersionReport at: 'processId') printString.
file cr.
file close.
  info: '${1}_server-${2}: startup'
  object: 'pid: ', (System gemVersionReport at: 'processId') printString) addToLog.
System commitTransaction
    ifFalse: [
      System abortTransaction.
      nil error: 'Could not commit ObjectLog entry' ].

| count |
GsProcess usingNativeCode not
  ifTrue: [
    "Enable remote Breakpoing handling"
    Breakpoint trappable: true.
    GemToGemAnnouncement installStaticHandler.
    System commitTransaction ifFalse: [ nil error: 'Could not commit for GemToGemSignaling' ]. 
System transactionMode: #manualBegin.
    [:ex :cat :num :args |
      "Run the abort in a lowPriority process, since we must acquire the
        GRGemStonePlatform current transactionMutex
          critical: [
            GRGemStonePlatform  current doAbortTransaction ].
        System enableSignaledAbortError.
      ] forkAt: Processor lowestPriority.
  category: GemStoneError
  number: 6009 "#rtErrSignalAbort"
  subtype: nil.
System enableSignaledAbortError.
"This thread is needed to handle the SigAbort exception, when the primary
 thread is blocked. Assuming default 60 second STN_GEM_ABORT_TIMEOUT, wake
 up at 30 second intervals."
  [ true ] whileTrue: [ (Delay forSeconds: 30) wait ].
] forkAt: Processor lowestPriority.

GsFile gciLogServer: '$1 Server started on port ', $2 printString.

WAGemStoneRunSmalltalkServer startGemServer: '$1' On: $2.
GemToGemAnnouncement uninstallStaticHandler.
System beginTransaction.
  fatal: '${1}_server_${2}: topaz exit'
    'pid: ', (System gemVersionReport at: 'processId') printString) addToLog.
System commitTransaction.

More information about the Glass mailing list