influxdb搭建问题,端口8086被time waite占用

根据https://ceshiren.com/t/topic/3716 帖子创建监控平台


报错内容:

error Failed to set up TCP listener {“log_id”: “0U6uEyI0000”, “service”: “tcp-listener”, “addr”: “:8086”, “error”: “listen tcp :8086: bind: address already in use”}
Error: listen tcp :8086: bind: address already in use
See ‘influxd -h’ for help —已查8086是time wait进程被端口被占用,已按照帖子

https://blog.csdn.net/ganggang4321/article/details/88892378

修改了配置,但是还不行
正常已建好


Docker+influxdb+grafana安装部署_luoyiliuliu的博客-CSDN博客 按照这个帖子已卡到influx这,但是查到的还不行,已删除掉docker,重新安装influx还是这样,influx数据库需要有本地真实得数据库服务ip地址?

已换端口建了,还是提示8086端口被占用,influxdb默认是8086端口,需要修改influxdb配置文件,怎么修改?

https://ceshiren.com/t/topic/3716---根据社区建监控的帖子重新建,还是报错


报错内容:

error Failed to set up TCP listener {“log_id”: “0U6uEyI0000”, “service”: “tcp-listener”, “addr”: “:8086”, “error”: “listen tcp :8086: bind: address already in use”}
Error: listen tcp :8086: bind: address already in use
See ‘influxd -h’ for help —已查8086是time wait进程被端口被占用,已按照帖子

https://blog.csdn.net/ganggang4321/article/details/88892378

修改了配置,但是还不行
正常已建好


Docker+influxdb+grafana安装部署_luoyiliuliu的博客-CSDN博客 按照这个帖子已卡到influx这,但是查到的还不行,已删除掉docker,重新安装influx还是这样,influx数据库需要有本地真实得数据库服务ip地址?

已换端口建了,还是提示8086端口被占用,influxdb默认是8086端口,需要修改influxdb配置文件,怎么修改?

8086被占用了 就使用其他的端口进行映射能行吗? -p 8088:8086就好了

我换过好几个端口8085,8087,都提示8086端口被占用


我想问influxdb的配置端口文件在哪修改?网上默认的,在我这都找不到

docker run -d –name=influxdb –network grafana -p 8086:8086 -v ${PWD}/influxdb/:/var/lib/influxdb influxdb

你使用的命令是这个吗

测试开发实战 | Docker+Jmeter+InfluxDB+Grafana 搭建性能监控平台 我是按照这里的来的,我再试试你说的这个建下

创建了,但是还是提示一样的


我这个可以用vscode这类型打开influxdb么?

把命令和输出完整的贴下吧,别截图了,截图截的都不对。

命令为加粗:
[root@192 /]# docker pull influxdb
Using default tag: latest
latest: Pulling from library/influxdb
d960726af2be: Pull complete
e8d62473a22d: Pull complete
8962bc0fad55: Pull complete
3b26e21cfb07: Pull complete
f77b907603e3: Pull complete
2b137bdfa0c5: Pull complete
7e6fa243fc79: Pull complete
3e0cae572c4f: Pull complete
7968db8c13ce: Pull complete
Digest: sha256:6b35144cb57f3860d8cf083d5d9b93d01a1304d041fbb352dc76d31d3ffff780
Status: Downloaded newer image for influxdb:latest
docker.io/library/influxdb:latest
[root@192 /]# docker run -d --name=influxdb --network grafana -p 8086:8086 -v ${PWD}/influxdb/:/var/lib/influxdb/ influxdb:latest
之前是:docker run -d -p 8083:8083 -p 8086:8086 --name=jmeterdb influxdb
1a6c773353b1ec20f9b4c3dde84b0675844e9eb51a918980f1e8351b93c8ea2d
[root@192 /]# docker exec -it influxdb bash
之前是:docker exec -it jmeterdb /bin/bash
root@1a6c773353b1:/# influx
Influx Client

Usage:
influx [command]

Available Commands:
apply Apply a template to manage resources
auth Authorization management commands
backup Backup database
bucket Bucket management commands
completion Generates completion scripts
config Config management commands
dashboards List Dashboard(s).
delete Delete points from influxDB
export Export existing resources as a template
help Help about any command
org Organization management commands
ping Check the InfluxDB /health endpoint
query Execute a Flux query
restore Restores a backup directory to InfluxDB.
secret Secret management commands
setup Setup instance with initial user, org, bucket
stacks List stack(s) and associated templates. Subcommands manage stacks.
task Task management commands
telegrafs List Telegraf configuration(s). Subcommands manage Telegraf configurations.
template Summarize the provided template
user User management commands
v1 InfluxDB v1 management commands
version Print the influx CLI version
write Write points to InfluxDB

Flags:
-h, --help Help for the influx command

Use “influx [command] --help” for more information about a command.
root@1a6c773353b1:/# influxd
2021-05-23T13:09:51.710270Z info Welcome to InfluxDB {“log_id”: “0UILN~sW000”, “version”: “2.0.6”, “commit”: “4db98b4c9a”, “build_date”: “2021-04-29T16:48:12Z”}
2021-05-23T13:09:51.712413Z info Resources opened {“log_id”: “0UILN~sW000”, “service”: “bolt”, “path”: “/root/.influxdbv2/influxd.bolt”}
2021-05-23T13:09:51.712852Z info Bringing up metadata migrations {“log_id”: “0UILN~sW000”, “service”: “migrations”, “migration_count”: 15}
2021-05-23T13:09:51.737403Z info Using data dir {“log_id”: “0UILN~sW000”, “service”: “storage-engine”, “service”: “store”, “path”: “/root/.influxdbv2/engine/data”}
2021-05-23T13:09:51.737536Z info Compaction settings {“log_id”: “0UILN~sW000”, “service”: “storage-engine”, “service”: “store”, “max_concurrent_compactions”: 1, “throughput_bytes_per_second”: 50331648, “throughput_bytes_per_second_burst”: 50331648}
2021-05-23T13:09:51.737550Z info Open store (start) {“log_id”: “0UILN~sW000”, “service”: “storage-engine”, “service”: “store”, “op_name”: “tsdb_open”, “op_event”: “start”}
2021-05-23T13:09:51.737609Z info Open store (end) {“log_id”: “0UILN~sW000”, “service”: “storage-engine”, “service”: “store”, “op_name”: “tsdb_open”, “op_event”: “end”, “op_elapsed”: “0.061ms”}
2021-05-23T13:09:51.737625Z info Starting retention policy enforcement service {“log_id”: “0UILN~sW000”, “service”: “retention”, “check_interval”: “30m”}
2021-05-23T13:09:51.737637Z info Starting precreation service {“log_id”: “0UILN~sW000”, “service”: “shard-precreation”, “check_interval”: “10m”, “advance_period”: “30m”}
2021-05-23T13:09:51.737676Z info Starting query controller {“log_id”: “0UILN~sW000”, “service”: “storage-reads”, “concurrency_quota”: 1024, “initial_memory_bytes_quota_per_query”: 9223372036854775807, “memory_bytes_quota_per_query”: 9223372036854775807, “max_memory_bytes”: 0, “queue_size”: 1024}
2021-05-23T13:09:51.738990Z info Configuring InfluxQL statement executor (zeros indicate unlimited). {“log_id”: “0UILN~sW000”, “max_select_point”: 0, “max_select_series”: 0, “max_select_buckets”: 0}
2021-05-23T13:09:52.064557Z error Failed to set up TCP listener {“log_id”: “0UILN~sW000”, “service”: “tcp-listener”, “addr”: “:8086”, “error”: “listen tcp :8086: bind: address already in use”}
Error: listen tcp :8086: bind: address already in use
See ‘influxd -h’ for help

进入influxdb时都报同样的问题,连不上influx数据库

这个命令里本来就启动了influxdb进城,占用了8086。你又在同样的容器里再次执行肯定端口冲突。你不需要exec进去再执行,docker run的时候已经启动了。

如果不用 docker exec -it influxdb bash 进入docker需要用什么命令进入1a6c773353b1容器内呢?进入容器才能进行数据库的建表

下面这个启动容器但是进不去influx的里面,还在容器外面?
[root@192 /]# docker start 1a6c773353b1
1a6c773353b1
[root@192 /]#

进入方式是对的,但是不要再次启动influxdb。走他自己的管理端口模式去管理就行。

[root@192 /]# docker start 1a6c773353b1
1a6c773353b1
[root@192 /]# sudo docker attach 1a6c773353b1

ts=2021-05-24T09:45:08.710159Z lvl=info msg=“Welcome to InfluxDB” log_id=0UJS3kPG000 version=2.0.6 commit=4db98b4c9a build_date=2021-04-29T16:48:12Z
ts=2021-05-24T09:45:08.714838Z lvl=info msg=“Resources opened” log_id=0UJS3kPG000 service=bolt path=/var/lib/influxdb2/influxd.bolt
ts=2021-05-24T09:45:08.842742Z lvl=info msg=“Using data dir” log_id=0UJS3kPG000 service=storage-engine service=store path=/var/lib/influxdb2/engine/data
ts=2021-05-24T09:45:08.842825Z lvl=info msg=“Compaction settings” log_id=0UJS3kPG000 service=storage-engine service=store max_concurrent_compactions=1 throughput_bytes_per_second=50331648 throughput_bytes_per_second_burst=50331648
ts=2021-05-24T09:45:08.842876Z lvl=info msg=“Open store (start)” log_id=0UJS3kPG000 service=storage-engine service=store op_name=tsdb_open op_event=start
ts=2021-05-24T09:45:08.844227Z lvl=info msg=“Open store (end)” log_id=0UJS3kPG000 service=storage-engine service=store op_name=tsdb_open op_event=end op_elapsed=1.377ms
ts=2021-05-24T09:45:08.844324Z lvl=info msg=“Starting retention policy enforcement service” log_id=0UJS3kPG000 service=retention check_interval=30m
ts=2021-05-24T09:45:08.844404Z lvl=info msg=“Starting precreation service” log_id=0UJS3kPG000 service=shard-precreation check_interval=10m advance_period=30m
ts=2021-05-24T09:45:08.847203Z lvl=info msg=“Starting query controller” log_id=0UJS3kPG000 service=storage-reads concurrency_quota=1024 initial_memory_bytes_quota_per_query=9223372036854775807 memory_bytes_quota_per_query=9223372036854775807 max_memory_bytes=0 queue_size=1024
ts=2021-05-24T09:45:08.892910Z lvl=info msg=“Configuring InfluxQL statement executor (zeros indicate unlimited).” log_id=0UJS3kPG000 max_select_point=0 max_select_series=0 max_select_buckets=0

ts=2021-05-24T09:45:09.357392Z lvl=info msg=Listening log_id=0UJS3kPG000 service=tcp-listener transport=http addr=:8086 port=8086
ts=2021-05-24T09:45:09.357527Z lvl=info msg=Starting log_id=0UJS3kPG000 service=telemetry interval=8h

这种情况进入容器,一直没有返回联接结果。也一直没有进入容器,没有能查询的数据如下

influx需要加上参数,指明用户名 密码和链接端口,这样才是客户端模式。执行的时候你进不进容器都可以。

安装低版本的就可以了1.7.10

关闭