managerAMI not connecting:Connection cloased by foregin host

Hi,
I am going through the asterisk definite guide and I followed the manager guide
http://www.asteriskdocs.org/en/3rd_Edition/asterisk-book-html/asterisk-book.html#AMI_id269468
This is my manager.conf file.
I am using Asterisk-1.8

[code]
; Asterisk Call Management support
;

; By default asterisk will listen on localhost only.
[general]
enabled = yes
webenabled = yes
port = 5038
bindaddr = 127.0.0.1
displayconnects=yes

[hello]
secret=world

; No access is allowed by default.
; To set a password, create a file in /etc/asterisk/manager.d
; use creative permission games to allow other serivces to create their own
; files
#include “manager.d/*.conf” [/code]
;

After using sudo telnet 127.0.0.1 5038
and providing action,username,secret I am getting the following output

Trying 127.0.0.1…
Connected to localhost.
Escape character is ‘^]’.
Asterisk Call Manager/1.1
Action:Login
Username:hello
Secret:world
Connection closed by foreign host.

I searched in the forum but nothing worked.

Did the forums not tell you that logging is essential to any debugging?

Sorry,I cant get you.Logging?

This is my log file

[Jun 7 22:55:44] VERBOSE[5328] config.c: == Parsing '/etc/asterisk/logger.conf': [Jun 7 22:55:44] DEBUG[5328] config.c: Parsing /etc/asterisk/logger.conf [Jun 7 22:55:44] VERBOSE[5328] config.c: == Found [Jun 7 22:55:44] VERBOSE[5328] logger.c: Asterisk Queue Logger restarted [Jun 7 22:56:40] VERBOSE[5533] manager.c: == Client from 127.0.0.1, failed to authenticate in 30 seconds [Jun 7 22:56:40] VERBOSE[5533] manager.c: == Connect attempt from '127.0.0.1' unable to authenticate

Sorry for the inconvenience.

Did you include the bank line at the end of the request?

After adding blank line
It worked
thanks a lot :smile: