nginx reload fails with [emerg] host not found in upstream
groknaut
nginx-forum at nginx.us
Fri Dec 7 05:33:34 UTC 2012
12/07 05:31[root at proxy2-prod-ue1 ~]# cat gethostbyname.c
#include <stdio.h>
#include <netdb.h>
int main(int argc, char *argv[])
{
if (argc != 2) {
printf("usage: %s [hostname]\n", argv[0]);
return 1;
}
struct hostent *lh = gethostbyname(argv[1]);
if (lh) {
puts(lh->h_name);
return 0;
} else {
herror("gethostbyname");
return 1;
}
}
12/07 05:31[root at proxy2-prod-ue1 ~]# gcc -o gethostbyname gethostbyname.c
12/07 05:31[root at proxy2-prod-ue1 ~]# ./gethostbyname webapp02c
webapp02c.prod.romeovoid.com
12/07 05:31[root at proxy2-prod-ue1 ~]# ./gethostbyname
webapp02c.prod.romeovoid.com
webapp02c.prod.romeovoid.com
Posted at Nginx Forum: http://forum.nginx.org/read.php?2,233661,233663#msg-233663
More information about the nginx
mailing list