You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Andrew Shaw <An...@netdecisions.com> on 2002/10/04 13:44:26 UTC
ConnectException
Hi,
We're setting up a site which incorporates Apache XML Fop to generate
PDF's. The site runs perfectly from within our corporate network but as
soon as we take it down to the hosting centre it fails to generate the
PDF's. It seems that it might be something to do with the firewall but
I can't see what changes we need to make to the firewall to get this
working.
I must point out that the site connects to an SQL database (so port 1433
is open on the firewall) and also an ldap server (so port 389 is also
open). The site runs fine and connections to these to servers are
happening properly. It's only when we try to generate the PDF that we
start to get Java errors. Here's the output from the Java console:
ava.net.ConnectException: Connection refused: 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.Socket.<init>(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at sun.net.NetworkClient.doConnect(Unknown Source)
at sun.plugin.protocol.jdk12.http.HttpClient.doConnect(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.net.www.http.HttpClient.privilegedOpenServer(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.<init>(Unknown Source)
at sun.net.www.http.HttpClient.<init>(Unknown Source)
at sun.plugin.protocol.jdk12.http.HttpClient.<init>(Unknown Source)
at sun.plugin.protocol.jdk12.http.HttpClient.New(Unknown Source)
at sun.plugin.protocol.jdk12.http.HttpURLConnection.privBlock(Unknown
Source)
at
sun.plugin.protocol.jdk12.http.HttpURLConnection$PrivilegedBlockAction.run(Unknown
Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.plugin.protocol.jdk12.http.HttpURLConnection.connect(Unknown
Source)
at
sun.plugin.protocol.jdk12.http.HttpURLConnection.getInputStream(Unknown
Source)
at java.net.URL.openStream(Unknown Source)
at
com.agilisys.abs.app.accommodation.SystemStatusTableModel.readStatusDataFromServer(SystemStatusApplet.java:495)
at
com.agilisys.abs.app.accommodation.SystemStatusTableModel.<init>(SystemStatusApplet.java:311)
at
com.agilisys.abs.app.accommodation.SystemStatusApplet.jbInit(SystemStatusApplet.java:157)
at
com.agilisys.abs.app.accommodation.SystemStatusApplet.init(SystemStatusApplet.java:100)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
So it looks like the firewall is blocking a connection. Does FOP try to
create a new (initiate) connection to the client? If so our firewall
would likely block the request. I can't seem to find any details about
this problem on the net :-( Also sorry for my naieve understanding of
Java.. I'm Linux sys admin here and I know next to nothing about Java
but since this seems to be a networking issue I've been tasked to fix
it.
Finally, the site is using Tomcat 4.0.5 & Sun's Java 1.4.0
Many thanks for any help.
Andy
Re: ConnectException
Posted by Oleg Tkachenko <ol...@multiconn.com>.
Andrew Shaw wrote:
> As you say, the output from the java console (which is on the client)
> would seem to imply that the applet is running from the client and then
> trying (and failing) to connect to something on the web. The odd thing
> is that the code works when run on our corprate LAN but fails when it's
> in the hosting centre. It would seem that the firewall at the hosting
> centre is causing the problem. I'll try to analyze the network traffice
> to see what's being refused.
I believe it's more easy to see what's applet trying to do by looking at
source code, line 495 of SystemStatusApplet.java as it stated at debug
info. Actually it's an offtopic, but feel free to send me a snippet of
your SystemStatusApplet.java and I'll try to help.
--
Oleg Tkachenko
eXperanto team
Multiconn International, Israel
Re: ConnectException
Posted by Andrew Shaw <An...@netdecisions.com>.
On Friday 04 October 2002 2:16 pm, Oleg Tkachenko wrote:
> Andrew Shaw wrote:
> > We're setting up a site which incorporates Apache XML Fop to
> > generate PDF's. The site runs perfectly from within our corporate
> > network but as
>
> Where do you run fop - on client or server?
On the server
> ...
>
> > com.agilisys.abs.app.accommodation.SystemStatusApplet.init(SystemSt
> >atusApplet.java:100) at sun.applet.AppletPanel.run(Unknown Source)
> > at java.lang.Thread.run(Unknown Source)
>
> Actually in the exception trace I don't see any fop-related classes
> to be involved, looks like your applet is trying to connect to
> something on the Net in readStatusDataFromServer method of
> SystemStatusApplet class (see 495 line at SystemStatusApplet.java)
> and got a refusal.
As you say, the output from the java console (which is on the client)
would seem to imply that the applet is running from the client and then
trying (and failing) to connect to something on the web. The odd thing
is that the code works when run on our corprate LAN but fails when it's
in the hosting centre. It would seem that the firewall at the hosting
centre is causing the problem. I'll try to analyze the network traffice
to see what's being refused.
Many thanks for the reply..
Re: ConnectException
Posted by Oleg Tkachenko <ol...@multiconn.com>.
Andrew Shaw wrote:
> We're setting up a site which incorporates Apache XML Fop to generate
> PDF's. The site runs perfectly from within our corporate network but as
Where do you run fop - on client or server?
...
> com.agilisys.abs.app.accommodation.SystemStatusApplet.init(SystemStatusApplet.java:100)
> at sun.applet.AppletPanel.run(Unknown Source)
> at java.lang.Thread.run(Unknown Source)
Actually in the exception trace I don't see any fop-related classes to
be involved, looks like your applet is trying to connect to something on
the Net in readStatusDataFromServer method of SystemStatusApplet class
(see 495 line at SystemStatusApplet.java) and got a refusal.
--
Oleg Tkachenko
eXperanto team
Multiconn International, Israel