`
wx1569484809
  • 浏览: 64039 次
文章分类
社区版块
存档分类
最新评论

Nacos集群无论是安装版或是docker版启动,日志都一直是 2019-07-13 12:54:55,111 INFO Nacos is starting...,启动不成功。...

 
阅读更多

1使用docker-compose工具执行的。windows或者linux上都实验了都是一样问题。docker容器启动,服务却一直在starting,访问就报curl的52空响应,也不是拒绝连接。求解决,图如下

2,顺便问一下,基于集群启动cluster-hostname.yaml那种方式和cluster-ip.yaml方式的区别,这个问题是第一种,我以第二种启动明明在网段内,非说不在。还有请教一哈nacos.config.endpoint的用法,文档说的太摸棱两可啦,直接配域名?然后在域名所在服务器安装nginx反向负载吗?如何操作求大佬解答

8818fb342e73b4af65852a7e74490ed435e.jpg

db服务如下

version: "3"

networks:
  ri-net:
    driver: bridge
    
services:
  mysql-master:
    container_name: mysql-master
    image: nacos/nacos-mysql-master:latest
    env_file:
      - ../env/mysql-common.env
      - ../env/mysql-master.env
    networks:
      - ri-net
    volumes:
      - ./mysql-master:/var/lib/mysql
    ports:
      - "3308:3306"
  mysql-slave:
    container_name: mysql-slave
    image: nacos/nacos-mysql-slave:latest
    env_file:
      - ../env/mysql-common.env
      - ../env/mysql-slave.env
    networks:
      - ri-net
    volumes:
      - ./mysql-slave:/var/lib/mysql
    ports:
      - "3309:3306"
    depends_on:
      - mysql-master
  prometheus:
    container_name: prometheus
    image: prom/prometheus:latest
    networks:
      - ri-net
    volumes:
      - ./prometheus/prometheus-cluster.yaml:/etc/prometheus/prometheus.yml
    ports:
      - "9090:9090"
    restart: on-failure
  grafana:
    container_name: grafana
    image: grafana/grafana:latest
    networks:
      - ri-net
    ports:
        - 3000:3000
    restart: on-failure

nacos服务如下

version: "3.6"
networks:
  nacos_network:
    external: true
services:
  nacos1:
    hostname: nacos1
    container_name: nacos1
    image: nacos/nacos-server:latest
    volumes:
      - ./cluster-logs/nacos1:/home/nacos/logs
      - ./init.d/custom.properties:/home/nacos/init.d/custom.properties
    networks:
      - nacos_network
    ports:
      - "8848:8848"
      - "9555:9555"
    env_file:
      - ../env/nacos-hostname.env
  nacos2:
    hostname: nacos2
    image: nacos/nacos-server:latest
    container_name: nacos2
    volumes:
      - ./cluster-logs/nacos2:/home/nacos/logs
      - ./init.d/custom.properties:/home/nacos/init.d/custom.properties
    networks:
      - nacos_network
    ports:
      - "8858:8848"
    env_file:
      - ../env/nacos-hostname.env
  nacos3:
    hostname: nacos3
    image: nacos/nacos-server:latest
    container_name: nacos3
    volumes:
      - ./cluster-logs/nacos3:/home/nacos/logs
      - ./init.d/custom.properties:/home/nacos/init.d/custom.properties
    networks:
      - nacos_network
    ports:
      - "8868:8848"
    env_file:
      - ../env/nacos-hostname.env

env文件

#nacos dev env
PREFER_HOST_MODE=hostname
NACOS_SERVERS=nacos1:8848 nacos2:8858 nacos3:8868
MYSQL_MASTER_SERVICE_HOST=mysql-master
MYSQL_MASTER_SERVICE_DB_NAME=nacos_devtest
MYSQL_MASTER_SERVICE_PORT=3308
MYSQL_SLAVE_SERVICE_HOST=mysql-slave
MYSQL_SLAVE_SERVICE_PORT=3309
MYSQL_MASTER_SERVICE_USER=nacos
MYSQL_MASTER_SERVICE_PASSWORD=nacos 

 

转载于:https://my.oschina.net/u/4163142/blog/3073861

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics