Caucho Forums  

This forum is permanently closed because of spam. For free community support, please visit Google Groups:


Go Back   Caucho Forums > Resin

Reply
 
Thread Tools Display Modes
  #1  
Old 07-06-2011, 05:55 PM
sherdilnow sherdilnow is offline
Junior Member
 
Join Date: Jul 2011
Posts: 2
Default resin:if causes No matching port

Hi,

I need to turn on secure port on resin conditionally. I noticed that using resin:if tag to do so, causes IllegalStateException. resin version is 3.1.16

Configuration:
<http id="" address="ipaddress" port="8080">
<resin:if test="true">
<http id="" address="ipaddress" port="8443">
<accept-listen-backlog>511</accept-listen-backlog>
<socket-timeout>120s</socket-timeout>
<openssl>
<certificate-file>/certificate.pem</certificate-file>
<password></password>
<ca-certificate-file>/ca.pem</ca-certificate-file>
<verify-client>require</verify-client>
</openssl>
</http>
</resin:if>

exception is
java.lang.IllegalStateException: No matching port for ipaddress:8443
at com.caucho.server.cluster.ClusterServer.bind(Clust erServer.java:445)
at com.caucho.server.resin.Resin.initMain(Resin.java: 1152)
at com.caucho.server.resin.Resin.main(Resin.java:1360 )

Removing resin:if makes resin start up properly. It looks like resin is not loading port configuration properly. Is resin:if not intended to be used this way?
Reply With Quote
  #2  
Old 07-08-2011, 11:24 PM
reza reza is offline
Super Moderator
 
Join Date: Nov 2009
Location: Philadelphia, PA
Posts: 101
Send a message via Skype™ to reza
Default

Hi,

Are you sure you are using 3.1.16? Where did you get that version from? Also, have you tried "*" instead of "ipaddress"?

Thanks,
Reza
Reply With Quote
  #3  
Old 07-12-2011, 01:21 AM
sherdilnow sherdilnow is offline
Junior Member
 
Join Date: Jul 2011
Posts: 2
Default

Sorry, It is resin 3.1.6. It was a typo. I set "ipaddress" to actual ip address.

Just to be clear, following config (without resin:if) works properly -

<http id="" address="ipaddress" port="8080">

<http id="" address="ipaddress" port="8443">
<accept-listen-backlog>511</accept-listen-backlog>
<socket-timeout>120s</socket-timeout>
<openssl>
<certificate-file>/certificate.pem</certificate-file>
<password></password>
<ca-certificate-file>/ca.pem</ca-certificate-file>
<verify-client>require</verify-client>
</openssl>
</http>

It is only when I add <resin:if test="true"></resin:if> around secure port config, I get the following error. It looks like when resin configuration is parsed, before evaluating <resin:if> conditions. The secure port is not added during this scan. When secure port is initialized, it is checked from presence in the list.

I can't find source for ClusterServer now.

at com.caucho.server.cluster.ClusterServer.bind(Clust erServer.java:445)
Reply With Quote
  #4  
Old 07-12-2011, 04:19 AM
reza reza is offline
Super Moderator
 
Join Date: Nov 2009
Location: Philadelphia, PA
Posts: 101
Send a message via Skype™ to reza
Default

Hi,

This looks like a Resin 3 bug that was fixed in Resin 4. Are you in a position to upgrade to Resin 4? If not, I can enter a bug report for this. I have to warn you though, the chances of this getting fixed in the 3.1 branch is not very likely at this point.

Thanks,
Reza
Reply With Quote
Reply

Tags
conditional, configuration, resin 3.1.6

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:14 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.