Code Monkey home page Code Monkey logo

proton-grafana-source's Issues

cardemo is broken?

I tried running the docker-compose.yaml in this repo locally using docker compose up but got an error from cardemo (which is in the separate timeplus-io/chameleon repo):

04_grafana-carsharing_datagen-1  | logger initialization with level 4
04_grafana-carsharing_datagen-1  | time="2024-07-04 13:27:11.541 +0000" level=info msg="loaded config is {[{proton map[host:proton interval:200]}]}" func=github.com/timeplus-io/chameleon/cardemo/sink.loadConfig file="/build/sink/sink.go:53"
04_grafana-carsharing_datagen-1  | time="2024-07-04 13:27:11.541 +0000" level=info msg="load sinks from /timeplus/sink.yaml success with count 1" func=github.com/timeplus-io/chameleon/cardemo/demo.NewCarSharingDemoApp file="/build/demo/app.go:117"
04_grafana-carsharing_datagen-1  | panic: runtime error: invalid memory address or nil pointer dereference
04_grafana-carsharing_datagen-1  | [signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0xa05126]
04_grafana-carsharing_datagen-1  | 
04_grafana-carsharing_datagen-1  | goroutine 1 [running]:
04_grafana-carsharing_datagen-1  | github.com/timeplus-io/chameleon/cardemo/demo.NewCarSharingDemoApp()
04_grafana-carsharing_datagen-1  | 	/build/demo/app.go:120 +0x506
04_grafana-carsharing_datagen-1  | github.com/timeplus-io/chameleon/cardemo/demo.Run(0xc0000c4700?, {0xc0000e8940?, 0x0?, 0x4?})
04_grafana-carsharing_datagen-1  | 	/build/demo/demo.go:9 +0x17
04_grafana-carsharing_datagen-1  | github.com/spf13/cobra.(*Command).execute(0x1117580, {0xc0001341a0, 0x4, 0x4})
04_grafana-carsharing_datagen-1  | 	/go/pkg/mod/github.com/spf13/[email protected]/command.go:872 +0x6aa
04_grafana-carsharing_datagen-1  | github.com/spf13/cobra.(*Command).ExecuteC(0x1117580)
04_grafana-carsharing_datagen-1  | 	/go/pkg/mod/github.com/spf13/[email protected]/command.go:990 +0x38d
04_grafana-carsharing_datagen-1  | github.com/spf13/cobra.(*Command).Execute(...)
04_grafana-carsharing_datagen-1  | 	/go/pkg/mod/github.com/spf13/[email protected]/command.go:918
04_grafana-carsharing_datagen-1  | github.com/timeplus-io/chameleon/cardemo/cmd.Execute()
04_grafana-carsharing_datagen-1  | 	/build/cmd/root.go:36 +0x105
04_grafana-carsharing_datagen-1  | main.main()
04_grafana-carsharing_datagen-1  | 	/build/main.go:6 +0xf
04_grafana-carsharing_datagen-1 exited with code 2
...

After poring over the code used to build the cardemo docker image, I applied the following patch to docker-compose.yaml:

-           - type: proton
+           - type: timeplus
+               address: http://proton:3218

but now get code 400 errors when I run docker compose up:

04_grafana-carsharing_datagen-1  | logger initialization with level 4
04_grafana-carsharing_datagen-1  | time="2024-07-04 21:39:01.209 +0000" level=info msg="loaded config is {[{timeplus map[address:http://proton:3218 host:proton interval:200]}]}" func=github.com/timeplus-io/chameleon/cardemo/sink.loadConfig file="/build/sink/sink.go:53"
04_grafana-carsharing_datagen-1  | time="2024-07-04 21:39:01.209 +0000" level=info msg="load sinks from /timeplus/sink.yaml success with count 1" func=github.com/timeplus-io/chameleon/cardemo/demo.NewCarSharingDemoApp file="/build/demo/app.go:117"
04_grafana-carsharing_datagen-1  | time="2024-07-04 21:39:01.209 +0000" level=info msg="Calling Stream Init" func="github.com/timeplus-io/chameleon/cardemo/sink/timeplus.(*TimeplusSink).initStream" file="/build/sink/timeplus/sink.go:331"
04_grafana-carsharing_datagen-1  | time="2024-07-04 21:39:01.216 +0000" level=warning msg="DimCarStream failed to init" func="github.com/timeplus-io/chameleon/cardemo/sink/timeplus.(*TimeplusSink).Init" file="/build/sink/timeplus/sink.go:291"
04_grafana-carsharing_datagen-1  | time="2024-07-04 21:39:01.515 +0000" level=info msg="success to load routes from ./routes.json" func="github.com/timeplus-io/chameleon/cardemo/demo.(*CarSharingDemoApp).initRoutes" file="/build/demo/app.go:154"
04_grafana-carsharing_datagen-1  | time="2024-07-04 21:39:01.517 +0000" level=error msg="failed to initialize data to stream dim_car_info, failed to ingest data into stream dim_car_info: request failed with status code 400, response body Code: 62. DB::Exception: Syntax error: failed at position 1 ('{'): {\"columns\":[\"cid\",\"license_plate_no\",\"in_service\"],\"data\":[[\"c00000\",\"I9RP3V\",true],[\"c00001\",\"WPNE5X\",true],[\"c00002\",\"NAKD4Q\",true],[\"c00003\",\"ZVBCLV\",true],[. Expected one of: Query, Query with output, EXPLAIN, SELECT query, possibly with UNION, list of union elements, SELECT query, subquery, possibly with UNION, SELECT subquery, SELECT query, WITH, SELECT, SUBSCRIBE TO SELECT query, possibly with UNION, SUBSCRIBE, UNSUBSCRIBE FROM SELECT query, possibly with UNION SETTINGS query_id=uuid, UNSUBSCRIBE, RECOVER FROM SELECT query, possibly with UNION SETTINGS query_id=uuid, RECOVER, SHOW CREATE QUOTA query, SHOW CREATE, SHOW CREATE FORMAT SCHEMA query, SHOW, SHOW [TEMPORARY] TABLES|DATABASES|CLUSTERS|CLUSTER 'name' [[NOT] [I]LIKE 'str'] [LIMIT expr], EXISTS or SHOW CREATE query, EXISTS, DESCRIBE FILESYSTEM CACHE query, DESCRIBE, DESC, DESCRIBE query, SHOW PROCESSLIST query, SHOW PROCESSLIST, CREATE STREAM or ATTACH STREAM query, CREATE, ATTACH, CREATE EXTERNAL TABLE query, CREATE DATABASE query, CREATE VIEW query, CREATE DICTIONARY, CREATE MATERIALIZED VIEW query, ALTER query, ALTER STREAM, ALTER DATABASE, RENAME query, RENAME STREAM, DROP query, DROP, DETACH, TRUNCATE, DROP EXTERNAL TABLE query, CHECK TABLE, KILL QUERY query, KILL, OPTIMIZE query, OPTIMIZE TABLE, WATCH query, WATCH, SHOW FORMAT SCHEMAS query, SHOW ACCESS query, SHOW ACCESS, ShowAccessEntitiesQuery, SHOW GRANTS query, SHOW GRANTS, SHOW PRIVILEGES query, SHOW PRIVILEGES, INSERT query, INSERT INTO, USE query, USE, SET ROLE or SET DEFAULT ROLE query, SET ROLE DEFAULT, SET ROLE, SET DEFAULT ROLE, SET query, SET, SYSTEM query, SYSTEM, CREATE USER or ALTER USER query, ALTER USER, CREATE USER, CREATE ROLE or ALTER ROLE query, ALTER ROLE, CREATE ROLE, CREATE QUOTA or ALTER QUOTA query, ALTER QUOTA, CREATE QUOTA, CREATE ROW POLICY or ALTER ROW POLICY query, CREATE SETTINGS PROFILE or ALTER SETTINGS PROFILE query, CREATE FUNCTION query, CREATE FORMAT SCHEMA query, DROP FORMAT SCHEMA query, DROP FUNCTION query, DROP access entity query, GRANT or REVOKE query, REVOKE, GRANT, EXTERNAL DDL query, EXTERNAL DDL FROM, TCL query, BEGIN TRANSACTION, COMMIT, ROLLBACK, SET TRANSACTION SNAPSHOT, BACKUP or RESTORE query, BACKUP, RESTORE. (SYNTAX_ERROR) (version 1.5.12)\n" func="github.com/timeplus-io/chameleon/cardemo/sink/timeplus.(*TimeplusSink).InitCars" file="/build/sink/timeplus/sink.go:373"
04_grafana-carsharing_datagen-1  | time="2024-07-04 21:39:01.525 +0000" level=error msg="failed to initialize data to stream dim_user_info, failed to ingest data into stream dim_user_info: request failed with status code 400, response body Code: 62. DB::Exception: Syntax error: failed at position 1 ('{'): {\"columns\":[\"uid\",\"first_name\",\"last_name\",\"email\",\"credit_card\",\"gender\",\"birthday\"],\"data\":[[\"u00000\",\"Ashlynn\",\"Mueller\",\"[email protected]\",\"644402866721. Expected one of: Query, Query with output, EXPLAIN, SELECT query, possibly with UNION, list of union elements, SELECT query, subquery, possibly with UNION, SELECT subquery, SELECT query, WITH, SELECT, SUBSCRIBE TO SELECT query, possibly with UNION, SUBSCRIBE, UNSUBSCRIBE FROM SELECT query, possibly with UNION SETTINGS query_id=uuid, UNSUBSCRIBE, RECOVER FROM SELECT query, possibly with UNION SETTINGS query_id=uuid, RECOVER, SHOW CREATE QUOTA query, SHOW CREATE, SHOW CREATE FORMAT SCHEMA query, SHOW, SHOW [TEMPORARY] TABLES|DATABASES|CLUSTERS|CLUSTER 'name' [[NOT] [I]LIKE 'str'] [LIMIT expr], EXISTS or SHOW CREATE query, EXISTS, DESCRIBE FILESYSTEM CACHE query, DESCRIBE, DESC, DESCRIBE query, SHOW PROCESSLIST query, SHOW PROCESSLIST, CREATE STREAM or ATTACH STREAM query, CREATE, ATTACH, CREATE EXTERNAL TABLE query, CREATE DATABASE query, CREATE VIEW query, CREATE DICTIONARY, CREATE MATERIALIZED VIEW query, ALTER query, ALTER STREAM, ALTER DATABASE, RENAME query, RENAME STREAM, DROP query, DROP, DETACH, TRUNCATE, DROP EXTERNAL TABLE query, CHECK TABLE, KILL QUERY query, KILL, OPTIMIZE query, OPTIMIZE TABLE, WATCH query, WATCH, SHOW FORMAT SCHEMAS query, SHOW ACCESS query, SHOW ACCESS, ShowAccessEntitiesQuery, SHOW GRANTS query, SHOW GRANTS, SHOW PRIVILEGES query, SHOW PRIVILEGES, INSERT query, INSERT INTO, USE query, USE, SET ROLE or SET DEFAULT ROLE query, SET ROLE DEFAULT, SET ROLE, SET DEFAULT ROLE, SET query, SET, SYSTEM query, SYSTEM, CREATE USER or ALTER USER query, ALTER USER, CREATE USER, CREATE ROLE or ALTER ROLE query, ALTER ROLE, CREATE ROLE, CREATE QUOTA or ALTER QUOTA query, ALTER QUOTA, CREATE QUOTA, CREATE ROW POLICY or ALTER ROW POLICY query, CREATE SETTINGS PROFILE or ALTER SETTINGS PROFILE query, CREATE FUNCTION query, CREATE FORMAT SCHEMA query, DROP FORMAT SCHEMA query, DROP FUNCTION query, DROP access entity query, GRANT or REVOKE query, REVOKE, GRANT, EXTERNAL DDL query, EXTERNAL DDL FROM, TCL query, BEGIN TRANSACTION, COMMIT, ROLLBACK, SET TRANSACTION SNAPSHOT, BACKUP or RESTORE query, BACKUP, RESTORE. (SYNTAX_ERROR) (version 1.5.12)\n" func="github.com/timeplus-io/chameleon/cardemo/sink/timeplus.(*TimeplusSink).InitUsers" file="/build/sink/timeplus/sink.go:396"
04_grafana-carsharing_datagen-1  | time="2024-07-04 21:39:01.525 +0000" level=info msg="initialize demo car/user with number 100 100" func="github.com/timeplus-io/chameleon/cardemo/demo.(*CarSharingDemoApp).Start" file="/build/demo/app.go:241"
...

Can anyone tell me what I might be doing wrong?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.