You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Manak Bisht <ma...@iiitd.ac.in> on 2024/03/21 09:38:36 UTC

Re: Use JAVA/CATALINA_OPTS arguments in server.xml

Thanks, Chuck!
This works for defining the port but does not work for the host.

<Member className="org.apache.catalina.tribes.membership.StaticMember"
port="4000" host="${tomcat.member:-localhost}"/>
<Member className="org.apache.catalina.tribes.membership.StaticMember"
port="4000" host="${tomcat.member:-127.0.0.1}"/>

Using either of the above throws the following error,

21-Mar-2024 15:04:58.185 SEVERE [GroupChannel-Heartbeat-1]
org.apache.catalina.tribes.group.interceptors.TcpFailureDetector.memberAlive
Unable to perform failure detection check, assuming member down.
 java.net.UnknownHostException: addr is of illegal length
at java.net.InetAddress.getByAddress(InetAddress.java:1042)
at java.net.InetAddress.getByAddress(InetAddress.java:1439)
at
org.apache.catalina.tribes.group.interceptors.TcpFailureDetector.memberAlive(TcpFailureDetector.java:316)
at
org.apache.catalina.tribes.group.interceptors.TcpFailureDetector.memberAlive(TcpFailureDetector.java:305)
at
org.apache.catalina.tribes.group.interceptors.TcpFailureDetector.performForcedCheck(TcpFailureDetector.java:224)
at
org.apache.catalina.tribes.group.interceptors.TcpFailureDetector.checkMembers(TcpFailureDetector.java:213)
at
org.apache.catalina.tribes.group.interceptors.TcpPingInterceptor.sendPing(TcpPingInterceptor.java:132)
at
org.apache.catalina.tribes.group.interceptors.TcpPingInterceptor.heartbeat(TcpPingInterceptor.java:99)
at
org.apache.catalina.tribes.group.ChannelInterceptorBase.heartbeat(ChannelInterceptorBase.java:98)
at
org.apache.catalina.tribes.group.GroupChannel.heartbeat(GroupChannel.java:154)
at
org.apache.catalina.tribes.group.GroupChannel$HeartbeatThread.run(GroupChannel.java:692)

Sincerely,
Manak Bisht

Re: Use JAVA/CATALINA_OPTS arguments in server.xml

Posted by Christopher Schultz <ch...@christopherschultz.net>.
Manak,

On 3/21/24 09:57, Manak Bisht wrote:
> On Thu, 21 Mar 2024, 19:18 Christopher Schultz, <
> chris@christopherschultz.net> wrote:
> 
>> Manak,
>>
>> On 3/21/24 05:38, Manak Bisht wrote:
>>> Thanks, Chuck!
>>> This works for defining the port but does not work for the host.
>>>
>>> <Member className="org.apache.catalina.tribes.membership.StaticMember"
>>> port="4000" host="${tomcat.member:-localhost}"/>
>>> <Member className="org.apache.catalina.tribes.membership.StaticMember"
>>> port="4000" host="${tomcat.member:-127.0.0.1}"/>
>>>
>>> Using either of the above throws the following error,
>>>
>>> 21-Mar-2024 15:04:58.185 SEVERE [GroupChannel-Heartbeat-1]
>>>
>> org.apache.catalina.tribes.group.interceptors.TcpFailureDetector.memberAlive
>> Unable to perform failure detection check, assuming member down.
>>>    java.net.UnknownHostException: addr is of illegal length
>>> at java.net.InetAddress.getByAddress(InetAddress.java:1042)
>>> at java.net.InetAddress.getByAddress(InetAddress.java:1439)
>>> at
>>>
>> org.apache.catalina.tribes.group.interceptors.TcpFailureDetector.memberAlive(TcpFailureDetector.java:316)
>>> at
>>>
>> org.apache.catalina.tribes.group.interceptors.TcpFailureDetector.memberAlive(TcpFailureDetector.java:305)
>>> at
>>>
>> org.apache.catalina.tribes.group.interceptors.TcpFailureDetector.performForcedCheck(TcpFailureDetector.java:224)
>>> at
>>>
>> org.apache.catalina.tribes.group.interceptors.TcpFailureDetector.checkMembers(TcpFailureDetector.java:213)
>>> at
>>>
>> org.apache.catalina.tribes.group.interceptors.TcpPingInterceptor.sendPing(TcpPingInterceptor.java:132)
>>> at
>>>
>> org.apache.catalina.tribes.group.interceptors.TcpPingInterceptor.heartbeat(TcpPingInterceptor.java:99)
>>> at
>>>
>> org.apache.catalina.tribes.group.ChannelInterceptorBase.heartbeat(ChannelInterceptorBase.java:98)
>>> at
>>>
>> org.apache.catalina.tribes.group.GroupChannel.heartbeat(GroupChannel.java:154)
>>> at
>>>
>> org.apache.catalina.tribes.group.GroupChannel$HeartbeatThread.run(GroupChannel.java:692)
>>
>> What is the value of the system property "tomcat.member"?
>
 > I have not defined its value. It works fine if I do, however, I am
 > expecting it to use the default instead.

Yes, I agree. Can you run under a debugger and observe the value being 
set? Or recompile it with a log statement? I don't see much logging in 
that class, and I'm not familiar enough with the clustering code to know 
where best to enable logging to see the effective configuration.

-chris

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


Re: Use JAVA/CATALINA_OPTS arguments in server.xml

Posted by Konstantin Kolinko <kn...@gmail.com>.
чт, 21 мар. 2024 г. в 17:04, Manak Bisht <ma...@iiitd.ac.in>:
>
> I have not defined its value. It works fine if I do, however, I am
> expecting it to use the default instead.

How old is your version of Tomcat?

This feature dates back to spring of year 2020
https://github.com/apache/tomcat/commit/90b8ff2f330973bbe54dbbe3d702b3111bb781fc
https://github.com/apache/tomcat/commit/6f356df24241db9f655c8adb0c51aea95a2ab05d

Maybe you can test it first in some other more easily observable
place, e.g. in web.xml?

Best regards,
Konstantin Kolinko

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


Re: Use JAVA/CATALINA_OPTS arguments in server.xml

Posted by Manak Bisht <ma...@iiitd.ac.in>.
I have not defined its value. It works fine if I do, however, I am
expecting it to use the default instead.

Sincerely,
Manak Bisht

On Thu, 21 Mar 2024, 19:18 Christopher Schultz, <
chris@christopherschultz.net> wrote:

> Manak,
>
> On 3/21/24 05:38, Manak Bisht wrote:
> > Thanks, Chuck!
> > This works for defining the port but does not work for the host.
> >
> > <Member className="org.apache.catalina.tribes.membership.StaticMember"
> > port="4000" host="${tomcat.member:-localhost}"/>
> > <Member className="org.apache.catalina.tribes.membership.StaticMember"
> > port="4000" host="${tomcat.member:-127.0.0.1}"/>
> >
> > Using either of the above throws the following error,
> >
> > 21-Mar-2024 15:04:58.185 SEVERE [GroupChannel-Heartbeat-1]
> >
> org.apache.catalina.tribes.group.interceptors.TcpFailureDetector.memberAlive
> Unable to perform failure detection check, assuming member down.
> >   java.net.UnknownHostException: addr is of illegal length
> > at java.net.InetAddress.getByAddress(InetAddress.java:1042)
> > at java.net.InetAddress.getByAddress(InetAddress.java:1439)
> > at
> >
> org.apache.catalina.tribes.group.interceptors.TcpFailureDetector.memberAlive(TcpFailureDetector.java:316)
> > at
> >
> org.apache.catalina.tribes.group.interceptors.TcpFailureDetector.memberAlive(TcpFailureDetector.java:305)
> > at
> >
> org.apache.catalina.tribes.group.interceptors.TcpFailureDetector.performForcedCheck(TcpFailureDetector.java:224)
> > at
> >
> org.apache.catalina.tribes.group.interceptors.TcpFailureDetector.checkMembers(TcpFailureDetector.java:213)
> > at
> >
> org.apache.catalina.tribes.group.interceptors.TcpPingInterceptor.sendPing(TcpPingInterceptor.java:132)
> > at
> >
> org.apache.catalina.tribes.group.interceptors.TcpPingInterceptor.heartbeat(TcpPingInterceptor.java:99)
> > at
> >
> org.apache.catalina.tribes.group.ChannelInterceptorBase.heartbeat(ChannelInterceptorBase.java:98)
> > at
> >
> org.apache.catalina.tribes.group.GroupChannel.heartbeat(GroupChannel.java:154)
> > at
> >
> org.apache.catalina.tribes.group.GroupChannel$HeartbeatThread.run(GroupChannel.java:692)
>
> What is the value of the system property "tomcat.member"?
>
> -chris
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: Use JAVA/CATALINA_OPTS arguments in server.xml

Posted by Christopher Schultz <ch...@christopherschultz.net>.
Manak,

On 3/21/24 05:38, Manak Bisht wrote:
> Thanks, Chuck!
> This works for defining the port but does not work for the host.
> 
> <Member className="org.apache.catalina.tribes.membership.StaticMember" 
> port="4000" host="${tomcat.member:-localhost}"/>
> <Member className="org.apache.catalina.tribes.membership.StaticMember" 
> port="4000" host="${tomcat.member:-127.0.0.1}"/>
> 
> Using either of the above throws the following error,
> 
> 21-Mar-2024 15:04:58.185 SEVERE [GroupChannel-Heartbeat-1] 
> org.apache.catalina.tribes.group.interceptors.TcpFailureDetector.memberAlive Unable to perform failure detection check, assuming member down.
>   java.net.UnknownHostException: addr is of illegal length
> at java.net.InetAddress.getByAddress(InetAddress.java:1042)
> at java.net.InetAddress.getByAddress(InetAddress.java:1439)
> at 
> org.apache.catalina.tribes.group.interceptors.TcpFailureDetector.memberAlive(TcpFailureDetector.java:316)
> at 
> org.apache.catalina.tribes.group.interceptors.TcpFailureDetector.memberAlive(TcpFailureDetector.java:305)
> at 
> org.apache.catalina.tribes.group.interceptors.TcpFailureDetector.performForcedCheck(TcpFailureDetector.java:224)
> at 
> org.apache.catalina.tribes.group.interceptors.TcpFailureDetector.checkMembers(TcpFailureDetector.java:213)
> at 
> org.apache.catalina.tribes.group.interceptors.TcpPingInterceptor.sendPing(TcpPingInterceptor.java:132)
> at 
> org.apache.catalina.tribes.group.interceptors.TcpPingInterceptor.heartbeat(TcpPingInterceptor.java:99)
> at 
> org.apache.catalina.tribes.group.ChannelInterceptorBase.heartbeat(ChannelInterceptorBase.java:98)
> at 
> org.apache.catalina.tribes.group.GroupChannel.heartbeat(GroupChannel.java:154)
> at 
> org.apache.catalina.tribes.group.GroupChannel$HeartbeatThread.run(GroupChannel.java:692)

What is the value of the system property "tomcat.member"?

-chris

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