[Home]

Summary:ASTERISK-02549: receiving gethostbyname() error on call to festival in dialplan
Reporter:Steve Woolley (swoolley)Labels:
Date Opened:2004-10-06 20:04:35Date Closed:2004-10-16 12:14:59
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Applications/app_festival
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) extensions.conf
( 1) festival.conf
( 2) hosts
( 3) nsswitch.conf
( 4) resolv.conf
Description:Uncommented default values in festival.conf. After starting asterisk, first call to festival in dial plan gives WARNING[-180528208]: app_festival.c:335 festival_exec: festival_client: gethostbyname failed. If I comment out the "host" entry and the "port" entry, festival works just fine.


****** ADDITIONAL INFORMATION ******

Asterisk version 1.0.1
OS: Red Hat Linux ES kernel 2.4.21-20.ELsmp
Hardware: Dell PowerEdge 700 Intel 2.8GHz Pentium 512MB Ram
Digium Hardware: TE410P
Festival version: 1.95beta - but have talked to other individual who experienced same problem on festival v1.4.3
Comments:By: Mark Spencer (markster) 2004-10-08 14:31:31

Obviously this is a configuration issue, please try to get help on #asterisk first.

By: Steve Woolley (swoolley) 2004-10-08 16:05:30

So what you are saying is that if I simply use (uncomment) the default values for the "host=localhost" and "port=1314" as specified in the sample festival.conf file AND it gives me the aforementioned error
as opposed to
not using (commenting) out the default values for the "host=localhost" and "port=1314" AND it works
that this is somehow a configuration error on my part.

Honestly I am not trying to be a jackass here and I know you have already given me a karma of -2 (so I am already at the bottom of your shit list).

By: Mark Spencer (markster) 2004-10-08 19:05:07

Why don't you go ahead and post your exact configuration file for festival.conf, as well as extensions.conf as an attachment, then I can try to duplicate your problem and say for sure.

If it's really a bug i'll give you $5 if you ever meet me.

By: Steve Woolley (swoolley) 2004-10-08 19:16:07

Thanks for the offer -- we did informally meet at Astricon -- however I am very forgettable.
festival.conf and extensions.conf attached
All that I have to do to create problem is uncomment "host" and "port" lines (and restart asterisk)

By: Mark Spencer (markster) 2004-10-08 22:11:30

And just for kicks, your /etc/hosts file?

By: Steve Woolley (swoolley) 2004-10-09 07:04:00

/etc/hosts attached

By: Mark Spencer (markster) 2004-10-09 10:05:20

Okay unsurprisingly I cannot duplicate your problem, even with your festival.conf (and the initial comment removed) and your /etc/hosts file and with an invocation of Festival of Festival("foo bar") on a dialplan (since your extensions.conf doesn't show any invocation -- i'm assuming it's in AGI).  This leaves only a few pretty essoteric system configs that could be getting in the way:

/etc/host.conf
/etc/nsswitch.conf

Please attach them.

By: jessiebryan (jessiebryan) 2004-10-09 16:44:14

FWIW, I have the same problem, and using same configs I can switch from CVS-HEAD to CVS-STABLE and the problem only exists in CVS-STABLE -- When I load the HEAD rls it's fine. Im loading Festival via AGI and Festival()

By: Mark Spencer (markster) 2004-10-09 23:03:05

swoolley: have you tried cvs head, if not what versions have you tried?

By: Brian West (bkw918) 2004-10-10 13:01:26

I can't duplicate this on head I suspect its a config issue.

bkw

By: Steve Woolley (swoolley) 2004-10-10 16:11:59

I use "cvs co -r v1-0" to get the 1.0.x branch. I have not attempted any other versions. I have heard this same issue reported by a number of users but I haven't been able to get enough response to determine if this is common to a version of asterisk, or a distro, or something else.

Although you guys are the experts, I just have a hard time believing it is a configuration problem on my part based on the information already stated in the notes of this bug report.

attaching resolv.conf per markster

By: Mark Spencer (markster) 2004-10-10 16:24:18

resolv.conf wasn't what i asked for, it was nsswitch.conf and host.conf.  

Perhaps it is easiest if you find me on irc and let me login and look.

By: Steve Woolley (swoolley) 2004-10-11 09:44:54

Have attached nsswitch.conf. Sorry for the resolv.conf -- my bad.
In the meantime, have installed CVS HEAD and CVS STABLE on seperate machine and am only experiencing this problem on CVS STABLE.
Markster, anytime you are available to ssh into this server ivr2.adstelecom.com you are welcome. I have not used the IRC yet -- looked for #asterisk but could only find #asterisk-dev so I have not seen you on the IRC. Call me (700)682-6226 x6543 or email me your email address and I will give you access. If you are at Digium, email me and I will call you on my dime.

By: Olle Johansson (oej) 2004-10-11 12:37:40

From app_festival:

 serverhost = ast_gethostbyname(host, &ahp);
               if (serverhost == (struct hostent *)0) {


This is the first time I've seen a check for a zero result. The app_gethostbyname returns a NULL. Don't know if this affects the host name resolution or not... Guessing.

Swooley: If you add ip address instead of hostname after host=, any change?

By: Steve Woolley (swoolley) 2004-10-11 16:44:05

tried both 127.0.0.1 and 63.243.113.202 (public IP) and both gave same error

By: Mark Spencer (markster) 2004-10-15 20:23:17

Looks like it really was a bug.  Fixed in CVS head should go to stable soon.  If you find me in real life, I owe you $5.

By: Russell Bryant (russell) 2004-10-16 12:14:59

markster, you so silly.