HI, I have something very strange going on.
In our office, we have two servers.
100svr02 is our Servoy application server and 100svr04 is our SMTP server (SBS2008)
In the servoy-admin page we only set the smtp host to 100svr04, and we made sure that 100svr02 is allowed to mail with 100svr04
If I start a LAN client (so in the same network) and I send an email, everything works great, the mail is send succesfully
but if I start a WAN client, so for example from my home (the server is behind a NAT, with open ports 80) everything is working fine, but I can’t mail anymore.
So I started some debugging & test & trial and I found out, that when I’m using the http tunnel the mail plugin does not work anymore.
We use profiling, so we have two url’s we can test, one with http tunnel and one with socket tunnel
using http tunneling on the same LAN works
using http tunneling via WAN, it does not work anymore.
using socket tunneling on the same LAN works
using socket tunneling on the same LAN works
I see this error in the servoy-admin page.
2011-01-06 21:42 RMI TCP Connection(412)-82.73.187.150 ERROR com.servoy.j2db.util.Debug SMTPSend Could not connect to SMTP host: 100svr04, port: 25
javax.mail.MessagingException: Could not connect to SMTP host: 100svr04, port: 25; nested exception is: java.net.ConnectException: Connection timed out: connect
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1706)
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:525)
at javax.mail.Service.connect(Service.java:291)
at javax.mail.Service.connect(Service.java:172)
at javax.mail.Service.connect(Service.java:121)
at javax.mail.Transport.send0(Transport.java:190)
at javax.mail.Transport.send(Transport.java:120)
at com.servoy.extensions.plugins.mail.MailServer.sendMail(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
at sun.rmi.transport.Transport$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.net.ConnectException: Connection timed out: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:284)
at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:227)
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1672)
... 21 more
so something is going wrong when using http tunneling, and than WAN clients…
we have another server in our hosting center, there the SMTP server is running localhost, and using email on that one, with http-tunnel or sockettunnel is no problem.
The difference there, is that the server is not behind a NAT, but hangs directly with it’s networkcard to the internet.