Skip to content
This repository has been archived by the owner on Oct 7, 2021. It is now read-only.

agent with local host panic #113

Closed
nirhenn opened this issue Nov 8, 2016 · 4 comments
Closed

agent with local host panic #113

nirhenn opened this issue Nov 8, 2016 · 4 comments

Comments

@nirhenn
Copy link

nirhenn commented Nov 8, 2016

Hi,

Tried to run agnet with cfg file pointing to localhost result with panic.
pay attention to the http host req in the following log.

ubuntu@todd-server:~/todd/bin$ sudo ./todd-agent --config=/etc/todd/agent.cfg
DEBU[0000] Writing keyvalue pair to agent cache - uuid:00be57d916f8925f2d31d8ece7c8818ae755eaa21588d2657f326215084d3b80
INFO[0000] ToDD Agent Activated: 00be57d916f8925f2d31d8ece7c8818ae755eaa21588d2657f326215084d3b80
DEBU[0000] Retrieving value of key - group
DEBU[0000] Retrieving value of key - uuid
INFO[0000] AGENTADV -- 2016-11-08 10:26:11.737203807 +0000 UTC
INFO[0000] [*] Waiting for messages. To exit press CTRL+C
DEBU[0000] Agent re-registering onto group queue - null
DEBU[0000] Agent task received: {"type":"DownloadAsset","assets":["http://\u003cnil\u003e:8090/factcollectors/get_addresses","http://\u003cnil\u003e:8090/factcollectors/get_hostname","http://\u003cnil\u003e:8090/testlets/http","http://\u003cnil\u003e:8090/testlets/iperf"]}
INFO[0000] Downloading http://:8090/factcollectors/get_addresses to /opt/todd/agent/assets/factcollectors/get_addresses
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x0 pc=0x5d2510]

@Mierdin
Copy link
Member

Mierdin commented Nov 8, 2016

@nirhenn This looks like the server configuration is not correct. Can you please post your server configuration and let me know which network interface/IP address on the server you wish to use to serve assets?

@Mierdin
Copy link
Member

Mierdin commented Nov 10, 2016

@nirhenn Just checking in, anything I can do to help? Please see previous message, I think I know the cause of this.

@nirhenn
Copy link
Author

nirhenn commented Nov 10, 2016

Sorry for the delay, I override the configuration file so not history, but if I am not wrong, I used the original agent.cfg file with localhost on most sections. When I sued localhost from the log you can see http://\u003cnil\u and then PANIC. When i replaced it to an IP address then all worked well.

@Mierdin
Copy link
Member

Mierdin commented Nov 11, 2016

Okay - I recommend you read the page on the configuration file. In short, you need to make sure DefaultInterface is set to the network interface that todd-server will serve testlets on. Alternatively, you can set IPAddrOverride, which overrides DefaultInterface, so you can statically set the IP address that's communicated to the agents.

Mental note for myself, however, I would like to elaborate on this a bit on that page, because it's not as obvious if you're not looking for it, and this is an important aspect of the configuration. It should also not panic, but rather provide a useful error message

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants