[Logo] Terracotta Discussion Forums (LEGACY READ-ONLY ARCHIVE)
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
[Expert]
Session configurator problem  XML
Forum Index -> Terracotta for Web Sessions
Author Message
masch

neo

Joined: 05/16/2007 07:26:28
Messages: 2
Offline

Hi there!

Just tried to import a webapp with the session configurator, but there is a slight problem. When I try "Start all" with "Terracotta Sessions enabled" I get an error from Tomcat (from the one at port 9081 and 9082). The Terracotta Server starts normal without ans problem, but Tomcat aborts with following error:

"-Xbootclasspath/p:/usr/local/terracotta-2.3.0/tools/sessions/configurator-sandbox/../../../lib/dso-boot/dso-boot-hotspot_linux_150_11.jar -Dtc.install-root=/usr/local/terracotta-2.3.0/tools/sessions/configurator-sandbox/../../.. -Dtc.config=9082
2007-05-16 18:36:38,521 INFO - Terracotta version 2.3.0, as of 20070427-110443 (Revision 2739 by cruise@rh4mo0 from 2.3)
2007-05-16 18:36:39,909 WARN - We couldn't load configuration data from the file at '/usr/local/terracotta-2.3.0/tools/sessions/configurator-sandbox/9082'; this error is permanent, so this source will not be retried. (Error:
*******************************************************************************
The "file" '/usr/local/terracotta-2.3.0/tools/sessions/configurator-sandbox/9082' is actually a directory
*******************************************************************************
.)
2007-05-16 18:36:39,910 ERROR - Could not fetch configuration data from the file at '/usr/local/terracotta-2.3.0/tools/sessions/configurator-sandbox/9082'."


The same error also comes without my webapp and also with the latest trunk but not with Terracotta 2.2.0 from the Archive. But with 2.2.0 I have a problem with Includes and I've found an entry in the forum that this was maybe a bug in this version and might be patched, but I cann't find a patch anywehere for 2.2 to download.

Some furhter specs:
Java version is 1.5.0_11
Server is Debian with 2.6.20 kernel

Thanks a lot!
steve

ophanim

Joined: 05/24/2006 14:22:53
Messages: 619
Offline

Is that directory writable? I haven't tried running the configurator out of a non writable directory so I don't know that it would cause a problem but it's probably worth a try doing it from your home directory.

Want to post to this forum? Join the Terracotta Community
gkeim

ophanim

Joined: 12/05/2006 10:22:37
Messages: 685
Location: Terracotta, Inc.
Offline

The 2.3 Configurator on Linux is working fine for me.
Do you happen to have the TC_CONFIG environment variable set to something? That's about the only way -Dtc.config=9081 could be getting set like that.

Check the environment in which your running the Configurator for anything TC_*.

Gary Keim (terracotta developer) Want to post to this forum? Join the Terracotta Community
masch

neo

Joined: 05/16/2007 07:26:28
Messages: 2
Offline

Very strange. I tested it on a Ubuntu 7.04 Server (just wanted to test this distribution too) and on my Workstation which is too Ubuntu 7.04. On both systems I got the same error. I have now tested it on a Fedora and a Debian 4 system in it works flawless. I don't know if there is something about Ubuntu or it was just because on the machines ehere the problem accured was version 2.2.0 running before. I even tried differnt Java versions (even the one bundled with 2.2) but everytime the same strange problem as mentioned above.

I think my problems are solved with this anyway, the server didn't do any productive stuff till now so I will just but Debian 4 on it.

Thanks a lot again for your help.
ryan

neo

Joined: 06/11/2007 15:10:04
Messages: 3
Offline

I am running Ubuntu 7.04 and have the exact problem described above. I finally gave up on using the configurator and setup tomcat myself.
hhuynh

cherubim

Joined: 06/16/2006 11:54:06
Messages: 761
Offline

Hello,

The settings seems off when they set -Dtc.config in Ubuntu environment:

---

-Dtc.install-root=/usr/local/terracotta-2.3.0/tools/sessions/configurator-sandbox/../../.. -Dtc.config=9082

----

-Dtc.config is supposed to set to "localhost:9520" or the absolute path to "terracotta-2.3.0/tools/sessions/configurator-sandbox/tomcat5.5/tc-config.xml"

One thing you could try is:

%> export JAVA_OPTS="-Dtc.config=localhost:9510"

Then try the configuator again.

Hung-
gkeim

ophanim

Joined: 12/05/2006 10:22:37
Messages: 685
Location: Terracotta, Inc.
Offline

Ryan, would you tell me which web-container you were trying to use, as specified in the File->Servers dialog?

Also, how were you starting Configurator? Using the script or from the SampleLauncher?

Gary Keim (terracotta developer) Want to post to this forum? Join the Terracotta Community
leok

journeyman

Joined: 06/15/2007 14:32:18
Messages: 10
Offline

I ran into the same problem. I think the tomcat "start.sh" script has a bug -- the line where it says:

Code:
 . "${TC_INSTALL_DIR}"/bin/dso-env.sh -q"

expects to pass "-q" into dso-env.sh. Instead, it actually just inlines dso-env.sh and doesn't pass the "-q" as a param. If you notice in start.sh, the variable "PORT" is set to "$1", and "$1" is used as TC_CONFIG_PATH in dso-env.sh.

What should happen is this:
Code:
 eval "${TC_INSTALL_DIR}"/bin/dso-env.sh -q"

and export TC_INSTALL_DIR and TC_CONFIG_PATH.
leok

journeyman

Joined: 06/15/2007 14:32:18
Messages: 10
Offline

Actually, in start.sh, instead of
Code:
. "${TC_INSTALL_DIR}"/bin/dso-env.sh -q

It should just be:
Code:
set -- "-q"
 . ${TC_INSTALL_DIR}/bin/dso-env.sh

That should force "-q" to be sent to dso-env.sh and clear the existing args.
gkeim

ophanim

Joined: 12/05/2006 10:22:37
Messages: 685
Location: Terracotta, Inc.
Offline

I see what you're saying but I'd like to understand the difference between my installation of Ubuntu and these others where the problem occurs.

Could it be that bash isn't being used in these cases? Or bash has the C locale set, instead of posix? Or the other way around?

My reading of the bash man page says that ". script.sh <args>" should invoke script.sh in the calling context and pass <args> as positional parameters.

Seems like what's occurring in this case is that the calling context's positional params are being seen by dso-env.

Any ideas on why this is happening?

Gary Keim (terracotta developer) Want to post to this forum? Join the Terracotta Community
jgalang

master

Joined: 05/24/2006 15:08:59
Messages: 54
Offline

passing args to a sourced script, i think, is bash only.
could you try setting your shell to use bash, then use the configurator.

tnx.

Want to post to this forum? Please join the Terracotta community: >Sign up

leok

journeyman

Joined: 06/15/2007 14:32:18
Messages: 10
Offline

Well, AFAICT all the shell scripts for Terracotta are #!/bin/sh. The issue is that Ubuntu Feisty has /bin/sh aliased to "dash", which is stripped down in functionality. Debian Etch has /bin/sh aliased to "bash" (at least the two machines I have running). There's a bug filed for this in Ubuntu here:

https://launchpad.net/ubuntu/+source/dash/+bug/61463

Although it's been marked "rejected", there have been quite a few complaints about using dash even up to last week.
hhuynh

cherubim

Joined: 06/16/2006 11:54:06
Messages: 761
Offline

Ah, thanks for pointing that out. The easy fix for configurator scripts in Unbuntu is replace:

#!/bin/sh

with

#!/bin/bash

in tools/sessions/configurator-sandbox/tomcat5.5/start.sh and stop.sh


Hung-
gkeim

ophanim

Joined: 12/05/2006 10:22:37
Messages: 685
Location: Terracotta, Inc.
Offline

Just wanted to finish off this conversation by informing that the scripts will be changed for 2.4.1 such that both sh and bash are supported shells. We'll be using the set -- <new args> method, as suggested above.


Gary Keim (terracotta developer) Want to post to this forum? Join the Terracotta Community
 
Forum Index -> Terracotta for Web Sessions
Go to:   
Powered by JForum 2.1.7 © JForum Team