Hi,
out team encountered a strange problem when using sqlcl .
"Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.10.0.0.0"
in a docker container and publish the 1521 port outside.
There was no problem to connect and work with this database with sqldeveloper from outside.
However when using sqlcl (no matter which version) we got an error:
Error Message = IO Error: Got minus one from a read call (CONNECTION_ID=Lej7SLPBRFmk8mUs/tcQQQ==)
We used the TWO_TASK environment variable on connect.
It looked like
TWO_TASK='(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(Host=localhost)(Port=1521))(CONNECT_DATA=(SERVICE_NAME=ORCLPDB1)))'
All this worked when ‘localhost’ was replaced by IP address.
We solved the problem now by setting the ENVIRONMENT-variable
export CUSTOM_JDBC='-Doracle.net.disableOob=true'
(this variable is read by the ‘sql’ shellscript which starts the java process)
So it worked also with localhost
and without IP.
It seemed also only a problem when all this - dockerized database and sqlcl client - was running inside a linux virtual machine.
I tried to reproduce the error in a native linux environment and it worked without setting CUSTOM_JDBC. (I used the same sqlcl-version and same java-version and of course the same oracle image).
Can someone explain what oracle.net.disableOob
mean and why is it necessary to set the property in one environment and not necessary in another? Although I now have a workaround, I still don't really understand the problem.
Best regards
Thomas