haraka / Haraka

A fast, highly extensible, and event driven SMTP server
https://haraka.github.io
MIT License
5.09k stars 662 forks source link

Watch/HTTP functionality not working as expected #1540

Closed NightDevel closed 8 years ago

NightDevel commented 8 years ago

Hello, I'm running Haraka 2.8.7 and trying to setup the Watch function. I've added watch to config/plugins and added a listen directive to http.ini in the config directory.

However, whenever I attempt to connect to the port, I don't get a response from the server.

NightDevel commented 8 years ago
# cat http.ini
listen=[::]:80
docroot=/usr/lib/node_modules/Haraka/plugins/watch/html

I have had this setup in http.ini, however, it does not work.

msimerson commented 8 years ago

This is likely fixed by this PR which is pending the next Haraka release.

NightDevel commented 8 years ago

Hello, I've manually applied this change to server.js and still have not been able to have any luck.

Here's my log: http://hastebin.com/kexaxapaso.vhdl

xpepermint commented 8 years ago

I see this error:

TypeError: Cannot read property 'url' of undefined
    at /projects/myharakasmtp/node_modules/Haraka/plugins/watch/index.js:44:27
    at Layer.handle [as handle_request] (/Users/me/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/Users/me/node_modules/express/lib/router/index.js:312:13)

My http.ini is set like this:

listen=[::]:3333
docroot=/projects/myharakasmtp/node_modules/Haraka/plugins/watch/html

It tries to to access my home directory instead (should search for the project directory).

msimerson commented 8 years ago

It looks like there's no 'wss' property in the watch.ini file. Try this:

echo '[wss]' >> /your/haraka/config/watch.ini