2017-08-10 13 views
0

我一直試圖通過consul中的配置添加多個服務。配置文件中的多個服務定義不能運行Consul

但Consul UI在啓動代理本身時拋出錯誤。

的錯誤是: -

$consul.exe agent --dev 
Starting Consul agent... 
panic: runtime error: invalid memory address or nil pointer dereference 
github.com/hashicorp/consul/agent.(*Agent).loadServices(0xc0421268c0, 
0xc04223aa80, 0xc042254a00, 0x0) 
/gopath/src/github.com/hashicorp/consul/agent/agent.go:2097 
github.com/hashicorp/consul/agent.(*Agent).Start() 
/gopath/src/github.com/hashicorp/consul/agent/agent.go:326 
github.com/hashicorp/consul/command.(*AgentCommand).run() 
/gopath/src/github.com/hashicorp/consul/command/agent.go:704 
github.com/hashicorp/consul/command.(*AgentCommand).Run() 
/gopath/src/github.com/hashicorp/consul/command/agent.go:653 

配置文件是: -

{ 
"Services": [{ 
    "id": "somename", 
    "name": "nameofthissevice", 
    "service": "myservice", 
    "address": "127.0.0.1", 
    "port": 62133, 
    "enableTagOverride": false, 
    "tags" : ["service1"] 
}, 
{ 
    "id": "somename1", 
    "name": "nameofthissevice", 
    "service": "myservice2", 
    "address": "127.0.0.1", 
    "port": 64921, 
    "enableTagOverride": false, 
    "tags" : ["service2"] 
}] 

}

我使用Win 7的平臺。

任何人都可以提出一些想法。

THX

回答

0

配置文件沒有加載,所以問題並不在該文件中,以加載您應該添加一個標誌加載配置的配置文件,否則領事將使用默認配置啓動。

看起來像一個錯誤的二進制或不兼容的版本。

你的windows7是一個32位的拱或64?
你下載了哪個執行版的領事?

相關問題