Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SnappyData-1.3.0 JDBC connection is not working. #1569

Open
parimalaadinarayan opened this issue Dec 30, 2021 · 1 comment
Open

SnappyData-1.3.0 JDBC connection is not working. #1569

parimalaadinarayan opened this issue Dec 30, 2021 · 1 comment

Comments

@parimalaadinarayan
Copy link

parimalaadinarayan commented Dec 30, 2021

Connecting to JDBC from client gives below error:
java.sql.SQLException: (SQLState=40XD0 Severity=30000) ([hostname[1527]]) Container has been closed or has moved from 'hostname[1528]' {failed after trying all available servers: {hostname[1528]=hostname[1528], 10.49.3.107[1528]=10.49.3.107[1528], hostname[1527]=DEV-BDSP-Worker-07[1527]}, secondary-locators=[hostname[1528]]}.

Where as connection works if we run the program locally.

Below is the code snippet.
`try
{
private static final String JDBC_URL = "jdbc:snappydata://%1$s:%2$s/";

            Connection connection = DriverManager.getConnection(String.format(JDBC_URL, "ip", "1527"));
            Statement statement = connection.createStatement();
            ResultSet rs = statement.executeQuery(
                    "select IMSI,MSISDN,IMEI,LMPARTNAME,LATITUDE,LONGITUDE,UNCERTAINTY,DATEPART,EVENTNAME,CELLID,RATNAME,CARRIER,SUBSCRIBERTYPE,SUBEVENTNAME,BPARTY,DOMAIN,MSC,MME,SGSN,MCCNAME,MAC from SA_bdspInternal_1640846360399");
            while(rs.next()){
                String a = rs.getString("IMSI");
                System.out.println(a);
            }

            connection.close();
        }
        catch (SQLException ex)
        {
            ex.printStackTrace();
        }`

1.Tried with both 1527 and 1528 ports.

2.Please find the below locator log
21/12/30 04:44:36.961 PST main<tid=0x1> INFO LocatorImpl: Starting Thrift locator on: DEV-BDSP-Worker-07/10.49.3.107[1527]
21/12/30 04:44:37.038 PST main<tid=0x1> INFO LocatorImpl: Started Thrift locator (Compact Protocol) on: DEV-BDSP-Worker-07/10.49.3.107[1528]
It is trying to start Locator on port 1527 as well as 1528

3.Connection used to work with snappydata-1.1.0.

4.Connection on same machine works if we switch to SnappyData 1.1.0.

5.OS info as below
NAME="Red Hat Enterprise Linux Server"
VERSION="7.7 (Maipo)"

6.Another observation in new snappydata is clicking on members on 5050 UI gives below error:
HTTP ERROR 400
Problem accessing /dashboard/memberDetails/. Reason:

Missing memId parameter

7.No error are seen on startup.

Please let us know the solution.

@farhan-link
Copy link

Hi @parimalaadinarayan,

Are you able to resolve the connection issue? I am also facing the same while trying to connect cluster from local snappy cli.

Using SnappyData's default log4j profile: store-log4j.properties 22/04/08 18:29:58.356 IST main<tid=0x1> INFO ClientService: Starting client on 'X.X.X.X' with ID='58370|2022/04/08 18:29:58.302 IST' Source-Revision=05ebab44898503f40d3a61930d5996b3b5699a6f ERROR 40XD0: (SQLState=40XD0 Severity=30000) ([XX.XX.XX.XX[1527], snappydata-locator-0[1527]]) Container has been closed or has moved from 'snappydata-locator-0[1527]' {failed after trying all available servers: {snappydata-locator-0[1527]=snappydata-locator-0[1527], <DNS>[1527]=<DNS>[1527], XX.XX.XX.XX[1527]=XX.XX.XX.XX[1527]}, secondary-locators=[DNS[1527]] with: Channel closed. [SOCKET END OF TRANSMISSION]}.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants