Sep 24, 2020 11:23:30 AM org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet [PXF REST Service] in context with path [/pxf] threw exception [javax.servlet.ServletException: java.io.IOException: Invalid chunk header] with root cause java.io.IOException: Invalid chunk header at org.apache.coyote.http11.filters.ChunkedInputFilter.throwIOException(ChunkedInputFilter.java:619) at org.apache.coyote.http11.filters.ChunkedInputFilter.doRead(ChunkedInputFilter.java:192) at org.apache.coyote.http11.AbstractInputBuffer.doRead(AbstractInputBuffer.java:341) at org.apache.coyote.Request.doRead(Request.java:431) at org.apache.catalina.connector.InputBuffer.realReadBytes(InputBuffer.java:290) at org.apache.tomcat.util.buf.ByteChunk.substract(ByteChunk.java:390) at org.apache.catalina.connector.InputBuffer.readByte(InputBuffer.java:304) at org.apache.catalina.connector.CoyoteInputStream.read(CoyoteInputStream.java:106) at java.io.DataInputStream.readInt(DataInputStream.java:387) at org.greenplum.pxf.api.io.GPDBWritable.readPktLen(GPDBWritable.java:158)
PROFILE=JDBC&JDBC_DRIVER=oracle.jdbc.driver.OracleDriver&DB_URL=jdbc:oracle
The connection pool is throwing an error because one of the processes cannot acquire a connection to the Oracle database. These properties can be tuned in the jdbc-site.xml file. For that, the first requirement is to have a server configuration for PXF. Create the server configuration for oracle, as an example, we use “oracle” as the server name:
1. mkdir -p $PXF_CONF/servers/oracle 2. cp $PXF_CONF/templates/jdbc-site.xml $PXF_CONF/servers/oracle
Then edit the file $PXF_CONF/servers/oracle/jdbc-site.xml, set the jdbc.driver, jdbc.url, jdbc.user, and jdbc.password properties.
Next, increase the jdbc.pool.property.maximumPoolSize property to be number of segments per host +2 connections. So if you have 8 segments per host, set the jdbc.pool.property.maximumPoolSize property to 10.
Finally, the external table will need to be recreated specifying the above server configuration.