Question

Data upload in Flow App not working (stacktrace attached)

  • 16 November 2023
  • 4 replies
  • 4 views

Badge

A user created a Flow App with a data upload but the upload is not working (no response from server). The stacktrace below shows that the backend cannot connect to some HTTPS endpoint. How can I find out what endpoint it is trying to connect to? Some config variable?

 

This is a distributed FME Flow 2023.1.1.1 installation on Ubuntu 22.04.

 

Stacktrace from /opt/fmeflow/resources/logs/tomcat/oxdedc001svdb02/catalina.2023-11-15.log:

15-Nov-2023 17:12:26.716 SEVERE [http-nio-127.0.0.1-8081-exec-9] COM.safe.web.servlet.HttpRESTModel.handleException GET:/dataupload/Korridor_B_Test/shapefile2postgis.fmw
  java.net.ConnectException: Connection timed out
    at java.base/sun.nio.ch.Net.connect0(Native Method)
    at java.base/sun.nio.ch.Net.connect(Unknown Source)
    at java.base/sun.nio.ch.Net.connect(Unknown Source)
    at java.base/sun.nio.ch.NioSocketImpl.connect(Unknown Source)
    at java.base/java.net.SocksSocketImpl.connect(Unknown Source)
    at java.base/java.net.Socket.connect(Unknown Source)
    at java.base/sun.security.ssl.SSLSocketImpl.connect(Unknown Source)
    at COM.safe.web.client.SelfSignedSSLSocketFactory.connectSocket(SelfSignedSSLSocketFactory.java:52)
    at org.apache.http.conn.scheme.SchemeSocketFactoryAdaptor.connectSocket(SchemeSocketFactoryAdaptor.java:66)
    at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:180)
    at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:144)
    at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:134)
    at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:605)
    at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:440)
    at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:835)
    at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:118)
    at COM.safe.web.client.HTTPClientFacade.execute(HTTPClientFacade.java:254)
    at COM.safe.fmeserver.webui.servlet.rest.DataUploadREST.doGet(DataUploadREST.java:286)
    at COM.safe.web.servlet.HttpRESTModel.doGet(HttpRESTModel.java:310)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:529)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:623)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:209)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153)
    at COM.safe.webservices.security.FMEServerAuthFilter.doFilter(FMEServerAuthFilter.java:130)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153)
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153)
    at COM.safe.web.servlet.CharsetEncodingFilter.doFilter(CharsetEncodingFilter.java:541)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153)
    at org.ebaysf.web.cors.CORSFilter.handleNonCORS(CORSFilter.java:640)
    at org.ebaysf.web.cors.CORSFilter.doFilter(CORSFilter.java:173)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:167)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:481)
    at org.apache.catalina.valves.rewrite.RewriteValve.invoke(RewriteValve.java:545)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:130)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93)
    at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:673)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
    at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:390)
    at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63)
    at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:926)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1791)
    at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52)
    at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
    at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.base/java.lang.Thread.run(Unknown Source)

 


4 replies

Badge

I could track it down to the web service base URL according to class COM.safe.fmeserver.webui.ServletHelper but I don't know where that property gets its value from.

javap -c 'jar:file:WEBAPPSDIR/fmeserver.war!/WEB-INF/classes/COM/safe/fmeserver/webui/ServletHelper.class'

Snip (see last line):

  public java.net.URI createServiceURI(javax.servlet.http.HttpServletRequest, java.lang.String, COM.safe.utility.ds.Pather) throws COM.safe.fmeserver.api.FMEServerException, COM.safe.web.conn.ConnectionException;
    Code:
       0: aload_0
       1: invokevirtual #13                 // Method getServletContext:()Ljavax/servlet/ServletContext;
       4: invokestatic  #17                 // Method COM/safe/fmeserver/webui/ApplicationProperties.getInstance:(Ljavax/servlet/ServletContext;)LCOM/safe/fmeserver/webui/ApplicationProperties;
       7: astore        4
       9: aload         4
      11: getfield      #23                 // Field COM/safe/fmeserver/webui/ApplicationProperties.webServicesBaseUrl:Ljava/lang/String;

 

Badge

I debugged it with JDB and ServletHelper#createServiceURI() returns the URI with the expected web service base URL.

 

I suspect that FME Flow does not use the proxy settings when sending requests to that URL.

 

I also implemented that request with java.net.http.HttpClient just to rule out that the problem lies with OpenJDK 17. Without proxy I also get a connection timeout but the connection works when I specify the proxy. On the same server that runs FME Flow.

Hi @ewie​ !

This sounds pretty complicated and specific. Could you please submit a case for our support team to have a deeper dive into troubleshooting this for you?

Thanks!

Badge

Hi @ewie​ !

This sounds pretty complicated and specific. Could you please submit a case for our support team to have a deeper dive into troubleshooting this for you?

Thanks!

> Could you please submit a case for our support team to have a deeper dive into troubleshooting this for you?

 

Will do.

 

For now it's working after I changed the host of service URLs under /fmeserver/configurations/services to use the server IP address instead of our domain. The proxy is not necessary in that case. Not sure what host should be configured here, the domain (necessary for access from outside our company network) or the server IP address (only accessible from within our company network).

Reply