[SOLVED] Quick Start macOS - problem

I’m following the MacOS Quick Start guide on mac running Mojave. I have a fresh install of Node via Homebrew, and installed the other Snips services. Downloaded and copied /assistant to the specified directory. But when I created and ran the node app, it simply sits there–no messages, nothing.

When I do “snips-watch -v”, I see:
Could not start MQTT client on localhost:1883
-> caused by: failed to lookup address information: nodename nor servname provided, or not known

When I do “tail -f /usr/local/var/snips/snips-asr.log”, I see:
WARN:snips_common_cli::cli: configuration file “/usr/local/etc/snips.toml” not found
ERROR:snips_asr : Could not start MQTT client on localhost:1883
-> caused by: failed to lookup address information: nodename nor servname provided, or not known

I saw the thread “Install misisng files” and created a blank /usr/local/etc/snips.toml, as suggested, but no dice.

Any suggestions? Thanks!

yeah I’m sure that when you do an install on a mac the default toml file is never created

when you say no dice after creating your own file what does the log then output for an error?? any permission errors or something else??

just try to run form the terminal snips-asr -vvv and see what it does

After I create /usr/local/etc/snips.toml and re-run index.js, I get nothing at the terminal–it just hangs. But I “snips-asr -vvv” does return a bit more information. No permission errors, though:

[10:18:18.810077] DEBUG:snips_common_cli::cli: conf lookup: snips-asr.assistant -> Ok(None)
[10:18:18.829122] DEBUG:snips_common_cli::cli: conf lookup: snips-common.assistant -> Ok(None)
[10:18:18.829354] DEBUG:snips_common_cli::cli: conf lookup: snips-asr.model -> Ok(None)
[10:18:18.829386] DEBUG:snips_common_cli::cli: conf lookup: snips-common.model -> Ok(None)
[10:18:18.829417] DEBUG:snips_common_cli::cli: conf lookup: snips-asr.beam_size -> Ok(None)
[10:18:18.829438] DEBUG:snips_common_cli::cli: conf lookup: snips-common.beam_size -> Ok(None)
[10:18:18.829464] DEBUG:snips_common_cli::cli: conf lookup: snips-asr.max_active -> Ok(None)
[10:18:18.829485] DEBUG:snips_common_cli::cli: conf lookup: snips-common.max_active -> Ok(None)
[10:18:18.829509] DEBUG:snips_common_cli::cli: conf lookup: snips-asr.min_active -> Ok(None)
[10:18:18.829528] DEBUG:snips_common_cli::cli: conf lookup: snips-common.min_active -> Ok(None)
[10:18:18.829547] DEBUG:snips_common_cli::cli: conf lookup: snips-asr.lattice_beam_size -> Ok(None)
[10:18:18.829568] DEBUG:snips_common_cli::cli: conf lookup: snips-common.lattice_beam_size -> Ok(None)
[10:18:18.829589] DEBUG:snips_common_cli::cli: conf lookup: snips-asr.acoustic_scale -> Ok(None)
[10:18:18.829602] DEBUG:snips_common_cli::cli: conf lookup: snips-common.acoustic_scale -> Ok(None)
[10:18:18.829616] DEBUG:snips_common_cli::cli: conf lookup: snips-asr.use_final_probs -> Ok(None)
[10:18:18.829628] DEBUG:snips_common_cli::cli: conf lookup: snips-common.use_final_probs -> Ok(None)
[10:18:18.829641] DEBUG:snips_common_cli::cli: conf lookup: snips-asr.endpointing -> Ok(None)
[10:18:18.829653] DEBUG:snips_common_cli::cli: conf lookup: snips-common.endpointing -> Ok(None)
[10:18:18.829672] DEBUG:snips_common_cli::cli: conf lookup: snips-asr.partial -> Ok(None)
[10:18:18.829756] DEBUG:snips_common_cli::cli: conf lookup: snips-common.partial -> Ok(None)
[10:18:18.829787] DEBUG:snips_common_cli::cli: conf lookup: snips-asr.partial_period_ms -> Ok(None)
[10:18:18.829805] DEBUG:snips_common_cli::cli: conf lookup: snips-common.partial_period_ms -> Ok(None)
[10:18:18.829821] DEBUG:snips_common_cli::cli: conf lookup: snips-asr.no_snips_audio_server_replay -> Ok(None)
[10:18:18.829836] DEBUG:snips_common_cli::cli: conf lookup: snips-common.no_snips_audio_server_replay -> Ok(None)
[10:18:18.829849] DEBUG:snips_common_cli::cli: conf lookup: snips-asr.bus -> Ok(None)
[10:18:18.829861] DEBUG:snips_common_cli::cli: conf lookup: snips-common.bus -> Ok(None)
[10:18:18.829880] DEBUG:snips_common_cli::cli: conf lookup: snips-asr.mqtt -> Ok(None)
[10:18:18.829893] DEBUG:snips_common_cli::cli: conf lookup: snips-common.mqtt -> Ok(None)
[10:18:18.830022] DEBUG:snips_common_cli::cli: conf lookup: snips-asr.mqtt_username -> Ok(None)
[10:18:18.830045] DEBUG:snips_common_cli::cli: conf lookup: snips-common.mqtt_username -> Ok(None)
[10:18:18.830060] DEBUG:snips_common_cli::cli: conf lookup: snips-asr.mqtt_password -> Ok(None)
[10:18:18.830073] DEBUG:snips_common_cli::cli: conf lookup: snips-common.mqtt_password -> Ok(None)
[10:18:18.830087] DEBUG:snips_common_cli::cli: conf lookup: snips-asr.mqtt_tls_hostname -> Ok(None)
[10:18:18.830100] DEBUG:snips_common_cli::cli: conf lookup: snips-common.mqtt_tls_hostname -> Ok(None)
[10:18:18.830131] DEBUG:rumqtt::client       : snips-asr|52569-ryu-macbook.local-1: Client start
[10:18:18.830145] INFO :rumqtt::connection   : snips-asr|52569-ryu-macbook.local-1: Connection start
[10:18:18.830166] DEBUG:rumqtt::connection   : snips-asr|52569-ryu-macbook.local-1 new connection
[10:18:18.833870] ERROR:snips_asr            : Could not start MQTT client on localhost:1883
 -> caused by: failed to lookup address information: nodename nor servname provided, or not known

I thought perhaps something else is using localhost:1883, but it looks like mosquitto is already using it:
$ lsof -nP -i4TCP:1883
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
mosquitto 416 ryu 6u IPv4 0xcd79ca27018ab715 0t0 TCP *:1883 (LISTEN)

I figured it out. I noticed that the MQTT client could connect to a public test server:
mosquitto_sub -h test.mosquitto.org -t “#” -v
(bunch of output)

Then I tried it with 127.0.0.1:
mosquitto_sub -h 127.0.0.1 -t “#” -v
(bunch of output: …hermes/audioServer/default/audioFrame RIFF …)

Then I tried it with localhost:
mosquitto_sub -h localhost -t "#" -v

At which point mosquitto_sub simply hangs. So “localhost” was not getting resolved.

I found that “localhost” was missing from my my /etc/hosts file. I added
localhost 127.0.0.1
and “mosquitto_sub -h localhost” now generates output.

Then I retried “node index.js” and it seems to work:
$ node index.js
[Snips Log] Connected to MQTT broker mqtt://localhost:1883
[Snips Log] Hotword detected
[Snips Log] Stop listening
[Snips Log] Start listening