[Glass] [3.1.0.4] 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 3.1.0.4 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" :-/
Sebastian
-------------- next part --------------
#!/bin/bash
if [ -s $GEMSTONE/seaside/etc/gemstone.secret ]; then
. $GEMSTONE/seaside/etc/gemstone.secret
else
echo 'Missing password file $GEMSTONE/seaside/etc/gemstone.secret'
exit 1
fi
# Requires a port number as a parameter
if [ "a$1" = "a" ]; then
echo 'Missing argument <server port number>'
exit 1
fi
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
login
run
"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.
(ObjectLogEntry
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' ].
%
run
| 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.
Exception
installStaticException:
[:ex :cat :num :args |
"Run the abort in a lowPriority process, since we must acquire the
transactionMutex."
[
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.
%
run
GemToGemAnnouncement uninstallStaticHandler.
System beginTransaction.
(ObjectLogEntry
fatal: '${1}_server_${2}: topaz exit'
object:
'pid: ', (System gemVersionReport at: 'processId') printString) addToLog.
System commitTransaction.
%
EOF
More information about the Glass
mailing list