Support Questions
Find answers, ask questions, and share your expertise

Sqoop - The specified function "connections" is not recognized.

Highlighted

Sqoop - The specified function "connections" is not recognized.

New Contributor

Hello ,

I am using sqoop2 to create a connection to an oracle db.

I ran the following command -


sqoop:000> create connection --cid 4


I get the following error -
The specified function "connection" is not recognized.


I used cid 4 as this is the "generic-jdbc-connector".  I have also used --cid 1.


I tried to check further information on generic-jdbc-connector , by running the command -


show connector --cid  4


I noticed one thing that is mentioned on few websites after running the above command for the connectors - I do not see "Supported Job types : [Export, Import]" written anywhere on the description for generic-jdbc-connector.

Please help, I am a novice and need to connect to oracle.

I also tried using the "import" option but that did not work either.


regards

P



8 REPLIES 8
Highlighted

Re: Sqoop - The specified function "connections" is not recognized.

Explorer

facing the very same issue right now. Any answers?

Highlighted

Re: Sqoop - The specified function "connections" is not recognized.

Champion

Could you let me know if you where able to start ur 

Sqoop server by ruining 

sqoop.sh server start

also verify your sqoop tool

 sqoop2-tool verify

 

Highlighted

Re: Sqoop - The specified function "connections" is not recognized.

Explorer

yes, was able to run the sqoop2-server but the verification failed.

server logs say the following :
2016-11-28 10:47:23,389 ERROR core.SqoopServer [org.apache.sqoop.core.SqoopServer.initialize(SqoopServer.java:62)] Server startup failure
org.apache.sqoop.common.SqoopException: JDBCREPO_0007:Unable to lease link
at org.apache.sqoop.repository.JdbcRepositoryTransaction.begin(JdbcRepositoryTransaction.java:64)
at org.apache.sqoop.repository.JdbcRepository.doWithConnection(JdbcRepository.java:87)
at org.apache.sqoop.repository.JdbcRepository.doWithConnection(JdbcRepository.java:63)
at org.apache.sqoop.repository.JdbcRepository.createOrUpgradeRepository(JdbcRepository.java:129)
at org.apache.sqoop.repository.RepositoryManager.initialize(RepositoryManager.java:124)
at org.apache.sqoop.repository.RepositoryManager.initialize(RepositoryManager.java:78)
at org.apache.sqoop.core.SqoopServer.initialize(SqoopServer.java:56)
at org.apache.sqoop.tools.tool.VerifyTool.runTool(VerifyTool.java:36)
at org.apache.sqoop.tools.ToolRunner.main(ToolRunner.java:75)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.sqoop.tomcat.TomcatToolRunner.main(TomcatToolRunner.java:77)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.catalina.startup.Tool.main(Tool.java:225)
Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool error Could not create a validated object, cause: A read-only user or a user in a read-only database is not permitted to disable read-only mode on a connection.
at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:114)
at org.apache.sqoop.repository.JdbcRepositoryTransaction.begin(JdbcRepositoryTransaction.java:62)
... 18 more
Caused by: java.util.NoSuchElementException: Could not create a validated object, cause: A read-only user or a user in a read-only database is not permitted to disable read-only mode on a connection.
at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:1191)
at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:106)
... 19 more
2016-11-28 10:47:23,392 ERROR tool.VerifyTool [org.apache.sqoop.tools.tool.VerifyTool.runTool(VerifyTool.java:41)] Got exception while initializing/destroying Sqoop server:
java.lang.RuntimeException: Failure in server initialization
at org.apache.sqoop.core.SqoopServer.initialize(SqoopServer.java:63)
at org.apache.sqoop.tools.tool.VerifyTool.runTool(VerifyTool.java:36)
at org.apache.sqoop.tools.ToolRunner.main(ToolRunner.java:75)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.sqoop.tomcat.TomcatToolRunner.main(TomcatToolRunner.java:77)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.catalina.startup.Tool.main(Tool.java:225)
Caused by: org.apache.sqoop.common.SqoopException: JDBCREPO_0007:Unable to lease link
at org.apache.sqoop.repository.JdbcRepositoryTransaction.begin(JdbcRepositoryTransaction.java:64)
at org.apache.sqoop.repository.JdbcRepository.doWithConnection(JdbcRepository.java:87)
at org.apache.sqoop.repository.JdbcRepository.doWithConnection(JdbcRepository.java:63)
at org.apache.sqoop.repository.JdbcRepository.createOrUpgradeRepository(JdbcRepository.java:129)
at org.apache.sqoop.repository.RepositoryManager.initialize(RepositoryManager.java:124)
at org.apache.sqoop.repository.RepositoryManager.initialize(RepositoryManager.java:78)
at org.apache.sqoop.core.SqoopServer.initialize(SqoopServer.java:56)
... 12 more
Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool error Could not create a validated object, cause: A read-only user or a user in a read-only database is not permitted to disable read-only mode on a connection.
at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:114)
at org.apache.sqoop.repository.JdbcRepositoryTransaction.begin(JdbcRepositoryTransaction.java:62)
... 18 more
Caused by: java.util.NoSuchElementException: Could not create a validated object, cause: A read-only user or a user in a read-only database is not permitted to disable read-only mode on a connection.
at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:1191)
at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:106)
... 19 more

Highlighted

Re: Sqoop - The specified function "connections" is not recognized.

Champion

Looks like the user you are using is not having a write permission based on this error . 

 

Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool error Could not create a validated object, cause: A read-only user or a user in a read-only database is not permitted to disable read-only mode on a connection
Highlighted

Re: Sqoop - The specified function "connections" is not recognized.

Explorer

I had installed the sqoop2 package using cloudera. It's not mentioned anywhere which user does it expect to be running the commands. Same result for root user as well.
Which user shall i create to run the same? 

Thanks. 

Highlighted

Re: Sqoop - The specified function "connections" is not recognized.

Explorer

The directory structure suggests that the user should be 'sqoop2' and the group be 'sqoop'.

Highlighted

Re: Sqoop - The specified function "connections" is not recognized.

Explorer

I updated the password for sqoop2 user created during package installation from cloudera.
Now when i run "sudo -u sqoop2 sqoop2-tool verify". It asks for sqoop2 user's password, accepts it and then no output is shown. Kindof nothing happens, in logs as well.
(Nothing to do with password as if we enter wrong password then it would have authentication failure)
So how to run it now?
The root user results in barred permissions but running as sqoop2 user is not doing anything for tool verify command.

Highlighted

Re: Sqoop - The specified function "connections" is not recognized.

Champion

Could you please check permission of the sqoop user on Oracle . 

its having  permission issue on Oracle side.  

Don't have an account?