alibaba / nacos

an easy-to-use dynamic service discovery, configuration and service management platform for building cloud native applications.
https://nacos.io
Apache License 2.0
30.14k stars 12.82k forks source link

nacos账号密码 #2394

Closed liyin37 closed 3 years ago

liyin37 commented 4 years ago

使用nacos1.1.4版本搭建一个单节点,运行后,输入用户名nacos,密码nacos不对,请问默认的用户名和密码是多少

chuntaojun commented 4 years ago

账户密码确实是nacos、nacos,可以看下config-fatal日志以及nacos。log日志信息,看看是不是因为内部错误引发的

liyin37 commented 4 years ago

image 看日志没有什么异常,但访问就是无法登录,提示用户名或者密码错误,我使用命令 ./startup.sh -m standalone 启动的

chuntaojun commented 4 years ago

config-fatal.log,config-server.log 这两个日志发出来看看,可能是数据库损坏了,

liyin37 commented 4 years ago

[root@docker logs]# cat config-fatal.log 2020-03-01 15:24:49,758 WARN useAddressServer:true 2020-03-01 15:24:50,046 WARN isQuickStart:false

[root@docker logs]# cat config-server.log 2020-03-01 15:24:47,902 INFO notifyConnectTimeout:200

2020-03-01 15:24:47,903 INFO notifySocketTimeout:8000

2020-03-01 15:24:47,903 INFO isHealthCheck:true

2020-03-01 15:24:47,903 INFO maxHealthCheckFailCount:12

2020-03-01 15:24:47,903 INFO maxContent:10485760

2020-03-01 15:24:48,681 INFO Schema 'NACOS' already exists.

2020-03-01 15:24:48,782 INFO Table/View 'CONFIG_INFO' already exists in Schema 'NACOS'.

2020-03-01 15:24:48,906 INFO Table/View 'HIS_CONFIG_INFO' already exists in Schema 'NACOS'.

2020-03-01 15:24:48,935 INFO Table/View 'CONFIG_INFO_BETA' already exists in Schema 'NACOS'.

2020-03-01 15:24:48,948 INFO Table/View 'CONFIG_INFO_TAG' already exists in Schema 'NACOS'.

2020-03-01 15:24:48,973 INFO Table/View 'CONFIG_INFO_AGGR' already exists in Schema 'NACOS'.

2020-03-01 15:24:48,988 INFO Table/View 'APP_LIST' already exists in Schema 'NACOS'.

2020-03-01 15:24:48,995 INFO Table/View 'APP_CONFIGDATA_RELATION_SUBS' already exists in Schema 'NACOS'.

2020-03-01 15:24:49,009 INFO Table/View 'APP_CONFIGDATA_RELATION_PUBS' already exists in Schema 'NACOS'.

2020-03-01 15:24:49,020 INFO Table/View 'CONFIG_TAGS_RELATION' already exists in Schema 'NACOS'.

2020-03-01 15:24:49,037 INFO Table/View 'GROUP_CAPACITY' already exists in Schema 'NACOS'.

2020-03-01 15:24:49,061 INFO Table/View 'TENANT_CAPACITY' already exists in Schema 'NACOS'.

2020-03-01 15:24:49,071 INFO Table/View 'TENANT_INFO' already exists in Schema 'NACOS'.

2020-03-01 15:24:49,099 INFO Table/View 'USERS' already exists in Schema 'NACOS'.

2020-03-01 15:24:49,115 INFO Table/View 'ROLES' already exists in Schema 'NACOS'.

2020-03-01 15:24:49,266 INFO The statement was aborted because it would have caused a duplicate key value in a unique or primary key constraint or unique index identified by 'SQL200228230218950' defined on 'USERS'.

2020-03-01 15:24:49,757 INFO ServerListService address-server port:8848

2020-03-01 15:24:49,757 INFO ADDRESS_SERVER_URL:http://jmenv.tbsite.net:8080/nacos/serverlist

2020-03-01 15:24:49,758 WARN [serverlist] updated to [192.168.117.137]

2020-03-01 15:24:50,018 WARN DumpService start

2020-03-01 15:24:50,046 INFO start clear all config-info.

2020-03-01 15:24:50,051 WARN clear all config-info failed.

2020-03-01 15:24:50,051 WARN clear all config-info-tenant failed.

2020-03-01 15:24:50,236 INFO start clear all config-info-beta.

2020-03-01 15:24:50,236 WARN clear all config-info-beta failed.

2020-03-01 15:24:50,236 WARN clear all config-info-beta-tenant failed.

2020-03-01 15:24:50,259 INFO start clear all config-info-tag.

2020-03-01 15:24:50,259 WARN clear all config-info-tag failed.

2020-03-01 15:24:50,259 WARN clear all config-info-tag-tenant failed.

chuntaojun commented 4 years ago

看看能不能脸上derby数据库,该文件在nacos目录下的data/derby-data中,连接derby数据库采用embed模式连接,可以使用Datagrip软件,如果连接不上,可能是是数据库损坏了,

liyin37 commented 4 years ago

不知道如何去连接这个数据库,我重新安装也不行呢

liyin37 commented 4 years ago

我测试了下,在Ubuntu系统上可以正常,但我CentOS Linux release 7.7.1908 (Core) 上我无论如何安装都无法登录,提示用户名和密码不对

binsook commented 4 years ago

真的有点迷茫 mvn打包 配置好数据库 ./startup.sh -m standalone 启动 可以正常进入后台,切不需要密码 用idea导入工程在Config模块下面加入同样的配置,先是不能启动,需要加一个配置 useAddressServer=true 然后可以正常启动,但是进入后台就需要密码了,然后nacos/nacos死活进不去,看了fatal,sesrver日志没有任何报错。AuthFilter的filter断点都不去。

chuntaojun commented 4 years ago

我测试了下,在Ubuntu系统上可以正常,但我CentOS Linux release 7.7.1908 (Core) 上我无论如何安装都无法登录,提示用户名和密码不对

确定正常启动了吗?在Centos下

chuntaojun commented 4 years ago

真的有点迷茫 mvn打包 配置好数据库 ./startup.sh -m standalone 启动 可以正常进入后台,切不需要密码 用idea导入工程在Config模块下面加入同样的配置,先是不能启动,需要加一个配置 useAddressServer=true 然后可以正常启动,但是进入后台就需要密码了,然后nacos/nacos死活进不去,看了fatal,sesrver日志没有任何报错。AuthFilter的filter断点都不去。

我这里是可以正常启动的,方便在出现你说的问题时候,把相关日志文件传一下吗?

binsook commented 4 years ago
font{
    line-height: 1.6;
}
ul,ol{
    padding-left: 20px;
    list-style-position: inside;
}

您好,我查看了下载的release里面jar包的启动类。应该是我之前启动的是config模块下面的Config类,这样会出现我上次遇到的问题。但是应该启动console模块下面的Config类,这样可以正常启动和功能访问,代码调试。谢谢您的回复

                            binsook

                                binsook@gmail.com

在2020年03月7日 13:41,liaochuntao<notifications@github.com> 写道: 

真的有点迷茫 mvn打包 配置好数据库 ./startup.sh -m standalone 启动 可以正常进入后台,切不需要密码 用idea导入工程在Config模块下面加入同样的配置,先是不能启动,需要加一个配置 useAddressServer=true 然后可以正常启动,但是进入后台就需要密码了,然后nacos/nacos死活进不去,看了fatal,sesrver日志没有任何报错。AuthFilter的filter断点都不去。

我这里是可以正常启动的,方便在出现你说的问题时候,把相关日志文件传一下吗?

—You are receiving this because you commented.Reply to this email directly, view it on GitHub, or unsubscribe.

liwux commented 4 years ago

我也遇到类似问题,一开始用的1.2.1,后来改为1.1.4,报密码错误,通过清楚浏览器缓存就好了。 有哪个兄弟知道为什么可以解释一下 。

gongwenlong commented 4 years ago

我也遇到类似问题,一开始用的1.2.1,后来改为1.1.4,报密码错误,通过清楚浏览器缓存就好了。 有哪个兄弟知道为什么可以解释一下 。

打开一个无痕窗口就好了,同问

HuaHuaHuaHe commented 3 years ago

我遇到和你一样的情况,我的问题是:在创建数据的时候选择的编码格式为utf8,导致在初始化(就是运行nacos-mysql.sql文件去初始化表)时候数据库会报错,我开始以为没事,后来发现登录时候也是显示用户名密码错误。建议先去看看user表中有没有数据,如果没有,大概率就是这个问题。

Anza7i commented 3 years ago

浏览器f12网络面板,勾选禁用缓存,然后刷新,唉,又搞了半天

miozus commented 3 years ago

2021年9月27日。我重启服务器发现nacos挂了,反复挂空表、或者注入有数据启动测试得知:

yinyanghuafa commented 1 year ago

nacos 2.1.0 登录控制台之后可以右上角修改密码

Iridescent-zhang commented 4 months ago

浏览器f12网络面板,勾选禁用缓存,然后刷新,唉,又搞了半天

可以的,牛