tomcat 7.0.29 build fails with dbcp target enabled; ok if disabled.

2012-07-24 Thread k9157
building Tomcat7 from src (apache-tomcat-7.0.29-src) with

java -version
java version 1.7.0_b147-icedtea
OpenJDK Runtime Environment (suse-27.1-x86_64)
OpenJDK 64-Bit Server VM (build 23.0-b21, mixed mode)

from Opensuse 12.1's repos
(http://download.opensuse.org/repositories/Java:/openjdk6:/Factory/openSUSE_12.1/x86_64/),


ant -version
Apache Ant(TM) version 1.8.4 compiled on July 22 2012

works fine with 'dbcp' target disabled,

ant clean clean-depend
ant -Dno.build.dbcp=true

...
BUILD SUCCESSFUL
Total time: 16 seconds

but FAILs when it's enabled,

ant clean clean-depend
ant

...
build-tomcat-dbcp:
 [copy] Copying 68 files to
 /usr/local/src/tomcat-build-dls/tomcat7-deps/dbcp
[mkdir] Created dir:

/usr/local/src/tomcat-build-dls/tomcat7-deps/dbcp/src/java/org/apache/tomcat/dbcp
 [move] Moving 64 files to
 
/usr/local/src/tomcat-build-dls/tomcat7-deps/dbcp/src/java/org/apache/tomcat/dbcp
[mkdir] Created dir:
/usr/local/src/tomcat-build-dls/tomcat7-deps/dbcp/classes
[javac] Compiling 64 source files to
/usr/local/src/tomcat-build-dls/tomcat7-deps/dbcp/classes
[javac] warning: [options] bootstrap class path not
set in conjunction with -source 1.6
[javac]

/usr/local/src/tomcat-build-dls/tomcat7-deps/dbcp/src/java/org/apache/tomcat/dbcp/dbcp/BasicDataSource.java:53:
error: BasicDataSource is not abstract and does not
override abstract method getParentLogger() in
CommonDataSource
[javac] public class BasicDataSource implements
DataSource {
[javac]^
[javac]

/usr/local/src/tomcat-build-dls/tomcat7-deps/dbcp/src/java/org/apache/tomcat/dbcp/dbcp/DelegatingStatement.java:46:
error: DelegatingStatement is not abstract and does
not override abstract method isCloseOnCompletion()
in Statement
[javac] public class DelegatingStatement extends
AbandonedTrace implements Statement {
[javac]^
[javac]

/usr/local/src/tomcat-build-dls/tomcat7-deps/dbcp/src/java/org/apache/tomcat/dbcp/dbcp/DelegatingPreparedStatement.java:57:
error: DelegatingPreparedStatement is not abstract
and does not override abstract method
isCloseOnCompletion() in Statement
[javac] public class DelegatingPreparedStatement
extends DelegatingStatement
[javac]^
[javac]

/usr/local/src/tomcat-build-dls/tomcat7-deps/dbcp/src/java/org/apache/tomcat/dbcp/dbcp/DelegatingCallableStatement.java:58:
error: DelegatingCallableStatement is not abstract
and does not override abstract method
TgetObject(String,ClassT) in CallableStatement
[javac] public class DelegatingCallableStatement
extends DelegatingPreparedStatement
[javac]^
[javac]   where T is a type-variable:
[javac] T extends Object declared in method
TgetObject(String,ClassT)
[javac]

/usr/local/src/tomcat-build-dls/tomcat7-deps/dbcp/src/java/org/apache/tomcat/dbcp/dbcp/DelegatingConnection.java:65:
error: DelegatingConnection is not abstract and does
not override abstract method getNetworkTimeout() in
Connection
[javac] public class DelegatingConnection extends
AbandonedTrace
[javac]^
[javac]

/usr/local/src/tomcat-build-dls/tomcat7-deps/dbcp/src/java/org/apache/tomcat/dbcp/dbcp/DelegatingDatabaseMetaData.java:41:
error: DelegatingDatabaseMetaData is not abstract
and does not override abstract method
generatedKeyAlwaysReturned() in DatabaseMetaData
[javac] public class DelegatingDatabaseMetaData
extends AbandonedTrace
[javac]^
[javac]

/usr/local/src/tomcat-build-dls/tomcat7-deps/dbcp/src/java/org/apache/tomcat/dbcp/dbcp/DelegatingResultSet.java:61:
error: 

Re: tomcat 7.0.29 build fails with dbcp target enabled; ok if disabled.

2012-07-24 Thread k9157


On Tue, Jul 24, 2012, at 06:11 PM, Caldarale, Charles R wrote:
 Tomcat 7 must be built with JDK 6 due to incompatibilities introduced by
 Sun/Oracle in JRE 7.  Once built, you may run Tomcat 7 under JRE/JDK 7. 
 Tomcat 8 will be buildable with JDK 7.

As JDK7 is our stanrard fare, is there a Tomcat 8 roadmap / release
schedule available?

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



launching Tomcat7 with jsvc. Want only one Tomcat instance, but 'ps' shows two -- or does it?

2012-07-23 Thread k9157
I've built/installed Tomcat 7.0.29 from source on linux/64.

I've setup an init.d using jsvc launch, loosely based on the src-bundled
daemon.sh script.

@ tomcat service launch, using out-of-the-box config for now, I see two
listeners on ONE pid,

netstat -pan --tcp | grep jsvc
tcp0  0 :::8080 :::*
   LISTEN  30891/jsvc.exec
tcp0  0 :::8009 :::*
   LISTEN  30891/jsvc.exec

but note that actually TWO procs/pids exist,

ps ax | grep jsvc
30890 ?Ss 0:00 jsvc.exec -user tomcat
-java-home /etc/alternatives/java_sdk -pidfile
/var/run/tomcat7/tomcat7.pid -classpath

/usr/local/tomcat7/build/bin/bootstrap.jar:/usr/local/tomcat7/build/bin/commons-daemon.jar:/usr/local/tomcat7/build/bin/tomcat-juli.jar

-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager

-Djava.util.logging.config.file=/usr/local/etc/tomcat7/conf/logging.properties
-Djava.endorsed.dirs=
-Dcatalina.base=/usr/local/tomcat7/build
-Dcatalina.home=/usr/local/tomcat7/build
-Djava.io.tmpdir=/var/tmp/tomcat7 -outfile
/var/log/tomcat7/tomcat-initd.log -errfile 1 -wait 10
org.apache.catalina.startup.Bootstrap

30891 ?Sl 0:03 jsvc.exec -user tomcat
-java-home /etc/alternatives/java_sdk -pidfile
/var/run/tomcat7/tomcat7.pid -classpath

/usr/local/tomcat7/build/bin/bootstrap.jar:/usr/local/tomcat7/build/bin/commons-daemon.jar:/usr/local/tomcat7/build/bin/tomcat-juli.jar

-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager

-Djava.util.logging.config.file=/usr/local/etc/tomcat7/conf/logging.properties
-Djava.endorsed.dirs=
-Dcatalina.base=/usr/local/tomcat7/build
-Dcatalina.home=/usr/local/tomcat7/build
-Djava.io.tmpdir=/var/tmp/tomcat7 -outfile
/var/log/tomcat7/tomcat-initd.log -errfile 1 -wait 10
org.apache.catalina.startup.Bootstrap

I want only a *single* instance of tomcat running.

Seeing these TWO pids, is that actually TWO instaces?

Reading @ https://commons.apache.org/daemon/jsvc.html

How jsvc works
Jsvc uses 3 processes: a launcher process, a controller process
and a controlled process. ...

I suspect it's not, and I'm just seeing those ^^^, but wanted to get
some clarification.

Thanks.

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: launching Tomcat7 with jsvc. Want only one Tomcat instance, but 'ps' shows two -- or does it?

2012-07-23 Thread k9157
Hi

On Mon, Jul 23, 2012, at 01:10 PM, Jeff Beard wrote:
 ps is showing threads as processes, which occurs with some versions of
 Linux kernel. The listeners are 2 different threads: an AJP on 8009 and
 an
 HTTP on 8080.

Ok, so that sounds like one PID per thread, at least according to ps on
this kernel?

If the listeners are on 2 *different* threads, wouldn't they appear
'attached' to two *different* pids, then?

Rather than the same?

  netstat -pan --tcp | grep jsvc
  tcp0  0 :::8080 :::*  LISTEN
30891/jsvc.exec
  tcp0  0 :::8009 :::*  LISTEN
30891/jsvc.exec

I'll admit not being certain of the real import of this displayed info,
if any ...

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



@ Tomcat 7.0.29 shutdown, WARNING - Acceptor thread [null] failed to unlock. Forcing hard socket shutdown. It the warning a problem, or ignorable?

2012-07-23 Thread k9157
I've Tomcat 7.0.29 installed on linux/64.

@ service shutdown,

sh /etc/init.d/tomcat7 stop

I see in my logs two WARNING: Acceptor thread [null] failed to unlock.
Forcing hard socket shutdown:

INFO: Deploying web application directory
/usr/local/tomcat7/build/webapps/examples
Jul 23, 2012 11:18:35 AM
org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Jul 23, 2012 11:18:35 AM
org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Jul 23, 2012 11:18:35 AM
org.apache.catalina.core.ApplicationContext log
INFO: ContextListener:
attributeAdded('org.apache.jasper.compiler.TldLocationsCache',
'org.apache.jasper.compiler.TldLocationsCache@14d6cc5e')
Jul 23, 2012 11:18:35 AM
org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory
/usr/local/tomcat7/build/webapps/ROOT
Jul 23, 2012 11:18:35 AM
org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory
/usr/local/tomcat7/build/webapps/host-manager
Jul 23, 2012 11:18:36 AM
org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory
/usr/local/tomcat7/build/webapps/manager
Jul 23, 2012 11:18:36 AM
org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory
/usr/local/tomcat7/build/webapps/docs
Jul 23, 2012 11:18:36 AM
org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler [http-apr-8080]
Jul 23, 2012 11:18:36 AM
org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler [ajp-apr-8009]
Jul 23, 2012 11:18:36 AM
org.apache.catalina.startup.Catalina start
INFO: Server startup in 743 ms
Jul 23, 2012 12:24:12 PM
org.apache.coyote.AbstractProtocol pause
INFO: Pausing ProtocolHandler [http-apr-8080]
Jul 23, 2012 12:24:12 PM
org.apache.coyote.AbstractProtocol pause
INFO: Pausing ProtocolHandler [ajp-apr-8009]
Jul 23, 2012 12:24:12 PM
org.apache.catalina.core.StandardService stopInternal
INFO: Stopping service Catalina
Jul 23, 2012 12:24:12 PM
org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextDestroyed()
Jul 23, 2012 12:24:12 PM
org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextDestroyed()
Jul 23, 2012 12:24:12 PM
org.apache.coyote.AbstractProtocol stop
INFO: Stopping ProtocolHandler [http-apr-8080]
===Jul 23, 2012 12:24:22 PM
org.apache.tomcat.util.net.AprEndpoint stopInternal
WARNING: Acceptor thread [null] failed to unlock.
Forcing hard socket shutdown.
Jul 23, 2012 12:24:22 PM
org.apache.coyote.AbstractProtocol stop
INFO: Stopping ProtocolHandler [ajp-apr-8009]
===Jul 23, 2012 12:24:32 PM
org.apache.tomcat.util.net.AprEndpoint stopInternal
WARNING: Acceptor thread [null] failed to unlock.
Forcing hard socket shutdown.
Jul 23, 2012 12:24:32 PM
org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler [http-apr-8080]
Jul 23, 2012 12:24:32 PM
org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler [ajp-apr-8009]


I'm not sure how much weight to give these warnings.

Can/should they be ignored?

Or does their cause need to be hunted down and fixed?

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: launching Tomcat7 with jsvc. Want only one Tomcat instance, but 'ps' shows two -- or does it?

2012-07-23 Thread k9157


On Mon, Jul 23, 2012, at 04:15 PM, Christopher Schultz wrote:
  netstat -pan --tcp | grep jsvc tcp0  0 :::8080
  :::* LISTEN  30891/jsvc.exec tcp0  0 :::8009
  :::* LISTEN  30891/jsvc.exec
 
 jsvc's job is to allow the controlled process to open ports, so all
 ports will owned by the controlling process.

Clear, now.

  I want only a *single* instance of tomcat running.
 
 Don't worry, you only have a single instance of Tomcat running. If you
 had multiple instances running, you'd have a port conflict, right?
 
 Try this:
 
 $ ps afx
 
 Then, look at the output for 'jsvc' and you should see *three* linked
 processes. Since you only looked for 'jsvc' you aren't seeing the
 expected 3rd process (which is actually the instance of Tomcat you are
 so worried about).

I still see only two:

ps afx 
 20334 ?Ss 0:00 jsvc.exec -user tomcat -java-home
 /etc/alternatives/java_sdk -pidfile /var/run/tomcat7/tomcat7.pid
 -classpath
 
/usr/local/tomcat7/build/bin/bootstrap.jar:/usr/local/tomcat7/build/bin/commons-daemon.jar:/usr/loca
 ...
 20335 ?Sl 0:03  \_ jsvc.exec -user tomcat -java-home
 /etc/alternatives/java_sdk -pidfile /var/run/tomcat7/tomcat7.pid
 -classpath
 
/usr/local/tomcat7/build/bin/bootstrap.jar:/usr/local/tomcat7/build/bin/commons-daemon.jar:/usr/
 ...

No other instance of 'java', 'jsvc' or 'tomcat' in the output.

Thanks.

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: launching Tomcat7 with jsvc. Want only one Tomcat instance, but 'ps' shows two -- or does it?

2012-07-23 Thread k9157


  No other instance of 'java', 'jsvc' or 'tomcat' in the output.
 
 Hm. Re-reading the commons-daemon page, it looks like maybe the
 launcher process exits shortly after launch, leaving only two
 long-running processes: the controlling process (the one in the
 fork()/wait() loop) and the controlled process (the one that actually
 launches the JVM).
 
 At any rate, there is no concern, here, that two instances of Tomcat
 have been launched.

Clear enough.  Thanks!

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Tomcat 7.0.27 listens only @IPv6 localhost, ignores 'use IPv4' JAVA_OPTS in tomcat.conf. How to correctly force IPv4?

2012-07-22 Thread k9157

I've installed

rpm -qa | grep -i ^tomcat
tomcat-lib-7.0.27-7.1.noarch
tomcat-docs-webapp-7.0.27-7.1.noarch
tomcat-javadoc-7.0.27-7.1.noarch
tomcat-webapps-7.0.27-7.1.noarch
tomcat-admin-webapps-7.0.27-7.1.noarch
tomcat-servlet-3_0-api-7.0.27-7.1.noarch
tomcat-7.0.27-7.1.noarch
tomcat-el-2_2-api-7.0.27-7.1.noarch
tomcat-jsp-2_2-api-7.0.27-7.1.noarch


with

  update-alternatives --config java
  There are 2 choices for the alternative java (providing
  /usr/bin/java).
  
SelectionPath   Priority  
Status
  
0/usr/lib64/jvm/jre-1.7.0-openjdk/bin/java   17147
auto mode
  * 1/usr/lib64/jvm/jre-1.7.0-openjdk/bin/java   17147
  manual mode
2/usr/lib64/jvm/jre-1.7.0-sun/bin/java   1700 
manual mode

on

uname -a
Linux svr 3.1.10-1.16-desktop #1 SMP PREEMPT Wed Jun 27
05:21:40 UTC 2012 (d016078) x86_64 x86_64 x86_64
GNU/Linux

IPv4 is enabled on the server.  The IPv6 stack is also enabled, and
necessarily configured as,

grep bindv6only /etc/sysctl.conf
net.ipv6.bindv6only = 1

I want Tomcat listening on the IPv4 localhost @ 127.0.0.1.

So, reading here -
http://tomcat.10.n6.nabble.com/Tomcat-uses-IPv6-td2164369.html#a2164371
- and elsewhere, I set

vi /etc/tomcat/tomcat.conf
...
JAVA_OPTS=Djava.net.preferIPv4Stack=true
-Djava.net.preferIPv4Addresses=true
CATALINA_OPTS=Djava.net.preferIPv4Stack=true
-Djava.net.preferIPv4Addresses=true
...

now, @ tomcat start,

ps ax | grep tomcat
 6530 ?Sl 0:03 /etc/alternatives/jre/bin/java
 -Djava.net.preferIPv4Stack=true
 -Djava.net.preferIPv4Addresses=true
 -Djava.net.preferIPv4Stack=true
 -Djava.net.preferIPv4Addresses=true -classpath
 
:/usr/share/tomcat/bin/bootstrap.jar:/usr/share/tomcat/bin/tomcat-juli.jar:/usr/share/java/commons-daemon.jar
 -Dcatalina.base=/usr/share/tomcat
 -Dcatalina.home=/usr/share/tomcat -Djava.endorsed.dirs=
 -Djava.io.tmpdir=/var/cache/tomcat/temp
 
-Djava.util.logging.config.file=/usr/share/tomcat/conf/logging.properties
 -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
 org.apache.catalina.startup.Bootstrap start

but, Tomcat still listens only on IPv6

netstat -pan --tcp | grep 8080
tcp0  0 :::8080 :::*
   LISTEN  6530/java

and is unavailable/unreachable @ 127.0.0.1

telnet 127.0.0.1 8080
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused

telnet ::1 8080
Trying ::1...
Connected to ::1.
Escape character is '^]'.
telnet

has the method for getting Tomcat to listen only @ IPv4 changed for v7?

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat 7.0.27 listens only @IPv6 localhost, ignores 'use IPv4' JAVA_OPTS in tomcat.conf. How to correctly force IPv4?

2012-07-22 Thread k9157
Hi,

On Sun, Jul 22, 2012, at 09:29 AM, Tony Anecito wrote:
 I do it at the OS level via the adaptor properties for windows. If your
 network does not support IPv6 I would disable it else you will get errors
 in your logs about IPv6 for like say DHCP assignment.

My network supports IPv6 just fine.

This server is configured for dual-stack, with separate sockets
specified for IPv4  IPv6 as defined at:

https://www.kernel.org/doc/man-pages/online/pages/man7/ipv6.7.html

IPV6_V6ONLY (since Linux 2.4.21 and 2.6)
  If this flag is set to true (nonzero),
  then the socket is restricted to
  sending and receiving IPv6 packets only. 
  In this case, an IPv4 and an
  IPv6 application can bind to a single port
  at the same time.

  If this flag is set to false (zero), then
  the socket can be used to
  send and receive packets to and from an
  IPv6 address or an IPv4-mapped
  IPv6 address.

  The argument is a pointer to a boolean
  value in an integer.

  The default value for this flag is defined
  by the contents of the file
  /proc/sys/net/ipv6/bindv6only.  The
  default value for that file is 0
  (false).

In this config, any/all other apps on the box can be easily configured
to listen on IPv4 /or IPv6.

I need Tomcat to listen/respond on IPv4 localhost @ 127.0.0.1.

Atm, it appears to be ignoring instructions to do so.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat 7.0.27 listens only @IPv6 localhost, ignores 'use IPv4' JAVA_OPTS in tomcat.conf. How to correctly force IPv4?

2012-07-22 Thread k9157
reading here on this issue:

Re: Tomcat is only listening with ip6 and not ip4
http://linux.derkeiler.com/Mailing-Lists/Debian/2009-12/msg01262.html

 ... Thus you should report a bug against Tomcat. Also
you can replace net.ipv6.bindv6only=1 with
net.ipv6.bindv6only=0 in your /etc/sysctl.d/ as a
temporary solution. ...

filed - 

Bug 53583 - Tomcat 7.0.27 ignores 'use IPv4' JAVA_OPTS in tomcat.conf,
listens only @IPv6 localhost when separate IPv4/IPv6 sockets are
specified
https://issues.apache.org/bugzilla/show_bug.cgi?id=53583

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat 7.0.27 listens only @IPv6 localhost, ignores 'use IPv4' JAVA_OPTS in tomcat.conf. How to correctly force IPv4?

2012-07-22 Thread k9157
Hi,

On Sun, Jul 22, 2012, at 01:24 PM, Tim Watts wrote:
 On Sun, 2012-07-22 at 08:03 -0700, k9...@operamail.com wrote:
  Linux svr 3.1.10-1.16-desktop #1 SMP PREEMPT Wed Jun 27
  05:21:40 UTC 2012 (d016078) x86_64 x86_64 x86_64
  GNU/Linux
  
  IPv4 is enabled on the server.  The IPv6 stack is also enabled, and
  necessarily configured as,
  
  grep bindv6only /etc/sysctl.conf
  net.ipv6.bindv6only = 1
  
  I want Tomcat listening on the IPv4 localhost @ 127.0.0.1.
 
 So you want Tomcat to listen on all IPv6 addresses plus the IPv4
 loopback address but no other IPv4 addresses?

No.  I want Tomcat7 to listen ONLY on one address: the IPv4 loopback @
127.0.0.1.  No other IPv4 addresses, and no IPv6 addresses at all.

Specifying a listener proptocol, address  port should be a fairly
commonplace undertaking ...

 Since you've told the OS to not allow IPv4 connections on IPv6 sockets,
 I believe you would need to configure a separate Connector on the same
 port for the IPv4 loopback address.

Not sure if this, then, still holds.

I'd understaood that those 'use IPv4' -D options should do exactly what
I intend to here.   Apparently not, though ...

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat 7.0.27 listens only @IPv6 localhost, ignores 'use IPv4' JAVA_OPTS in tomcat.conf. How to correctly force IPv4?

2012-07-22 Thread k9157
 What happens if you install a real Tomcat from tomcat.apache.org

same issue

 What do your Connector elements in your server.xml file look like?

It's out-of-the-box:

  ...
  Service name=Catalina
Connector port=8080 protocol=HTTP/1.1
   connectionTimeout=2
   redirectPort=8443 /
Connector port=8009 protocol=AJP/1.3 redirectPort=8443 /
Engine name=Catalina defaultHost=localhost
  ...

 Have you installed APR?

yes.

apr-2-config --version
2.0.0
svn info `apr-2-config --srcdir` | egrep URL|Revision
URL: https://svn.apache.org/repos/asf/apr/apr/trunk
Revision: 1363601

 What's in the Tomcat logs

@ start,

ps ax | grep -i java
21972 ?Sl 0:03
/etc/alternatives/jre/bin/java
-Djava.net.preferIPv4Stack=true
-Djava.net.preferIPv4Addresses=true -classpath

:/usr/share/tomcat/bin/bootstrap.jar:/usr/share/tomcat/bin/tomcat-juli.jar:/usr/share/java/commons-daemon.jar
-Dcatalina.base=/usr/share/tomcat
-Dcatalina.home=/usr/share/tomcat -Djava.endorsed.dirs=
-Djava.io.tmpdir=/var/cache/tomcat/temp

-Djava.util.logging.config.file=/usr/share/tomcat/conf/logging.properties

-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
org.apache.catalina.startup.Bootstrap start

logs:

== catalina.2012-07-22.log ==
Jul 22, 2012 10:46:04 AM
org.apache.catalina.core.AprLifecycleListener init
INFO: Loaded APR based Apache Tomcat Native library 1.1.23.

== catalina.out ==
Jul 22, 2012 10:46:04 AM
org.apache.catalina.core.AprLifecycleListener init
INFO: Loaded APR based Apache Tomcat Native library 1.1.23.

== catalina.2012-07-22.log ==
Jul 22, 2012 10:46:04 AM
org.apache.catalina.core.AprLifecycleListener init
INFO: APR capabilities: IPv6 [true], sendfile [true], accept
filters [false], random [true].

== catalina.out ==
Jul 22, 2012 10:46:04 AM
org.apache.catalina.core.AprLifecycleListener init
INFO: APR capabilities: IPv6 [true], sendfile [true], accept
filters [false], random [true].

== catalina.2012-07-22.log ==
Jul 22, 2012 10:46:04 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler [http-apr-8080]

== catalina.out ==
Jul 22, 2012 10:46:04 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler [http-apr-8080]

== catalina.2012-07-22.log ==
Jul 22, 2012 10:46:04 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler [ajp-apr-8009]

== catalina.out ==
Jul 22, 2012 10:46:04 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler [ajp-apr-8009]

== catalina.2012-07-22.log ==
Jul 22, 2012 10:46:04 AM org.apache.catalina.startup.Catalina
load
INFO: Initialization processed in 667 ms

== catalina.out ==
Jul 22, 2012 10:46:04 AM org.apache.catalina.startup.Catalina
load
INFO: Initialization processed in 667 ms

== catalina.2012-07-22.log ==
Jul 22, 2012 10:46:04 AM
org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina

== catalina.out ==
Jul 22, 2012 10:46:04 AM
org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina

== catalina.2012-07-22.log ==
Jul 22, 2012 10:46:04 AM org.apache.catalina.core.StandardEngine
startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.27

== catalina.out ==
Jul 22, 2012 10:46:04 AM org.apache.catalina.core.StandardEngine
startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.27

== catalina.2012-07-22.log ==
Jul 22, 2012 10:46:04 AM org.apache.catalina.startup.HostConfig
deployDirectory
INFO: Deploying web application directory
/srv/tomcat/webapps/manager

== catalina.out ==
Jul 22, 2012 10:46:04 AM org.apache.catalina.startup.HostConfig
deployDirectory
INFO: Deploying web application directory
/srv/tomcat/webapps/manager

== catalina.2012-07-22.log ==
Jul 22, 2012 10:46:04 AM org.apache.catalina.startup.HostConfig
deployDirectory
INFO: Deploying web application directory
/srv/tomcat/webapps/examples

== catalina.out ==
Jul 22, 2012 10:46:04 AM org.apache.catalina.startup.HostConfig
deployDirectory
INFO: Deploying web application directory
/srv/tomcat/webapps/examples

== localhost.2012-07-22.log ==
Jul 22, 2012 10:46:04 AM

Re: Tomcat 7.0.27 listens only @IPv6 localhost, ignores 'use IPv4' JAVA_OPTS in tomcat.conf. How to correctly force IPv4?

2012-07-22 Thread k9157
Hi,

On Sun, Jul 22, 2012, at 02:08 PM, Tim Watts wrote:
  No.  I want Tomcat7 to listen ONLY on one address: the IPv4 loopback @
  127.0.0.1.  No other IPv4 addresses, and no IPv6 addresses at all.
  
 Oh, that's easy: specify address=127.0.0.1 on your Connector.  

it certainly appears to be:

vi /etc/tomcat/server.xml

...
  Connector port=8080 protocol=HTTP/1.1
+  address=127.0.0.1
   connectionTimeout=2
   redirectPort=8443 /
...


service tomcat start
netstat -pan --tcp | grep java
tcp0  0 127.0.0.1:8080  0.0.0.0:*   
   LISTEN  25254/java
tcp0  0 127.0.0.1:8005  :::*
   LISTEN  25254/java
tcp0  0 :::8009 :::*
   LISTEN  25254/java

Thanks!

 By default, Tomcat will listen on port 8080 on all available addresses
 (IPv6 and 4, barring configuration settings at the OS level).  The key
 word in those java.net properties is prefer (i.e. not require).
 So the door is still open to IPv6 even with these properties.


I still would presume that, given the specification of prefer, when
localhost is referenced, given the choice of either IPv4 or IPv6 in a
functional dual-stack, that it *would* prefer and select IPv4, i.e.,
127.0.0.1.

apparently, not the case.

clarification noted.

cheers.

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat 7.0.27 listens only @IPv6 localhost, ignores 'use IPv4' JAVA_OPTS in tomcat.conf. How to correctly force IPv4?

2012-07-22 Thread k9157


On Sun, Jul 22, 2012, at 08:42 PM, André Warnier wrote:
 You still have a Connector listening on port 8009 (and IPv6). You may
 want to disable that  one too (the AJP connector), to match your above 
 desires.

Of course.  Now at,

netstat -pan --tcp | grep java
tcp0  0 127.0.0.1:8080  0.0.0.0:*  
LISTEN  29141/java  
tcp0  0 127.0.0.1:8005  0.0.0.0:*  
LISTEN  29141/java  
tcp0  0 127.0.0.1:8009  0.0.0.0:*  
LISTEN  29141/java  

thanks!

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat 7.0.27 listens only @IPv6 localhost, ignores 'use IPv4' JAVA_OPTS in tomcat.conf. How to correctly force IPv4?

2012-07-22 Thread k9157
Hi,

On Sun, Jul 22, 2012, at 03:57 PM, Tim Watts wrote:
 But doing so would close the door on ::1, turning prefer into
 require.  Whereas binding on ::* allows both IPv6  4 in.  I guess
 what's confusing in all this is that the preferences just deal with
 outbound addresses and connections (e.g. preferIPv4Stack means the JVM
 will send out IPv4 packets etc.).
 
 It's worth noting that, even if it did behave this way, you would still
 have needed to specify the loopback address.  Otherwise Tomcat would
 have been accessible on any IPv4 address configured on the node.  Just
 setting those properties would never have been sufficient for what you
 were really after.

I've read a bunch trying to get this straight.  Lots of noise, and I was
still off track on the outbound vs inbound behavior.

@ bug insist that the behavior as is - which has managed to confuse
quite a few others as well, resulting in numerous suggestions to 'file a
bug' - is simply a config problem on my end,   It seems they're happy
with that, and that this is expected/clear behavior.  To each their own
...

Thanks for being patient and taking the time to clarify.  Again, noted 
appreciated!

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org