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

Failed to parse address :0 #194

Closed
waynexia opened this issue Mar 11, 2024 · 1 comment · Fixed by #195
Closed

Failed to parse address :0 #194

waynexia opened this issue Mar 11, 2024 · 1 comment · Fixed by #195
Labels
bug Something isn't working

Comments

@waynexia
Copy link
Member

I got this error from frontend when using gtctl to start a baremetal cluster:

Error: 0: Failed to start frontend, at ../greptimedb-dev/src/cmd/src/frontend.rs:279:14
1: Failed to parse address :0
2: AddrParseError(Socket)

From gtctl's log, the frontend command is

component 'frontend.0' binary '../target/greptimedb-dev/release/greptime' (pid '3908968') exited with error: exit status 1
args: '[--log-level=info frontend start --metasrv-addr=127.0.0.1:3002 --http-addr=:0 --rpc-addr=:0 --mysql-addr=:0 --postgres-addr=:0 --opentsdb-addr=:0 -c=../greptimedb-dev/config/frontend.example.toml]'

It might be caused by the default addr parameter:

--http-addr=:0 --rpc-addr=:0 --mysql-addr=:0 --postgres-addr=:0 --opentsdb-addr=:0

gtctl config file:

cluster:
  name: mycluster # name of the cluster
  artifact:
    local: "../target/greptimedb-dev/release/greptime"
  frontend:
    replicas: 1
    config: '../greptimedb-dev/config/frontend.example.toml'
  datanode:
    replicas: 3
    rpcAddr: 0.0.0.0:14100
    mysqlAddr: 0.0.0.0:14200
    httpAddr: 0.0.0.0:14300
    config: '../greptimedb-dev/config/datanode.example.toml'
  meta:
    replicas: 1
    storeAddr: 127.0.0.1:2379
    serverAddr: 127.0.0.1:3002
    httpAddr: 0.0.0.0:14001
    config: '../greptimedb-dev/config/metasrv.example.toml'

etcd:
  artifact:
    local: "/usr/bin/etcd"
@waynexia waynexia added the bug Something isn't working label Mar 11, 2024
@tisonkun
Copy link
Contributor

tisonkun commented Mar 11, 2024

Would you provide a reproducible example? From the info above it's unclear what's the command causes this error.

The baremetal NewCluster use config: config.DefaultBareMetalConfig(), which set a default addr for those fields.

UPDATED - Found if a config file set it will take priority ..

opts = append(opts, baremetal.WithReplaceConfig(&cfg))

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

Successfully merging a pull request may close this issue.

2 participants