1 2 Previous Next 29 Replies Latest reply on May 6, 2016 4:40 AM by ravindra_singh Go to original post
      • 15. Re: How to connect to Teiid VDB through Linux server ?
        ravindra_singh

        isql -v teiid_db soaxxx SOAPyyyy

         

        [IM002][unixODBC][Driver Manager]Data source name not found, and no default driver specified

        [ISQL]ERROR: Could not SQLConnect

        • 16. Re: How to connect to Teiid VDB through Linux server ?
          m.ardito

          @Ravindra,

           

          if isql doesn't work, can you try a simple ping/telnet test to the server?

           

          here below a sample of what you should get

           

          :~$ ping 162.44.115.213

          PING 162.44.115.213 (162.44.115.213) 56(84) bytes of data.

          64 bytes from 162.44.115.213: icmp_req=1 ttl=63 time=1.34 ms

           

          ~$ telnet 162.44.115.213 35432

          Trying 162.44.115.213...

          Connected to 162.44.115.213.

          Escape character is '^]'.

           

          If this doesn't work, something in the network is blocking the connection...

          Marco

          • 17. Re: How to connect to Teiid VDB through Linux server ?
            ravindra_singh

            cdtscmn100d:cmndusr:/development/cmn/exe> ping 162.44.115.213

            PING 162.44.115.213 (162.44.115.213) 56(84) bytes of data.

            64 bytes from 162.44.115.213: icmp_seq=1 ttl=64 time=0.470 ms

            64 bytes from 162.44.115.213: icmp_seq=2 ttl=64 time=0.192 ms

            64 bytes from 162.44.115.213: icmp_seq=3 ttl=64 time=0.240 ms

            64 bytes from 162.44.115.213: icmp_seq=4 ttl=64 time=0.335 ms

            ^C

            --- 162.44.115.213 ping statistics ---

            20 packets transmitted, 20 received, 0% packet loss, time 19544ms

            rtt min/avg/max/mdev = 0.192/0.265/0.470/0.065 ms

             

            cdtscmn100d:cmndusr:/development/cmn/exe> telnet 162.44.115.213 35432

            Trying 162.44.115.213...

            Connected to 162.44.115.213.

            Escape character is '^]'.

            ^CConnection closed by foreign host.

            • 18. Re: How to connect to Teiid VDB through Linux server ?
              m.ardito

              Ravindra Singh ha scritto:

              isql -v teiid_db soaxxx SOAPyyyy

              [IM002][unixODBC][Driver Manager]Data source name not found, and no default driver specified

              [ISQL]ERROR: Could not SQLConnect

              Are you trying to open a teiid dbname ("teiid_db"), instead of the odbc DSN name?

              in your posts before odbc DSN name was "ConnTeiid" (without quotes), which pointed to a teiid database named "ImputationV1_DEV"

               

              but may be those were just examples?

               

              Also, where you defined the odbc DSN?

              it should be in /etc/odbc.ini or in your user home folder (something like ~/.odbc.ini)

               

               

              [edit]

              you should also have a /etc/odbcinst.ini file pointing to the default drivers, something like

               

              ==========================

              $ cat /etc/odbcinst.ini

              [PostgreSQL ANSI]

              Description     = PostgreSQL ODBC driver (ANSI version)

              Driver          = psqlodbca.so

              Setup           = libodbcpsqlS.so

              Debug           = 0

              CommLog         = 0

              UsageCount      = 1

               

              [PostgreSQL Unicode]

              Description     = PostgreSQL ODBC driver (Unicode version)

              Driver          = psqlodbcw.so

              Setup           = libodbcpsqlS.so

              Debug           = 1

              CommLog         = 1

              UsageCount      = 1

              ==========================

               

              (this is what I have)

               

              Marco

              • 19. Re: How to connect to Teiid VDB through Linux server ?
                ravindra_singh

                isql -v teiid_db soaxxx SOAPyyyy

                 

                [teiid_db]

                Description        = PostgreSQL Unicode

                Driver            = /usr/lib64/psqlodbcw.so

                Trace            = No

                TraceFile        =

                Database        = ImputationV1_DEV

                Servername        = 162.44.115.213

                Username        = soaxxx

                Password        = SOAPyyyy

                Port            = 35432

                Protocol        = 7.4-1

                ServerType         = Postgres

                ReadOnly        = No

                ShowSystemTables    = No

                ShowOidColumn        = No

                FakeOidIndex        = No

                UseServerSidePrepare    =1

                ByteaAsLongVarBinary    =1

                UpdatableCursors    =0

                ConnSettings        =

                Optimizer        =0

                Ksqo            =0

                Debug            =0

                Fetch             = 10000

                UseDeclareFetch        =1

                 

                 

                I have created the odbc.ini file under my local folder as /etc/odbc.ini for me is ReadOnly.

                • 20. Re: How to connect to Teiid VDB through Linux server ?
                  m.ardito

                  according to the man odbcinst page, the file if specified in the user folder should be hidden "$HOME/.odbc.ini" so be sure to have a dot before "odbc.ini".

                  It could be that "$HOME/odbc.ini" is completely ignored... "$HOME/.odbc.ini" instead should be the expected filename

                   

                  Marco

                  • 21. Re: How to connect to Teiid VDB through Linux server ?
                    ravindra_singh

                    Thanks a lot Marco. It worked.

                    • 22. Re: How to connect to Teiid VDB through Linux server ?
                      m.ardito

                      Good!!

                       

                      now that it's working, I just want to point out that in my DSN config I posted before, there was a "UseDeclareFetch =1" setting,

                      but that later gave me problems, so now I am using "UseDeclareFetch =0"

                      (see Re: query that works on jdbc does not work on linux->php->odbc->teiid...)

                       

                      Marco

                      • 23. Re: How to connect to Teiid VDB through Linux server ?
                        ravindra_singh

                        Thanks Marco . I will research on the option mentioned in config file before using them.

                        • 24. Re: How to connect to Teiid VDB through Linux server ?
                          ravindra_singh

                          Marco,

                           

                          Can we connect to Teiid using SQOOP utility?

                           

                          i tried below

                           

                          sqoop import \

                          --direct \

                          --verbose  \

                          --connect jdbc:teiid:ImputationV1_DEV@mm://cdtssoa126d.rxcorp.com:31000 \

                          --username soaxxx \

                          --table MetadataSource_MSSQL_View.ImputationModules --m 1

                           

                          Got below error

                           

                          16/05/05 05:27:48 DEBUG manager.DefaultManagerFactory: Trying with scheme: jdbc:teiid:ImputationV1_DEV@mm:

                          16/05/05 05:27:48 ERROR tool.BaseSqoopTool: Got error creating database manager: java.io.IOException: No manager for connect string: jdbc:teiid:ImputationV1_DEV@mm://cdtssoa126d.rxcorp.com:31000

                          • 25. Re: How to connect to Teiid VDB through Linux server ?
                            m.ardito

                            I never used sqoop,

                            but from what I see, and seeing Sqoop User Guide (v1.4.6)

                            it seems a correct jdbc connection syntax... and if it works with odbc, it should work here too...

                            - it is correct that user has no password?

                            - is --table parameter correct?

                            - what is the --m 1 parameter?

                             

                            [edit] does it work omitting --direct?

                             

                            Marco

                            • 26. Re: How to connect to Teiid VDB through Linux server ?
                              rareddy

                              looks like you did not specify the Teiid JDBC driver for Sqoop, I think you need to do

                               

                              sqoop import \
                              --direct \
                              --verbose  \
                              --connect jdbc:teiid:ImputationV1_DEV@mm://cdtssoa126d.rxcorp.com:31000 \
                              --username soaxxx \
                              --table MetadataSource_MSSQL_View.ImputationModules --m 1
                              --libjars  /path/to/teiid-8.13.4-jdbc.jar
                              

                               

                               

                              Ramesh..

                              • 27. Re: How to connect to Teiid VDB through Linux server ?
                                ravindra_singh

                                Hi Ramesh,

                                 

                                I tried the same configuration and got below issue

                                 

                                cdts1hdpen01d:sr3dusr:/home/sr3dusr> sqoop import --direct --verbose --connect jdbc:teiid:ImputationV1_DEV@mm://cdtssoa126d.rxcorp.com:31000 --username soamgr --table MetadataSource_MSSQL_View.ImputationModules --libjars  /development/sr3/teiid-8.13.4-jdbc.jar

                                Warning: /opt/cloudera/parcels/CDH-5.5.2-1.cdh5.5.2.p0.4/bin/../lib/sqoop/../accumulo does not exist! Accumulo imports will fail.

                                Please set $ACCUMULO_HOME to the root of your Accumulo installation.

                                16/05/06 02:08:04 INFO sqoop.Sqoop: Running Sqoop version: 1.4.6-cdh5.5.2

                                16/05/06 02:08:04 DEBUG tool.BaseSqoopTool: Enabled debug logging.

                                16/05/06 02:08:04 ERROR tool.BaseSqoopTool: Error parsing arguments for import:

                                16/05/06 02:08:04 ERROR tool.BaseSqoopTool: Unrecognized argument: --libjars

                                16/05/06 02:08:04 ERROR tool.BaseSqoopTool: Unrecognized argument: /development/sr3/teiid-8.13.4-jdbc.jar

                                16/05/06 02:08:04 DEBUG sqoop.Sqoop:

                                Try --help for usage instructions.

                                 

                                 

                                Try --help for usage instructions.

                                        at org.apache.sqoop.tool.ImportTool.validateOptions(ImportTool.java:1133)

                                        at org.apache.sqoop.Sqoop.run(Sqoop.java:133)

                                        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)

                                        at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:179)

                                        at org.apache.sqoop.Sqoop.runTool(Sqoop.java:218)

                                        at org.apache.sqoop.Sqoop.runTool(Sqoop.java:227)

                                        at org.apache.sqoop.Sqoop.main(Sqoop.java:236)

                                • 28. Re: How to connect to Teiid VDB through Linux server ?
                                  m.ardito

                                  >16/05/06 02:08:04 ERROR tool.BaseSqoopTool: Unrecognized argument: --libjars

                                   

                                  in the docs, libjars option seem to have only one dash... ?

                                   

                                  https://sqoop.apache.org/docs/1.4.6/SqoopUserGuide.html#_using_generic_and_specific_arguments

                                   

                                  this subtopic suhould perhaps be moved to a new thread...

                                   

                                  Marco

                                  • 29. Re: How to connect to Teiid VDB through Linux server ?
                                    ravindra_singh

                                    Connect to Teiid through SQOOP

                                     

                                    New discussion.

                                     

                                    Marco,

                                     

                                    I tried with single dash also

                                    1 2 Previous Next