hoardd
hoardd copied to clipboard
mysql script produces an error
This could be a problem of having too new mysql module but nevertheless.
For some reason hoard refuses to connect to the mysql server, but a simple test from the same box using the standard mysql client connects just fine.
├─┬ [email protected] │ └─┬ [email protected] │ ├── [email protected] │ └─┬ [email protected] │ ├── [email protected] │ └── [email protected] ├── [email protected] ├─┬ [email protected] │ └─┬ [email protected] │ └── [email protected] ├── [email protected] └── [email protected]
ERROR: Error on STATUS query: Error: connect ECONNREFUSED
TypeError: Cannot read property 'length' of undefined
at /opt/hoardd/scripts/mysql.coffee:125:38
at Query.query.on.on.fields.(anonymous function) (/opt/hoardd/node_modules/mysql/lib/client.js:95:9)
at Query.EventEmitter.emit (events.js:95:17)
at Client.
cat scripts/mysql.json
{ "host": "mybox.ce1wqenoyjn7.ap-northeast-1.rds.amazonaws.com", "user": "ouruser", "password": "ourpassword", "multiserver": 0 }
A little bit additional info from strace:
reads the config just fine: [pid 4409] open("/opt/hoardd/scripts/mysql.json", O_RDONLY <unfinished ...>
but still tries to connect to localhost: [pid 4409] connect(11, {sa_family=AF_INET, sin_port=htons(3306), sin_addr=inet_addr("127.0.0.1")}, 16) = -1 EINPROGRESS (Operation now in progress)
bad bad debug values (needs to be conf.host).
conn = Mysql.createClient({
"host": conf.localhost,
"user": conf.user,
"password": conf.password,
"port": port
})
Now to figure out how to do the multihost...