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

Cannot connect to connector when starting up risingwave with risedev #12922

Closed
hzxa21 opened this issue Oct 17, 2023 · 6 comments · Fixed by #12928
Closed

Cannot connect to connector when starting up risingwave with risedev #12922

hzxa21 opened this issue Oct 17, 2023 · 6 comments · Fixed by #12928
Labels
type/bug Something isn't working
Milestone

Comments

@hzxa21
Copy link
Collaborator

hzxa21 commented Oct 17, 2023

Describe the bug

Hit environment variable CONNECTOR_LIBS_PATH is not specified when trying to CREATE TABLE for mysql-cdc with risingwave started up via risedev

Error message/log

dev=> set cdc_backfill='true';

CREATE TABLE lineitem_rw (
   k int primary key,
   v int
) WITH (
    connector = 'mysql-cdc',
    hostname = '127.0.0.1',
    port = '8306',
    username = 'root',
    password = '123456',
    database.name = 'test',
    table.name = 'test',
    server.id = '2'
);
SET_VARIABLE
ERROR:  QueryError: internal error: internal error: environment variable CONNECTOR_LIBS_PATH is not specified

To Reproduce

  1. risedev configure to enable connector build
  2. risedev d to start dev playground
  3. Start up a local mysql instance and create a test table.
  4. Run the following query in psql
dev=> set cdc_backfill='true';
SET_VARIABLE

dev=>CREATE TABLE lineitem_rw (
   k int primary key,
   v int
) WITH (
    connector = 'mysql-cdc',
    hostname = '127.0.0.1',
    port = '8306',
    username = 'root',
    password = '123456',
    database.name = 'test',
    table.name = 'test',
    server.id = '2'
);

ERROR:  QueryError: internal error: internal error: environment variable CONNECTOR_LIBS_PATH is not specified

Expected behavior

No response

How did you deploy RisingWave?

No response

The version of RisingWave

No response

Additional context

No response

@hzxa21 hzxa21 added the type/bug Something isn't working label Oct 17, 2023
@github-actions github-actions bot added this to the release-1.4 milestone Oct 17, 2023
@hzxa21
Copy link
Collaborator Author

hzxa21 commented Oct 17, 2023

I tried the following and none work:
1.

export CONNECTOR_LIBS_PATH=.risingwave/bin/connector-node/libs/
./risedev d
CONNECTOR_LIBS_PATH=.risingwave/bin/connector-node/libs/ ./risedev d

@BugenZhao
Copy link
Member

I tried the following and none work:

We should definitely handle this in RiseDev.

@chenzl25
Copy link
Contributor

Could you please check this file ./risedev-components.user.env? It should contain CONNECTOR_LIBS_PATH=.risingwave/bin/connector-node/libs/ if risedev configures to enable connector build.

@hzxa21
Copy link
Collaborator Author

hzxa21 commented Oct 18, 2023

Just remember that risedev uses risedev. It is fixed in #12928

@hzxa21
Copy link
Collaborator Author

hzxa21 commented Oct 18, 2023

Could you please check this file ./risedev-components.user.env? It should contain CONNECTOR_LIBS_PATH=.risingwave/bin/connector-node/libs/ if risedev configures to enable connector build.

The env is set in risedev-components.user.env but it didn't work in my local box

@hzxa21
Copy link
Collaborator Author

hzxa21 commented Oct 18, 2023

The problem goes away today in my local box. The only thing that is different than yesterday is I have restarted my local box. I think this is related to when tmux reads the env of the host:

When the server is started, tmux copies the environment into the
global environment; in addition, each session has a session
environment.
https://man7.org/linux/man-pages/man1/tmux.1.html#GLOBAL_AND_SESSION_ENVIRONMENT

That means if tmux server is started after risedev configure when CONNECTOR_LIBS_PATH is exported, all tmux sessions will see this env. Otherwise, if my tmux server has already started before I enable connector build (I think this is why happened yesterday), all tmux sessions won't see this env.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants