Trouble building jsvc

2008-03-14 Thread jarrod

Hi all. I'm trying to follow the Tomcat docs instructions for building jsvc.
I can't get past the ./configure step. Any help would be greatly
appreciated.

Trying to build on Ubuntu Linux. Linux linux-workstation 2.6.22-14-generic.

I've uninstalled all versions of Java except the JDK 6 I downloaded from
Sun. I set JAVA_HOME and added JAVA_HOME/bin to my PATH.

I tried to run it like this:

./configure --with-java=/usr/local/java/bin/java

I get this:

*** Current host ***
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking cached host system type... ok
*** C-Language compilation tools ***
checking for gcc... gcc
checking for C compiler default output file name... 
configure: error: C compiler cannot create executables
See `config.log' for more details.

Then I check the log and find...

Thread model: posix
gcc version 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)
configure:2131: $? = 0configure:2138: gcc -V 5
gcc: '-V' option must have argument
configure:2141: $? = 1
configure:2164: checking for C compiler default output file name
configure:2191: gccconftest.c  5
/usr/bin/ld: crt1.o: 
No such file: No such file or directory
collect2: ld returned 1 exit status
configure:2194: $? = 1
configure:2232: result: configure: failed program was:
| /* confdefs.h.  */
| #define PACKAGE_NAME 
| #define PACKAGE_TARNAME 
| #define PACKAGE_VERSION 
| #define PACKAGE_STRING 
| #define PACKAGE_BUGREPORT 
| /* end confdefs.h.  */
| 
| int
| main ()
| {
| 
|   ;
|   return 0;
| }
configure:2239: error: C compiler cannot create executables
See `config.log' for more details.



-

ebdb
http://aeondust.com
-- 
View this message in context: 
http://www.nabble.com/Trouble-building-jsvc-tp16055587p16055587.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Trouble building jsvc

2008-03-14 Thread jarrod

Thanks for the reply.

 which version of jsvc do you try to compile?

The one distributed with Tomcat 6.0.16. It's in tomcat/bin as jsvc.tar.gz.

 Which docs page are you referring to?

I mean the main Tomcat site...

http://tomcat.apache.org/tomcat-5.5-doc/setup.html

I also checked the file INSTALL.txt that's inside jsvc.tar.gz.

I tried generating the configure script using autoconf. And also I tried
what it said in INSTALL.txt:

sh support/buildconf.sh

Same result each time -- what I described.


Rainer Jung-3 wrote:
 
 I downloaded commons-daemon-1.0.1 (the most recent although 3 years old) 
 and it runs configure without problems. I compared the line numbers from 
 your output and they don't coincide with mine. So either you are using a 
 strange jsvc version, or you regenerated the configure script. Check if 
 your configure script still has an old time stamp (mine is May 17, 2005) 
 and is located in daemon-1.0.1/src/native/unix.
 
 Regards,
 
 Rainer
 

Yeah, I guess we're using different versions. I had not heard of
commons-daemon before. I was going by the docs on the Tomcat site.

Is it better to use commons daemon?

Ethan

-

ebdb
http://aeondust.com
-- 
View this message in context: 
http://www.nabble.com/Trouble-building-jsvc-tp16055587p16062054.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Trouble building jsvc

2008-03-15 Thread jarrod



Rainer Jung-3 wrote:
 
 Hi Ethan,
 
 jarrod schrieb:
 which version of jsvc do you try to compile?
 
 The one distributed with Tomcat 6.0.16. It's in tomcat/bin as
 jsvc.tar.gz.
 
 OK, I checked and that one is identical to the one I tried 
 (commons-daemon 1.0.1).
 
 
 Which docs page are you referring to?
 
 I mean the main Tomcat site...
 
 http://tomcat.apache.org/tomcat-5.5-doc/setup.html
 
 I also checked the file INSTALL.txt that's inside jsvc.tar.gz.
 
 I tried generating the configure script using autoconf. And also I tried
 what it said in INSTALL.txt:
 
 sh support/buildconf.sh
 
 You should *not* do that without special reason. Usually the configure 
 file provided as is should be fine. I assume the config.log you posted 
 came from the configure you recreated and that was the reason for the 
 line numbers that differed from mine. Let's ignore this for the moment, 
 since you get the same problem with the original configure.
 
 Same result each time -- what I described.
 
 
 So let's look at your config.log:
 
 Thread model: posix
 gcc version 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)
 
 H prerelease ...
 
 configure:2131: $? = 0configure:2138: gcc -V 5
 gcc: '-V' option must have argument
 configure:2141: $? = 1
 
 The -V problem we should ignore. I get the same error, but apart from 
 that configure works and make too. The -V thing is an ancient way of 
 determining gcc version that does not work any more.
 
 configure:2164: checking for C compiler default output file name
 configure:2191: gccconftest.c  5
 /usr/bin/ld: crt1.o: 
 No such file: No such file or directory
 collect2: ld returned 1 exit status
 configure:2194: $? = 1
 configure:2232: result: configure: failed program was:
 | /* confdefs.h.  */
 | #define PACKAGE_NAME 
 | #define PACKAGE_TARNAME 
 | #define PACKAGE_VERSION 
 | #define PACKAGE_STRING 
 | #define PACKAGE_BUGREPORT 
 | /* end confdefs.h.  */
 | 
 | int
 | main ()
 | {
 | 
 |   ;
 |   return 0;
 | }
 configure:2239: error: C compiler cannot create executables
 
 Aha, here it breaks. So next I would try to compile this test program 
 myself, to see, if the compiler really is not able to compile the 
 snippet. If so, then something is wrong with your environment.
 
 So create a new file with the contents
 
 /* confdefs.h.  */
 #define PACKAGE_NAME 
 #define PACKAGE_TARNAME 
 #define PACKAGE_VERSION 
 #define PACKAGE_STRING 
 #define PACKAGE_BUGREPORT 
 /* end confdefs.h.  */
 
 int
 main ()
 {
 
;
return 0;
 }
 
 and try to compile it with gcc filename. See if you get a resulting 
 binary a.out or an error during compile/link.
 
 Regards,
 
 Rainer
 
 

Ranier, thanks a lot for the help. Now that it's Saturday, I don't have
access to that particular machine. I'll have to try your suggestion on
Monday.

In the meantime, I'm planning to set up a VPS machine this weekend, so once
I get that running and get to the point of installing Tomcat, I'll try
running make without running configure first, as you suggested.

Thanks,

Ethan

-

ebdb
http://aeondust.com
-- 
View this message in context: 
http://www.nabble.com/Trouble-building-jsvc-tp16055587p16072353.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



What is the best way to stop the tomcat daemon?

2008-03-16 Thread jarrod

Hi. I'm working on getting the Tomcat daemon running using jsvc. I've got it
basically running (thanks, Rainer). Now I'm not sure what is the best way to
stop it and to restart it.

If I call # ps aux | grep tomcat this is what I get:

[EMAIL PROTECTED] bin]# ps aux | grep tomcat
root  4305  0.0  0.2  45856  1208 pts/0S18:30   0:00 su tomcat
tomcat4306  0.0  0.2  10856  1476 pts/0S+   18:30   0:00 bash
root  4494  0.0  0.0   8000   340 ?Ss   18:58   0:00 jsvc.exec
-cp ./bin/bootstrap.jar -outfile ./logs/catalina.out -errfile
./logs/catalina.err org.apache.catalina.startup.Bootstrap -user tomcat
root  4495  1.2  4.5 336120 23724 ?Sl   18:58   0:00 jsvc.exec
-cp ./bin/bootstrap.jar -outfile ./logs/catalina.out -errfile
./logs/catalina.err org.apache.catalina.startup.Bootstrap -user tomcat
root  4511  0.0  0.1   5984   568 pts/1S+   18:58   0:00 grep tomcat

I could just run # kill -9 4494 and 4495, but I'm not sure it's correct to
do that. Maybe it will leave things in a messed up state? Any knowledgeable
advice would be appreciated.

Also, what if I just want to restart Tomcat?

Thanks,

Ethan

-

ebdb
http://aeondust.com
-- 
View this message in context: 
http://www.nabble.com/What-is-the-best-way-to-stop-the-tomcat-daemon--tp16085458p16085458.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Trouble building jsvc

2008-03-16 Thread jarrod

Thanks again, Rainer. I got it working on a different machine, not generating
the configure file. I don't know why the docs say to do that when it's
better not to.

Ethan


-

ebdb
http://aeondust.com
-- 
View this message in context: 
http://www.nabble.com/Trouble-building-jsvc-tp16055587p16085469.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat on Leopard

2008-03-16 Thread jarrod



David Smith-2 wrote:
 
 I can't speak for the OP, but as a long time Mac user, I know TextEdit's 
 default output is richtext.  It's a really annoying behavior of 
 TextEdit.  The OP should use either vi (if they're brave or have 
 experience in it) or a developer IDE like NetBeans or Eclipse to write 
 the initial file.  After that I believe TextEdit can be used and will 
 leave the file as text on future saves.
 
 --David
 

NetBeans and Eclipse are heavyweight IDEs and both require that you create a
project before you can edit any files. They aren't very convenient for just
editing random text files. If you're comfortable with the command line there
are vi, emacs, joe, nano, and others. If you're accustomed to graphical
tools, TextMate is good, but it's $60. There are probably free ones
available.

It's kind of weird that Macs don't come with a normal GUI text editor.

Ethan


-

ebdb
http://aeondust.com
-- 
View this message in context: 
http://www.nabble.com/Tomcat-on-Leopard-tp16075179p16086312.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: What is the best way to stop the tomcat daemon?

2008-03-17 Thread jarrod



David Smith-2 wrote:
 
 You should have gotten a sample service shell script in you jsvc 
 source.  Mine has this in the stop portion:
 
 jsvc -stop -pidfile $PID_FILE org.apache.catalina.startup.Bootstrap
 
 $PID_FILE is a shell variable containing the path of a file with the 
 process id of the running jsvc.  I customized the sample service script 
 and dropped it in the /etc/init.d folder so I could use service tomcat55 
 start|stop
 
 --David
 
 

Works great. Thanks!

Ethan
-- 
View this message in context: 
http://www.nabble.com/What-is-the-best-way-to-stop-the-tomcat-daemon--tp16085458p16094692.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



How to disable Tomcat Admin directory

2005-11-14 Thread Jarrod Holder
We have just installed Novell's GroupWise WebAccess 7 on our server.  This new 
version uses Tomcat 5.5 to provide service to our users.  However, Tomcat tries 
to listen on WEB_ROOT/admin for a non existent admin interface.  The problem is 
our main website uses the /admin directory for it's portal admin files.  
Therefore, we can no longer access our admin files for our portal.

How can we have Tomcat no longer listen for requests to the /admin directory?

Thank you.

Jarrod


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to disable Tomcat Admin directory

2005-11-14 Thread Jarrod Holder
Bruno,

Correct, we are getting the error you mention below.  However, we need to have 
Tomcat not respond to any request to the /admin directory at all.  In other 
words, if we go to the /admin directory, we get the actual /admin directory on 
our web server rather than Tomcat.

Hope that better explains our problem.

I made the change you mentioned to the server.xml file (actually, I made a 
backup of the file then removed the section in question entirely).  Yet I still 
get the Tomcat's administration web application... error.

One other point I should have mentioned, This is running on W2K server with IIS.

Thank you for your help.



 [EMAIL PROTECTED]  
Jarrold,

The latest versions of Tomcat do not include the admin webapp by default.
The /admin page displays:
Tomcat's administration web application is no longer installed by default.
Download and install the admin package to use it. 

Bruno Georges

Glencore International AG
Tel. +41 41 709 3204
Fax +41 41 709 3000


|-+---
| |   Jarrod Holder |
| |   [EMAIL PROTECTED]|
| |   .k12.ga.us |
| |   |
| |   14.11.05 22:41  |
| |   Please respond  |
| |   to Tomcat Users|
| |   List   |
| |   |
|-+---
  
--|
  | 
 |
  |To:  users@tomcat.apache.org   
 |
  |cc:  
 |
  |Subject: How to disable Tomcat Admin directory   
 |
  | 
 |
  |Distribute:  
 |
  |Personal?   |---|
 |
  || [ ] x |
 |
  ||---|
 |
  | 
 |
  
--|




We have just installed Novell's GroupWise WebAccess 7 on our server.  This
new version uses Tomcat 5.5 to provide service to our users.  However,
Tomcat tries to listen on WEB_ROOT/admin for a non existent admin
interface.  The problem is our main website uses the /admin directory for
it's portal admin files.  Therefore, we can no longer access our admin
files for our portal.

How can we have Tomcat no longer listen for requests to the /admin
directory?

Thank you.

Jarrod


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




LEGAL DISCLAIMER. The contents of this e-mail and any attachments are strictly
confidential and they may not be used or disclosed by someone who is not a
named recipient.
If you have received this email in error please notify the sender by replying
to this email inserting the word misdirected as the message and delete this
e-mail from your system.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to disable Tomcat Admin directory

2005-11-14 Thread Jarrod Holder
Mark,

The \conf\catalina\localhost directory is empty and there isn't an admin folder 
at \server\webapps.

The admin interface is not installed, I'm only trying to get Tomcat to stop 
responding when I hit the WEB_ROOT/admin folder from a web browser.  The reason 
being Tomcat is keeping users from getting to the real /admin folder on our 
server.

Thanks for your help.



 [EMAIL PROTECTED]  
Bruno Georges wrote:
 Hi Jarrold
 
 If I understood your question correctly you will have to edit the
 conf/server.xml file and proceed as indicated:
 
  !-- Comment these entries out to disable JMX MBeans support used for the
 administration web application --
   Listener className=org.apache.catalina.mbeans.ServerLifecycleListener
 /
   Listener
 className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener /
   Listener
 className=org.apache.catalina.storeconfig.StoreConfigLifecycleListener/
 
 Hope this helps.
 
 Bruno Georges

This won't disable the admin application.

Assuming Novell haven't messed about with the config too much, you 
will need to do the following:
1. Delete %CATALINA_HOME%\conf\Catalina\localhost\admin.xml
2. Delete %CATALINA_HOME%\server\webapps\admin
3. Restart Tomcat

2. isn't strictly necessary but it prevents any enthusiastic admins 
easily re-enabling it.

Mark


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to disable Tomcat Admin directory

2005-11-15 Thread Jarrod Holder
Mark,

I found and deleted the admin folder you mentioned.  However, I'm still
not getting the real admin folder on my web server.  Tomcat is still
responding but with a 404 - The requested resource (/admin/) is not
available.

I even tried killing the entire webapps\ROOT folder, but that didn't
help either.  

Thanks again for your help on this.



 [EMAIL PROTECTED]  
Jarrod Holder wrote:
 Mark,
 
 The \conf\catalina\localhost directory is empty and there isn't an
admin folder at \server\webapps.
 
 The admin interface is not installed, I'm only trying to get Tomcat to
stop responding when I hit the WEB_ROOT/admin folder from a web browser.
 The reason being Tomcat is keeping users from getting to the real
/admin folder on our server.

Just found this. Whilst looking at something else entirely. Does the 
following file exist? If so delete it.

\webapps\ROOT\admin

Mark


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Trouble with APR and Tomcat 5.5.15

2007-04-17 Thread Jarrod Cuzens
Hi All,

 

  We are currently experimenting with APR and libtcnative on our
machines. We have a machine in test that we configured and things when
quite smoothly (although it was RHEL4 and the production box we are
testing is CentOS). When we start tomcat and include all the relevant
library paths in the java.library.path we can see APR attempt to load
but it continually fails and reports that the socket was already in use.
When we remove the java.library.path (effectively turning off APR) we
restart and the server starts correctly with no complaints. We can
readily switch between the two configs and always get the same behavior.
I tried upgrading the Tomcat Native to the one from Tomcat 5.5.23 but
this has made no difference. I also tried running the server as root to
determine if this could have any impact but it did not make any
difference. I have included some relevant information below. Any help
you can give would be greatly appreciated.

 

Thanks,

Jarrod

 

+--+

Tomcat 5.5.15

APR 1.2.8

Tomcat Native 1.1.6

 

Linux version 2.6.9-42.0.3.ELsmp ([EMAIL PROTECTED])
(gcc version 3.4.6 20060404 (Red Hat 3.4.6-3)) #1 SMP Fri Oct 6 06:28:26
CDT 2006

 

ldd libtcnative-1.so

libapr-1.so.0 = /usr/local/apr/lib/libapr-1.so.0
(0x002a95678000)

librt.so.1 = /lib64/tls/librt.so.1 (0x002a957a8000)

libcrypt.so.1 = /lib64/libcrypt.so.1 (0x002a958c2000)

libpthread.so.0 = /lib64/tls/libpthread.so.0
(0x002a959f7000)

libdl.so.2 = /lib64/libdl.so.2 (0x002a95b0c000)

libssl.so.4 = /lib64/libssl.so.4 (0x002a95c0f000)

libcrypto.so.4 = /lib64/libcrypto.so.4 (0x002a95d4c000)

libc.so.6 = /lib64/tls/libc.so.6 (0x002a95f7c000)

/lib64/ld-linux-x86-64.so.2 (0x00552000)

libgssapi_krb5.so.2 = /usr/lib64/libgssapi_krb5.so.2
(0x002a961b)

libkrb5.so.3 = /usr/lib64/libkrb5.so.3 (0x002a962c7000)

libcom_err.so.2 = /lib64/libcom_err.so.2 (0x002a96438000)

libk5crypto.so.3 = /usr/lib64/libk5crypto.so.3
(0x002a9653a000)

libresolv.so.2 = /lib64/libresolv.so.2 (0x002a9665e000)

libz.so.1 = /usr/lib64/libz.so.1 (0x002a96773000)

 

server.xml:

Connector port=8080 maxHttpHeaderSize=8192

   maxThreads=150 minSpareThreads=25
maxSpareThreads=75

   enableLookups=false redirectPort=8443
acceptCount=100

   connectionTimeout=2 disableUploadTimeout=false
unpackWARs=false

   compression=off compressionMinSize=2048

   compressableMimeType=text/html

/

 

Connector port=8443 maxHttpHeaderSize=8192

   maxThreads=150 minSpareThreads=25
maxSpareThreads=75

   enableLookups=false connectionTimeout=2
disableUploadTimeout=false

   acceptCount=100 scheme=https secure=true

 

SSLEngine=on

SSLCertificateFile=##

SSLCertificateKeyFile=##

SSLPassword=##

 

   clientAuth=false sslProtocol=TLS

keystoreFile=## keystorePass=##

keystoreType=PKCS12/

 

 

catalina.log

Apr 17, 2007 1:28:48 PM org.apache.coyote.http11.Http11AprProtocol init

SEVERE: Error initializing endpoint

java.lang.Exception: Socket bind failed: Address already in use

at
org.apache.tomcat.util.net.AprEndpoint.init(AprEndpoint.java:544)

at
org.apache.coyote.http11.Http11AprProtocol.init(Http11AprProtocol.java:1
15)

at
org.apache.catalina.connector.Connector.initialize(Connector.java:1016)

at
org.apache.catalina.core.StandardService.initialize(StandardService.java
:580)

at
org.apache.catalina.core.StandardServer.initialize(StandardServer.java:7
82)

at org.apache.catalina.startup.Catalina.load(Catalina.java:503)

at org.apache.catalina.startup.Catalina.load(Catalina.java:523)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)

at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)

at java.lang.reflect.Method.invoke(Method.java:597)

at
org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:247)

at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:412)

Apr 17, 2007 1:28:48 PM org.apache.catalina.startup.Catalina load

SEVERE: Catalina.start

LifecycleException:  Protocol handler initialization failed:
java.lang.Exception: Socket bind failed: Address already in use

at
org.apache.catalina.connector.Connector.initialize(Connector.java:1018)

at
org.apache.catalina.core.StandardService.initialize(StandardService.java
:580)

at
org.apache.catalina.core.StandardServer.initialize(StandardServer.java:7
82