You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by Jerry Malcolm <te...@malcolms.com> on 2020/02/04 23:43:50 UTC

Domain Lookup Bug?

I've set up an out-of-the-box installation from the master branch as of 
a couple of days ago.  I'm using it as a reference comparison for 
problems that I'm still encountering in my customized environment.  I 
added a couple of debug statements to the code.  I changed the database 
info and the helo name, etc. But otherwise, it's straight out of my 
Intellij build from the GitHub master.

I've been seeing an exception for several days.  I tried it in my 
out-of-the-box installation and I still see it. So I'm sure this one 
isn't caused my any of my custom code. When I try to send mail to an 
external domain, I get the following exception.  It apparently tries to 
find the external domain in the domains table.  But it shouldn't find 
it.  Yet it throws an exception each time.  As long as it still works, I 
guess no harm.  But for someone as paranoid as I am trying to get a new 
version running, I automatically think an exception is my fault.  I 
don't want to focus resources on an errant exception.  Now, if it is 
really a bug, let me know what I need to do.

DEBUG 17:26:06,548 | org.apache.james.domainlist.jpa.JPADomainList | 
Looking for domain: <externalDomain>.com <== my debug statement
DEBUG 17:26:06,558 | org.apache.james.domainlist.jpa.JPADomainList | No 
domain found
javax.persistence.NoResultException: Query "SELECT domain FROM 
JamesDomain domain WHERE domain.name=:name" selected no result, but 
expected unique result.
         at 
org.apache.openjpa.persistence.QueryImpl.getSingleResult(QueryImpl.java:346)
         at 
org.apache.james.domainlist.jpa.JPADomainList.containsDomainInternal(JPADomainList.java:163)
         at 
org.apache.james.domainlist.jpa.JPADomainList.containsDomainInternal(JPADomainList.java:100)
         at 
org.apache.james.domainlist.lib.AbstractDomainList.containsDomain(AbstractDomainList.java:163)
         at 
org.apache.james.smtpserver.AuthRequiredToRelayRcptHook.isLocalDomain(AuthRequiredToRelayRcptHook.java:39)
         at 
org.apache.james.protocols.smtp.core.AbstractAuthRequiredToRelayRcptHook.doRcpt(AbstractAuthRequiredToRelayRcptHook.java:55)
         at 
org.apache.james.protocols.smtp.core.RcptCmdHandler.callHook(RcptCmdHandler.java:222)
         at 
org.apache.james.protocols.smtp.core.RcptCmdHandler.callHook(RcptCmdHandler.java:49)


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Re: Domain Lookup Bug?

Posted by Tellier Benoit <bt...@apache.org>.
Hello Jerry,

The debug log you mention is benign, and can safely be ignored.

When the lookup is performed, JPA don't find the record (as it's an
external mail) and throws an exception that we log.

Regards,

Benoit

On 05/02/2020 06:43, Jerry Malcolm wrote:
> I've set up an out-of-the-box installation from the master branch as of
> a couple of days ago.  I'm using it as a reference comparison for
> problems that I'm still encountering in my customized environment.  I
> added a couple of debug statements to the code.  I changed the database
> info and the helo name, etc. But otherwise, it's straight out of my
> Intellij build from the GitHub master.
> 
> I've been seeing an exception for several days.  I tried it in my
> out-of-the-box installation and I still see it. So I'm sure this one
> isn't caused my any of my custom code. When I try to send mail to an
> external domain, I get the following exception.  It apparently tries to
> find the external domain in the domains table.  But it shouldn't find
> it.  Yet it throws an exception each time.  As long as it still works, I
> guess no harm.  But for someone as paranoid as I am trying to get a new
> version running, I automatically think an exception is my fault.  I
> don't want to focus resources on an errant exception.  Now, if it is
> really a bug, let me know what I need to do.
> 
> DEBUG 17:26:06,548 | org.apache.james.domainlist.jpa.JPADomainList |
> Looking for domain: <externalDomain>.com <== my debug statement
> DEBUG 17:26:06,558 | org.apache.james.domainlist.jpa.JPADomainList | No
> domain found
> javax.persistence.NoResultException: Query "SELECT domain FROM
> JamesDomain domain WHERE domain.name=:name" selected no result, but
> expected unique result.
>         at
> org.apache.openjpa.persistence.QueryImpl.getSingleResult(QueryImpl.java:346)
> 
>         at
> org.apache.james.domainlist.jpa.JPADomainList.containsDomainInternal(JPADomainList.java:163)
> 
>         at
> org.apache.james.domainlist.jpa.JPADomainList.containsDomainInternal(JPADomainList.java:100)
> 
>         at
> org.apache.james.domainlist.lib.AbstractDomainList.containsDomain(AbstractDomainList.java:163)
> 
>         at
> org.apache.james.smtpserver.AuthRequiredToRelayRcptHook.isLocalDomain(AuthRequiredToRelayRcptHook.java:39)
> 
>         at
> org.apache.james.protocols.smtp.core.AbstractAuthRequiredToRelayRcptHook.doRcpt(AbstractAuthRequiredToRelayRcptHook.java:55)
> 
>         at
> org.apache.james.protocols.smtp.core.RcptCmdHandler.callHook(RcptCmdHandler.java:222)
> 
>         at
> org.apache.james.protocols.smtp.core.RcptCmdHandler.callHook(RcptCmdHandler.java:49)
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
> For additional commands, e-mail: server-dev-help@james.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org