Details

    • Similar Issues:
      Show 10 results 

      Description

      I appears that remote-destination-outbound-socket-binding resources cannot have attributes that are expressions - at least the host attrtibute. In JBossAS 4.2.3, we used to have a stock email service.xml that people could customize by simply passing in new system properties (rather than editing .xml or going through a CLI to change the values). However, in AS 7.1.1.Final, we can't do this for the mail service because at least the host attribute does not appear to allow for expressions:

      /socket-binding-group=standard-sockets/remote-destination-outbound-socket-binding=mail-smtp

      My host attribute was set to the expression $

      {rhq.server.email.smtp-host:localhost}

      and when I tried to start the server, I got:

      Caused by: java.net.UnknownHostException: $

      {rhq.server.email.smtp-host:localhost}

      at java.net.Inet4AddressImpl.lookupAllHostAddr(Native Method) [rt.jar:1.6.0_29]
      at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:849) [rt.jar:1.6.0_29]
      at java.net.InetAddress.getAddressFromNameService(InetAddress.java:1202) [rt.jar:1.6.0_29]
      at java.net.InetAddress.getAllByName0(InetAddress.java:1153) [rt.jar:1.6.0_29]
      at java.net.InetAddress.getAllByName(InetAddress.java:1083) [rt.jar:1.6.0_29]
      at java.net.InetAddress.getAllByName(InetAddress.java:1019) [rt.jar:1.6.0_29]
      at java.net.InetAddress.getByName(InetAddress.java:969) [rt.jar:1.6.0_29]
      at org.jboss.as.network.OutboundSocketBinding.getDestinationAddress(OutboundSocketBinding.java:146)
      at org.jboss.as.mail.extension.MailSessionService.getServerSocketAddress(MailSessionService.java:106)

      The weird thing is, the port attribute appears to allow for expressions. When my port is set to this expression: "$

      {rhq.server.email.smtp-port:25}

      ", the server starts up fine (that is, after I set to the host to a legitimate hostname like "localhost")

      This JIRA is to request that expressions be supported for the host attribute as it appears to be supported for the port attribute.

        Activity

        Hide
        Heiko Rupp
        added a comment -

        [15:45:44] <pilhuhn> Looks like a bug, as the metadata says:
        [15:45:46] <pilhuhn> "host" => {
        [15:45:46] <pilhuhn> "type" => STRING,
        [15:45:46] <pilhuhn> "description" => "Der Hostname oder die IP-Adresse des Remote-Ziels, mit dem sich dieses ausgehende Socket verbinden wird.",
        [15:45:46] <pilhuhn> "expressions-allowed" => true,
        [15:46:00] <pilhuhn> look at expressions-allowed
        [15:47:11] <pilhuhn> and then
        [15:47:12] <pilhuhn> [standalone@localhost:9999 remote-destination-outbound-socket-binding=mail-smtp] :write-attribute(name=host,value="$

        {foo.bar:localhost}

        ")
        [15:47:26] <pilhuhn> is successful for me
        [15:48:15] <pilhuhn> ah ok I see, so the api allows to write an expression, but the underlying code does not know how to cope

        Show
        Heiko Rupp
        added a comment - [15:45:44] <pilhuhn> Looks like a bug, as the metadata says: [15:45:46] <pilhuhn> "host" => { [15:45:46] <pilhuhn> "type" => STRING, [15:45:46] <pilhuhn> "description" => "Der Hostname oder die IP-Adresse des Remote-Ziels, mit dem sich dieses ausgehende Socket verbinden wird.", [15:45:46] <pilhuhn> "expressions-allowed" => true, [15:46:00] <pilhuhn> look at expressions-allowed [15:47:11] <pilhuhn> and then [15:47:12] <pilhuhn> [standalone@localhost:9999 remote-destination-outbound-socket-binding=mail-smtp] :write-attribute(name=host,value="$ {foo.bar:localhost} ") [15:47:26] <pilhuhn> is successful for me [15:48:15] <pilhuhn> ah ok I see, so the api allows to write an expression, but the underlying code does not know how to cope
        Hide
        RH Bugzilla Integration
        added a comment -

        John Mazzitelli <mazz@redhat.com> made a comment on bug 851268

        I've got some notes on this port work found here on the wiki:

        https://docs.jboss.org/author/display/RHQ/Hosting+RHQ+Server+in+AS7

        Show
        RH Bugzilla Integration
        added a comment - John Mazzitelli <mazz@redhat.com> made a comment on bug 851268 I've got some notes on this port work found here on the wiki: https://docs.jboss.org/author/display/RHQ/Hosting+RHQ+Server+in+AS7
        Hide
        RH Bugzilla Integration
        added a comment -

        John Mazzitelli <mazz@redhat.com> made a comment on bug 851268

        removing all the external bug tracking links - the bugzilla integration to jira is not good:

        I will add "see also" links from this BZ to these:

        https://issues.jboss.org/browse/AS7-5342
        https://issues.jboss.org/browse/AS7-5336
        https://issues.jboss.org/browse/AS7-5321
        https://issues.jboss.org/browse/AS7-5177
        https://issues.jboss.org/browse/AS7-887
        https://issues.jboss.org/browse/AS7-3199

        Show
        RH Bugzilla Integration
        added a comment - John Mazzitelli <mazz@redhat.com> made a comment on bug 851268 removing all the external bug tracking links - the bugzilla integration to jira is not good: I will add "see also" links from this BZ to these: https://issues.jboss.org/browse/AS7-5342 https://issues.jboss.org/browse/AS7-5336 https://issues.jboss.org/browse/AS7-5321 https://issues.jboss.org/browse/AS7-5177 https://issues.jboss.org/browse/AS7-887 https://issues.jboss.org/browse/AS7-3199
        Hide
        Tomaz Cerar
        added a comment - - edited

        This was implemented as part of conversion of core model to RD but it needs some tests.

        Show
        Tomaz Cerar
        added a comment - - edited This was implemented as part of conversion of core model to RD but it needs some tests.
        Hide
        Tomaz Cerar
        added a comment -

        needs reject transformer for legacy version

        Show
        Tomaz Cerar
        added a comment - needs reject transformer for legacy version
        Hide
        Kabir Khan
        added a comment -

        https://github.com/kabir/jboss-as/commits/more-tests-socket-binding-group contains the reworked test.

        To verify that it works at runtime, I checked that 7.1.2 and 7.1.3 both start up with standalone-ha.xml modified to contain the following socket-binding-group. I tried with both local-destination and remote-destination uncommented:

            <socket-binding-group name="standard-sockets" default-interface="${xx:public}" port-offset="${jboss.socket.binding.port-offset:0}">
                <socket-binding name="management-native" interface="${xx:management}" port="${jboss.management.native.port:9999}"/>
                <socket-binding name="management-http" interface="management" port="${jboss.management.http.port:9990}"/>
                <socket-binding name="management-https" interface="management" port="${jboss.management.https.port:9443}"/>
                <socket-binding name="ajp" port="8009"/>
                <socket-binding name="http" port="8080"/>
                <socket-binding name="https" port="8443"/>
                <socket-binding name="jgroups-mping" port="0" multicast-address="${jboss.default.multicast.address:230.0.0.4}" multicast-port="${xx:45700}"/>
                <socket-binding name="jgroups-tcp" port="7600"/>
                <socket-binding name="jgroups-tcp-fd" port="57600"/>
                <socket-binding name="jgroups-udp" port="55200" multicast-address="${jboss.default.multicast.address:230.0.0.4}" multicast-port="45688"/>
                <socket-binding name="jgroups-udp-fd" port="54200"/>
                <socket-binding name="modcluster" port="0" multicast-address="224.0.1.105" multicast-port="23364"/>
                <socket-binding name="osgi-http" interface="management" port="8090"/>
                <socket-binding name="remoting" port="4447"/>
                <socket-binding name="txn-recovery-environment" port="4712"/>
                <socket-binding name="txn-status-manager" port="4713"/>
                <outbound-socket-binding name="mail-smtp">
                    <!--
                    <local-destination socket-binding-ref="${xx:http}"/>
                    -->
                    <remote-destination host="${xx:localhost}" port="${xx:25}"/>
                </outbound-socket-binding>
            </socket-binding-group>
        

        I'm not sure we care about transformation for 7.1.1? If we do a transformer is needed there

        Show
        Kabir Khan
        added a comment - https://github.com/kabir/jboss-as/commits/more-tests-socket-binding-group contains the reworked test. To verify that it works at runtime, I checked that 7.1.2 and 7.1.3 both start up with standalone-ha.xml modified to contain the following socket-binding-group. I tried with both local-destination and remote-destination uncommented: <socket-binding-group name= "standard-sockets" default - interface = "${xx: public }" port-offset= "${jboss.socket.binding.port-offset:0}" > <socket-binding name= "management- native " interface = "${xx:management}" port= "${jboss.management. native .port:9999}" /> <socket-binding name= "management-http" interface = "management" port= "${jboss.management.http.port:9990}" /> <socket-binding name= "management-https" interface = "management" port= "${jboss.management.https.port:9443}" /> <socket-binding name= "ajp" port= "8009" /> <socket-binding name= "http" port= "8080" /> <socket-binding name= "https" port= "8443" /> <socket-binding name= "jgroups-mping" port= "0" multicast-address= "${jboss. default .multicast.address:230.0.0.4}" multicast-port= "${xx:45700}" /> <socket-binding name= "jgroups-tcp" port= "7600" /> <socket-binding name= "jgroups-tcp-fd" port= "57600" /> <socket-binding name= "jgroups-udp" port= "55200" multicast-address= "${jboss. default .multicast.address:230.0.0.4}" multicast-port= "45688" /> <socket-binding name= "jgroups-udp-fd" port= "54200" /> <socket-binding name= "modcluster" port= "0" multicast-address= "224.0.1.105" multicast-port= "23364" /> <socket-binding name= "osgi-http" interface = "management" port= "8090" /> <socket-binding name= "remoting" port= "4447" /> <socket-binding name= "txn-recovery-environment" port= "4712" /> <socket-binding name= "txn-status-manager" port= "4713" /> <outbound-socket-binding name= "mail-smtp" > <!-- <local-destination socket-binding-ref= "${xx:http}" /> --> <remote-destination host= "${xx:localhost}" port= "${xx:25}" /> </outbound-socket-binding> </socket-binding-group> I'm not sure we care about transformation for 7.1.1? If we do a transformer is needed there

          People

          • Assignee:
            Tomaz Cerar
            Reporter:
            John Mazzitelli
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: