Projects tigase _server server-core Issues #226
Cannot find TIGASE_HOME after installation (#226)
Artur Hefczyc opened 1 decade ago

Installed on my laptop Mac OSX Mountain Lion with default settings with MySQL and ACS but it fails to start with an error:

kobit@develtigaseorg Tigase-5.2.0-beta3-b3257 $ ./scripts/tigase.sh start etc/tigase.conf 
TIGASE_HOME is not set.
Please set it to correct value before starting the sever.

Running the script in debug mode shows that the OSGI mode set to false is not correctly recognized:

kobit@develtigaseorg Tigase-5.2.0-beta3-b3257 $ ./scripts/tigase.sh start etc/tigase.conf 
+ '[' -z etc/tigase.conf ']'
+ TIGASE_PARAMS=etc/tigase.conf
+ [[ -f etc/tigase.conf ]]
+ . etc/tigase.conf
++ OSGI=false
++ ENC='-Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8'
++ DRV=-Djdbc.drivers=com.mysql.jdbc.Driver:org.postgresql.Driver:org.apache.derby.jdbc.EmbeddedDriver
++ JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home
++ CLASSPATH=
++ JAVA_OPTIONS='  -Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8 -Djdbc.drivers=com.mysql.jdbc.Driver:org.postgresql.Driver:org.apache.derby.jdbc.EmbeddedDriver -server -Xms100M -Xmx200M -XX:PermSize=32m -XX:MaxPermSize=256m -XX:MaxDirectMemorySize=128m '
++ TIGASE_CONFIG=etc/tigase.xml
++ TIGASE_OPTIONS=' --property-file etc/init.properties '
+ '[' -z /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home ']'
+ '[' -z '' ']'
+ '[' . = / ']'
+ TIGASE_HOME=/Users/kobit/Downloads/Tigase-5.2.0-beta3-b3257/./scripts/tigase.sh
++ dirname /Users/kobit/Downloads/Tigase-5.2.0-beta3-b3257/./scripts/tigase.sh
+ TIGASE_HOME=/Users/kobit/Downloads/Tigase-5.2.0-beta3-b3257/./scripts
++ dirname /Users/kobit/Downloads/Tigase-5.2.0-beta3-b3257/./scripts
+ TIGASE_HOME=/Users/kobit/Downloads/Tigase-5.2.0-beta3-b3257/.
+ TIGASE_JAR=
+ '[' false ']'
+ LIB_DIR=jars
+ JAR_FILE='jars/org.apache.felix.main*.jar'
+ for j in '${TIGASE_HOME}/${JAR_FILE}'
+ '[' -f '/Users/kobit/Downloads/Tigase-5.2.0-beta3-b3257/./jars/org.apache.felix.main*.jar' ']'
+ '[' -z ']'
+ echo 'TIGASE_HOME is not set.'
TIGASE_HOME is not set.
+ echo 'Please set it to correct value before starting the sever.'
Please set it to correct value before starting the sever.
+ exit 1

Apparently it looks for Felix jar, even though this is not an OSGi mode.

Artur Hefczyc commented 1 decade ago

Workaround the problem:

Edit the etc/tigase.conf file and change line:

OSGI=false

to line:

#OSGI=false

Simply commenting this line out solves the problem.

The problem really is with testing this variable for boolean result. However Bash does not consider 'false' as false. For Bash false is either empty or 0.

wojciech.kapcia@tigase.net commented 1 decade ago

Actually you can check for true/false in bash, however it's not exactly boolean nor canonical, but given how installer operates on configuration files (tigase.conf) it's how it has to be done.

A fix of the script is in the repository.

Referenced from commit 1 year ago
Fixed issue #226, infinite loop in case a command is executed which is not implemented on the server yet.
git-svn-id: file:///home/svn/repos/tigase-server/trunk@2814 7d282ba1-3ae6-0310-8f9b-c9008a0864d2
kobit committed 1 decade ago
issue 1 of 1
Type
Bug
Priority
Major
Assignee
RedmineID
1508
Version
tigase-server-5.2.0
Issue Votes (0)
Watchers (0)
Reference
tigase/_server/server-core#226
Please wait...
Page is in error, reload to recover