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

Build hangs #60

Closed
peol opened this Issue Oct 6, 2018 · 4 comments

Comments

Projects
2 participants
@peol
Member

peol commented Oct 6, 2018

In PR #56 the build hangs after what seemingly looks like a green test suite, needs to be fixed so we can merge the PR.

@wennmo

This comment has been minimized.

Show comment
Hide comment
@wennmo

wennmo Oct 6, 2018

Member
$ npm run start:ci

> core-grpc-jdbc-connector-example-reload-runner@0.0.1 start:ci C:\gits\qlik-oss\core-grpc-jdbc-connector\example\reload-runner
> node index.js

Loading from MySQL
Reload took: 769 ms
(node:17304) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): Error: Resource not found
(node:17304) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Seems timing related. If the test is executed directly after the containers are up it sometimes fails, but if adding a sleep after spinning up the containers the test succeeds.

Member

wennmo commented Oct 6, 2018

$ npm run start:ci

> core-grpc-jdbc-connector-example-reload-runner@0.0.1 start:ci C:\gits\qlik-oss\core-grpc-jdbc-connector\example\reload-runner
> node index.js

Loading from MySQL
Reload took: 769 ms
(node:17304) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): Error: Resource not found
(node:17304) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Seems timing related. If the test is executed directly after the containers are up it sometimes fails, but if adding a sleep after spinning up the containers the test succeeds.

@sublibra sublibra added this to Planned this week in Qlik Core Oct 8, 2018

@wennmo

This comment has been minimized.

Show comment
Hide comment
@wennmo

wennmo Oct 8, 2018

Member

Actually there are two problems here. The jdbc connector is also unable to connect to the db in #56.

Fetch Size limited to: 100000 rows
Fetch max data chunk size limited to: 300
Server started!
Connecting to database...
Connecting to database...
com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
        at com.mysql.cj.jdbc.exceptions.SQLError.createCommunicationsException(SQLError.java:174)
        at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:64)
        at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:832)
        at com.mysql.cj.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:456)
        at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:240)
        at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:207)
        at java.sql.DriverManager.getConnection(DriverManager.java:664)
        at java.sql.DriverManager.getConnection(DriverManager.java:247)
        at qlik.jdbc.connector.ConnectorImpl.getData(ConnectorImpl.java:62)
        at qlik.connect.ConnectorGrpc$MethodHandlers.invoke(ConnectorGrpc.java:298)
        at io.grpc.stub.ServerCalls$UnaryServerCallHandler$UnaryServerCallListener.onHalfClose(ServerCalls.java:171)
        at io.grpc.internal.ServerCallImpl$ServerStreamListenerImpl.halfClosed(ServerCallImpl.java:283)
        at io.grpc.internal.ServerImpl$JumpToApplicationThreadServerStreamListener$1HalfClosed.runInContext(ServerImpl.java:707)
        at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)
        at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:123)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
Caused by: com.mysql.cj.exceptions.CJCommunicationsException: Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
        at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:61)
        at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:105)
        at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:151)
        at com.mysql.cj.exceptions.ExceptionFactory.createCommunicationsException(ExceptionFactory.java:167)
        at com.mysql.cj.protocol.a.NativeSocketConnection.connect(NativeSocketConnection.java:91)
        at com.mysql.cj.NativeSession.connect(NativeSession.java:152)
        at com.mysql.cj.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:952)
        at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:822)
        ... 15 more
Caused by: java.net.UnknownHostException: mysql-database: Name does not resolve
        at java.net.Inet4AddressImpl.lookupAllHostAddr(Native Method)
        at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:928)
        at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1323)
        at java.net.InetAddress.getAllByName0(InetAddress.java:1276)
        at java.net.InetAddress.getAllByName(InetAddress.java:1192)
        at java.net.InetAddress.getAllByName(InetAddress.java:1126)
        at com.mysql.cj.protocol.StandardSocketFactory.connect(StandardSocketFactory.java:150)
        at com.mysql.cj.protocol.a.NativeSocketConnection.connect(NativeSocketConnection.java:65)
        ... 18 more
Member

wennmo commented Oct 8, 2018

Actually there are two problems here. The jdbc connector is also unable to connect to the db in #56.

Fetch Size limited to: 100000 rows
Fetch max data chunk size limited to: 300
Server started!
Connecting to database...
Connecting to database...
com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
        at com.mysql.cj.jdbc.exceptions.SQLError.createCommunicationsException(SQLError.java:174)
        at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:64)
        at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:832)
        at com.mysql.cj.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:456)
        at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:240)
        at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:207)
        at java.sql.DriverManager.getConnection(DriverManager.java:664)
        at java.sql.DriverManager.getConnection(DriverManager.java:247)
        at qlik.jdbc.connector.ConnectorImpl.getData(ConnectorImpl.java:62)
        at qlik.connect.ConnectorGrpc$MethodHandlers.invoke(ConnectorGrpc.java:298)
        at io.grpc.stub.ServerCalls$UnaryServerCallHandler$UnaryServerCallListener.onHalfClose(ServerCalls.java:171)
        at io.grpc.internal.ServerCallImpl$ServerStreamListenerImpl.halfClosed(ServerCallImpl.java:283)
        at io.grpc.internal.ServerImpl$JumpToApplicationThreadServerStreamListener$1HalfClosed.runInContext(ServerImpl.java:707)
        at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)
        at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:123)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
Caused by: com.mysql.cj.exceptions.CJCommunicationsException: Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
        at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:61)
        at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:105)
        at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:151)
        at com.mysql.cj.exceptions.ExceptionFactory.createCommunicationsException(ExceptionFactory.java:167)
        at com.mysql.cj.protocol.a.NativeSocketConnection.connect(NativeSocketConnection.java:91)
        at com.mysql.cj.NativeSession.connect(NativeSession.java:152)
        at com.mysql.cj.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:952)
        at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:822)
        ... 15 more
Caused by: java.net.UnknownHostException: mysql-database: Name does not resolve
        at java.net.Inet4AddressImpl.lookupAllHostAddr(Native Method)
        at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:928)
        at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1323)
        at java.net.InetAddress.getAllByName0(InetAddress.java:1276)
        at java.net.InetAddress.getAllByName(InetAddress.java:1192)
        at java.net.InetAddress.getAllByName(InetAddress.java:1126)
        at com.mysql.cj.protocol.StandardSocketFactory.connect(StandardSocketFactory.java:150)
        at com.mysql.cj.protocol.a.NativeSocketConnection.connect(NativeSocketConnection.java:65)
        ... 18 more
@wennmo

This comment has been minimized.

Show comment
Hide comment
@wennmo

wennmo Oct 8, 2018

Member

This seems to be a problem in the 8.0.12 release of mysql. The database is failing on the init-script:

2018-10-08T08:52:55.155550Z 10 [Warning] [MY-010330] [Server] 'tables_priv' entry 'sys_config mysql.sys@localhost' ignored in --skip-name-resolve mode.
mysql: [Warning] Using a password on the command line interface can be insecure.

/usr/local/bin/docker-entrypoint.sh: running /docker-entrypoint-initdb.d/init-airports-data.sql
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 1290 (HY000) at line 16: The MySQL server is running with the --secure-file-priv option so it cannot execute this statement

Similar problem is reported here and is supposed to be fixed in 8.0.14 (which is not released yet on dockerhub).

Member

wennmo commented Oct 8, 2018

This seems to be a problem in the 8.0.12 release of mysql. The database is failing on the init-script:

2018-10-08T08:52:55.155550Z 10 [Warning] [MY-010330] [Server] 'tables_priv' entry 'sys_config mysql.sys@localhost' ignored in --skip-name-resolve mode.
mysql: [Warning] Using a password on the command line interface can be insecure.

/usr/local/bin/docker-entrypoint.sh: running /docker-entrypoint-initdb.d/init-airports-data.sql
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 1290 (HY000) at line 16: The MySQL server is running with the --secure-file-priv option so it cannot execute this statement

Similar problem is reported here and is supposed to be fixed in 8.0.14 (which is not released yet on dockerhub).

@wennmo

This comment has been minimized.

Show comment
Hide comment
@wennmo

wennmo Oct 8, 2018

Member

Since the database is not up and running, the connector will fail to connect. The stack trace in the connector log is from when the exception is caught and logged. The hang in the build however is due to the reload-runner not catching exceptions when fetching data.

I will update the example to catch exceptions and exit on error. The problem with 8.0.12 version of mysql will be handled separately.

Member

wennmo commented Oct 8, 2018

Since the database is not up and running, the connector will fail to connect. The stack trace in the connector log is from when the exception is caught and logged. The hang in the build however is due to the reload-runner not catching exceptions when fetching data.

I will update the example to catch exceptions and exit on error. The problem with 8.0.12 version of mysql will be handled separately.

@wennmo wennmo closed this in #61 Oct 8, 2018

Qlik Core automation moved this from Planned this week to Done Oct 8, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment