Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #6763
| From | Martin Gregorie <martin@address-in-sig.invalid> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: JavaMail bug? |
| Date | 2011-08-02 20:01 +0000 |
| Organization | UK Free Software Network |
| Message-ID | <j19l2v$h45$1@localhost.localdomain> (permalink) |
| References | (3 earlier) <j0kilj$8bg$4@localhost.localdomain> <j0v8t7$os9$1@localhost.localdomain> <99njvpFv11U1@mid.individual.net> <j1771e$smf$1@localhost.localdomain> <99qjntFk6uU1@mid.individual.net> |
On Tue, 02 Aug 2011 16:34:20 +0100, Nigel Wade wrote: >> What does my SSCE do in your environment? > > I get: > > javax.mail.MessagingException: Unknown SMTP host: zoogz.gregorie.org; > nested exception is: > java.net.UnknownHostException: zoogz.gregorie.org > > I presume your DNS does not propagate upward from your zone. > Correct. Its definitive only within my LAN and my firewall refused all connections from outside. > But it /is/ attempting to resolve that hostname via our DNS servers. > It's not using localhost. > Interesting. I wonder why we're seeing a difference. I assume you ran it with no command line arguments except (possibly) 'debug'. When I do that the debugging text says that it was trying to connect to zoogz.gregorie.org. Lines 7 and 8 show the first 220 followed a DEBUG line reporting this. Then lines 31 and 32 report a failure to connect to localhost and the resulting exception. If you're following this with Wireshark I'd expect you to see the first connect attempt but maybe not the second. Here's the debugging output: $ java MATestMail debug DEBUG: setDebug: JavaMail version 1.4.4 DEBUG: getProvider() returning javax.mail.Provider [TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc] DEBUG SMTP: useEhlo true, useAuth false DEBUG SMTP: trying to connect to host "zoogz.gregorie.org", port 25, isSSL false 220 zoogz.gregorie.org ESMTP Postfix DEBUG SMTP: connected to host "zoogz.gregorie.org", port: 25 EHLO zappa.gregorie.org 250-zoogz.gregorie.org 250-PIPELINING 250-SIZE 51200000 250-VRFY 250-ETRN 250-ENHANCEDSTATUSCODES 250-8BITMIME 250 DSN DEBUG SMTP: Found extension "PIPELINING", arg "" DEBUG SMTP: Found extension "SIZE", arg "51200000" DEBUG SMTP: Found extension "VRFY", arg "" DEBUG SMTP: Found extension "ETRN", arg "" DEBUG SMTP: Found extension "ENHANCEDSTATUSCODES", arg "" DEBUG SMTP: Found extension "8BITMIME", arg "" DEBUG SMTP: Found extension "DSN", arg "" smtp://kiwi@zoogz.gregorie.org smtp://kiwi@zoogz.gregorie.org DEBUG: getProvider() returning javax.mail.Provider [TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc] DEBUG SMTP: useEhlo true, useAuth false DEBUG SMTP: trying to connect to host "localhost", port 25, isSSL false javax.mail.MessagingException: Could not connect to SMTP host: localhost, port: 25; nested exception is: java.net.ConnectException: Connection refused at com.sun.mail.smtp.SMTPTransport.openServer (SMTPTransport.java:1934) at com.sun.mail.smtp.SMTPTransport.protocolConnect (SMTPTransport.java:638) at javax.mail.Service.connect(Service.java:295) at javax.mail.Service.connect(Service.java:176) at javax.mail.Service.connect(Service.java:125) at javax.mail.Transport.send0(Transport.java:194) at javax.mail.Transport.send(Transport.java:124) at MATestMail.main(MATestMail.java:59) Caused by: java.net.ConnectException: Connection refused at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351) at java.net.PlainSocketImpl.connectToAddress (PlainSocketImpl.java:213) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366) at java.net.Socket.connect(Socket.java:529) at java.net.Socket.connect(Socket.java:478) at com.sun.mail.util.SocketFetcher.createSocket (SocketFetcher.java:288) at com.sun.mail.util.SocketFetcher.getSocket (SocketFetcher.java:231) at com.sun.mail.smtp.SMTPTransport.openServer (SMTPTransport.java:1900) ... 7 more At this point I really am going to drop off the net for a few days - got a 5AM start tomorrow. -- martin@ | Martin Gregorie gregorie. | Essex, UK org |
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar
JavaMail bug? Martin Gregorie <martin@address-in-sig.invalid> - 2011-07-23 20:32 +0000
Re: JavaMail bug? Knute Johnson <september@knutejohnson.com> - 2011-07-23 20:54 -0700
Re: JavaMail bug? Martin Gregorie <martin@address-in-sig.invalid> - 2011-07-24 09:50 +0000
Re: JavaMail bug? Knute Johnson <september@knutejohnson.com> - 2011-07-24 09:27 -0700
Re: JavaMail bug? Martin Gregorie <martin@address-in-sig.invalid> - 2011-07-25 19:36 +0000
Re: JavaMail bug? Knute Johnson <nospam@rabbitbrush.frazmtn.com> - 2011-07-25 23:00 -0700
Re: JavaMail bug? Steve Sobol <sjsobol@JustThe.net> - 2011-07-25 23:18 -0700
Re: JavaMail bug? Martin Gregorie <martin@address-in-sig.invalid> - 2011-07-26 17:49 +0000
Re: JavaMail bug? Martin Gregorie <martin@address-in-sig.invalid> - 2011-07-26 17:42 +0000
Re: JavaMail bug? Nigel Wade <nmw-news@ion.le.ac.uk> - 2011-07-25 15:40 +0100
Re: JavaMail bug? Martin Gregorie <martin@address-in-sig.invalid> - 2011-07-25 19:54 +0000
Re: JavaMail bug? Martin Gregorie <martin@address-in-sig.invalid> - 2011-07-25 20:11 +0000
Re: JavaMail bug? Martin Gregorie <martin@address-in-sig.invalid> - 2011-07-29 21:32 +0000
Re: JavaMail bug? Knute Johnson <september@knutejohnson.com> - 2011-07-29 16:26 -0700
Re: JavaMail bug? Nigel Wade <nmw-news@ion.le.ac.uk> - 2011-08-01 13:20 +0100
Re: JavaMail bug? Martin Gregorie <martin@address-in-sig.invalid> - 2011-08-01 21:49 +0000
Re: JavaMail bug? Nigel Wade <nmw-news@ion.le.ac.uk> - 2011-08-02 16:34 +0100
Re: JavaMail bug? Martin Gregorie <martin@address-in-sig.invalid> - 2011-08-02 20:01 +0000
Re: JavaMail bug? Nigel Wade <nmw-news@ion.le.ac.uk> - 2011-08-03 09:27 +0100
Re: JavaMail bug? Martin Gregorie <martin@address-in-sig.invalid> - 2011-08-08 22:50 +0000
Re: JavaMail bug? Nigel Wade <nmw-news@ion.le.ac.uk> - 2011-08-09 13:31 +0100
Re: JavaMail bug? Martin Gregorie <martin@address-in-sig.invalid> - 2011-08-09 22:47 +0000
Re: JavaMail bug? Nigel Wade <nmw-news@ion.le.ac.uk> - 2011-08-10 09:34 +0100
Re: JavaMail bug? Martin Gregorie <martin@address-in-sig.invalid> - 2011-08-10 19:37 +0000
Re: JavaMail bug? Nigel Wade <nmw-news@ion.le.ac.uk> - 2011-08-03 09:38 +0100
Re: JavaMail bug? Martin Gregorie <martin@address-in-sig.invalid> - 2011-08-16 21:06 +0000
Re: JavaMail bug? Nigel Wade <nmw-news@ion.le.ac.uk> - 2011-08-17 10:29 +0100
Re: JavaMail bug? Martin Gregorie <martin@address-in-sig.invalid> - 2011-08-17 19:54 +0000
Re: JavaMail bug? Nigel Wade <nmw-news@ion.le.ac.uk> - 2011-08-18 09:34 +0100
Re: JavaMail bug? Martin Gregorie <martin@address-in-sig.invalid> - 2011-08-18 19:50 +0000
Re: JavaMail bug? Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2011-08-01 12:54 +0000
csiph-web