Search Results

Search found 72 results on 3 pages for 'getaddrinfo a'.

Page 2/3 | < Previous Page | 1 2 3  | Next Page >

  • External DNS and IIS Webserver requirement for Outlook Anywhere 2007 ?

    - by Albert Widjaja
    Hi, I just would like some clarification about which External hostname / DNS entries that I need to publish in my external facing DNS server to enable Outlook Anywhere on my Exchange Server 2007 for external user: ExCAS01.domain.com - Exchange CAS A Record Autodiscover.domain.com - Autodiscover CNAME to the CAS Server above _autodiscover._tcp.domain.com - SRV type record and do I have to expect anything by typing this address in bowser "https://autodiscover.domain.com/AutoDiscover/AutoDiscover.xml" ? because i get request time out at the moment. here are the error log from https://testexchangeconnectivity.com: Host Excas01.domain.com couldn't be resolved in DNS Exception details: Message: The requested name is valid, but no data of the requested type was found Type: System.Net.Sockets.SocketException Stack trace: at System.Net.Dns.GetAddrInfo(String name) at System.Net.Dns.InternalGetHostByName(String hostName, Boolean includeIPv6) at System.Net.Dns.GetHostAddresses(String hostNameOrAddress) at Microsoft.Exchange.Tools.ExRca.Tests.ResolveHostTest.PerformTestReally() Host autodiscover.domain.com couldn't be resolved in DNS Exception details: Message: The requested name is valid, but no data of the requested type was found Type: System.Net.Sockets.SocketException Stack trace: at System.Net.Dns.GetAddrInfo(String name) at System.Net.Dns.InternalGetHostByName(String hostName, Boolean includeIPv6) at System.Net.Dns.GetHostAddresses(String hostNameOrAddress) at Microsoft.Exchange.Tools.ExRca.Tests.ResolveHostTest.PerformTestReally() Attempting to locate SRV record _autodiscover._tcp.domain.com in DNS. The Autodiscover SRV record wasn't found in DNS.

    Read the article

  • publickey authentication only works with existing ssh session

    - by aaron
    publickey authentication only works for me if I've already got one ssh session open. I am trying to log into a host running Ubuntu 10.10 desktop with publickey authentication, and it fails when I first log in: [me@my-laptop:~]$ ssh -vv host ... debug1: Next authentication method: publickey debug1: Offering public key: /Users/me/.ssh/id_rsa ... debug2: we did not send a packet, disable method debug1: Next authentication method: password me@hosts's password: And the /var/log/auth.log output: Jan 16 09:57:11 host sshd[1957]: reverse mapping checking getaddrinfo for cpe-70-114-155-20.austin.res.rr.com [70.114.155.20] failed - POSSIBLE BREAK-IN ATTEMPT! Jan 16 09:57:13 host sshd[1957]: pam_sm_authenticate: Called Jan 16 09:57:13 host sshd[1957]: pam_sm_authenticate: username = [astacy] Jan 16 09:57:13 host sshd[1959]: Passphrase file wrapped Jan 16 09:57:15 host sshd[1959]: Error attempting to add filename encryption key to user session keyring; rc = [1] Jan 16 09:57:15 host sshd[1957]: Accepted password for astacy from 70.114.155.20 port 42481 ssh2 Jan 16 09:57:15 host sshd[1957]: pam_unix(sshd:session): session opened for user astacy by (uid=0) Jan 16 09:57:20 host sudo: astacy : TTY=pts/0 ; PWD=/home/astacy ; USER=root ; COMMAND=/usr/bin/tail -f /var/log/auth.log The strange thing is that once I've got this first login session, I run the exact same ssh command, and publickey authentication works: [me@my-laptop:~]$ ssh -vv host ... debug1: Server accepts key: pkalg ssh-rsa blen 277 ... [me@host:~]$ And the /var/log/auth.log output is: Jan 16 09:59:11 host sshd[2061]: reverse mapping checking getaddrinfo for cpe-70-114-155-20.austin.res.rr.com [70.114.155.20] failed - POSSIBLE BREAK-IN ATTEMPT! Jan 16 09:59:11 host sshd[2061]: Accepted publickey for astacy from 70.114.155.20 port 39982 ssh2 Jan 16 09:59:11 host sshd[2061]: pam_unix(sshd:session): session opened for user astacy by (uid=0) What do I need to do to make publickey authentication work on the first login? NOTE: When I installed Ubuntu 10.10, I checked the 'encrypt home folder' option. I'm wondering if this has something to do with the log message "Error attempting to add filename encryption key to user session keyring"

    Read the article

  • C sockets, chat server and client, problem echoing back.

    - by wretrOvian
    Hi This is my chat server : #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <sys/types.h> #include <sys/socket.h> #include <netdb.h> #include <string.h> #define LISTEN_Q 20 #define MSG_SIZE 1024 struct userlist { int sockfd; struct sockaddr addr; struct userlist *next; }; int main(int argc, char *argv[]) { // declare. int listFD, newFD, fdmax, i, j, bytesrecvd; char msg[MSG_SIZE], ipv4[INET_ADDRSTRLEN]; struct addrinfo hints, *srvrAI; struct sockaddr_storage newAddr; struct userlist *users, *uptr, *utemp; socklen_t newAddrLen; fd_set master_set, read_set; // clear sets FD_ZERO(&master_set); FD_ZERO(&read_set); // create a user list users = (struct userlist *)malloc(sizeof(struct userlist)); users->sockfd = -1; //users->addr = NULL; users->next = NULL; // clear hints memset(&hints, 0, sizeof hints); // prep hints hints.ai_family = AF_INET; hints.ai_socktype = SOCK_STREAM; hints.ai_flags = AI_PASSIVE; // get srver info if(getaddrinfo("localhost", argv[1], &hints, &srvrAI) != 0) { perror("* ERROR | getaddrinfo()\n"); exit(1); } // get a socket if((listFD = socket(srvrAI->ai_family, srvrAI->ai_socktype, srvrAI->ai_protocol)) == -1) { perror("* ERROR | socket()\n"); exit(1); } // bind socket bind(listFD, srvrAI->ai_addr, srvrAI->ai_addrlen); // listen on socket if(listen(listFD, LISTEN_Q) == -1) { perror("* ERROR | listen()\n"); exit(1); } // add listfd to master_set FD_SET(listFD, &master_set); // initialize fdmax fdmax = listFD; while(1) { // equate read_set = master_set; // run select if(select(fdmax+1, &read_set, NULL, NULL, NULL) == -1) { perror("* ERROR | select()\n"); exit(1); } // query all sockets for(i = 0; i <= fdmax; i++) { if(FD_ISSET(i, &read_set)) { // found active sockfd if(i == listFD) { // new connection // accept newAddrLen = sizeof newAddr; if((newFD = accept(listFD, (struct sockaddr *)&newAddr, &newAddrLen)) == -1) { perror("* ERROR | select()\n"); exit(1); } // resolve ip if(inet_ntop(AF_INET, &(((struct sockaddr_in *)&newAddr)->sin_addr), ipv4, INET_ADDRSTRLEN) == -1) { perror("* ERROR | inet_ntop()"); exit(1); } fprintf(stdout, "* Client Connected | %s\n", ipv4); // add to master list FD_SET(newFD, &master_set); // create new userlist component utemp = (struct userlist*)malloc(sizeof(struct userlist)); utemp->next = NULL; utemp->sockfd = newFD; utemp->addr = *((struct sockaddr *)&newAddr); // iterate to last node for(uptr = users; uptr->next != NULL; uptr = uptr->next) { } // add uptr->next = utemp; // update fdmax if(newFD > fdmax) fdmax = newFD; } else { // existing sockfd transmitting data // read if((bytesrecvd = recv(i, msg, MSG_SIZE, 0)) == -1) { perror("* ERROR | recv()\n"); exit(1); } msg[bytesrecvd] = '\0'; // find out who sent? for(uptr = users; uptr->next != NULL; uptr = uptr->next) { if(i == uptr->sockfd) break; } // resolve ip if(inet_ntop(AF_INET, &(((struct sockaddr_in *)&(uptr->addr))->sin_addr), ipv4, INET_ADDRSTRLEN) == -1) { perror("* ERROR | inet_ntop()"); exit(1); } // print fprintf(stdout, "%s\n", msg); // send to all for(j = 0; j <= fdmax; j++) { if(FD_ISSET(j, &master_set)) { if(send(j, msg, strlen(msg), 0) == -1) perror("* ERROR | send()"); } } } // handle read from client } // end select result handle } // end looping fds } // end while return 0; } This is my client: #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <sys/types.h> #include <sys/socket.h> #include <netdb.h> #include <string.h> #define MSG_SIZE 1024 int main(int argc, char *argv[]) { // declare. int newFD, bytesrecvd, fdmax; char msg[MSG_SIZE]; fd_set master_set, read_set; struct addrinfo hints, *srvrAI; // clear sets FD_ZERO(&master_set); FD_ZERO(&read_set); // clear hints memset(&hints, 0, sizeof hints); // prep hints hints.ai_family = AF_INET; hints.ai_socktype = SOCK_STREAM; hints.ai_flags = AI_PASSIVE; // get srver info if(getaddrinfo(argv[1], argv[2], &hints, &srvrAI) != 0) { perror("* ERROR | getaddrinfo()\n"); exit(1); } // get a socket if((newFD = socket(srvrAI->ai_family, srvrAI->ai_socktype, srvrAI->ai_protocol)) == -1) { perror("* ERROR | socket()\n"); exit(1); } // connect to server if(connect(newFD, srvrAI->ai_addr, srvrAI->ai_addrlen) == -1) { perror("* ERROR | connect()\n"); exit(1); } // add to master, and add keyboard FD_SET(newFD, &master_set); FD_SET(STDIN_FILENO, &master_set); // initialize fdmax if(newFD > STDIN_FILENO) fdmax = newFD; else fdmax = STDIN_FILENO; while(1) { // equate read_set = master_set; if(select(fdmax+1, &read_set, NULL, NULL, NULL) == -1) { perror("* ERROR | select()"); exit(1); } // check server if(FD_ISSET(newFD, &read_set)) { // read data if((bytesrecvd = recv(newFD, msg, MSG_SIZE, 0)) < 0 ) { perror("* ERROR | recv()"); exit(1); } msg[bytesrecvd] = '\0'; // print fprintf(stdout, "%s\n", msg); } // check keyboard if(FD_ISSET(STDIN_FILENO, &read_set)) { // read data from stdin if((bytesrecvd = read(STDIN_FILENO, msg, MSG_SIZE)) < 0) { perror("* ERROR | read()"); exit(1); } msg[bytesrecvd] = '\0'; // send if((send(newFD, msg, bytesrecvd, 0)) == -1) { perror("* ERROR | send()"); exit(1); } } } return 0; } The problem is with the part where the server recv()s data from an FD, then tries echoing back to all [send() ]; it just dies, w/o errors, and my client is left looping :(

    Read the article

  • Strange thing on IPv6 multicast program on Windows

    - by zhanglistar
    I have written an ipv6 multicast program on windows xp sp3. But a problem bothers me a lot. The sendto function implies no error, but I can't capture the packet using wireshark. I am sure the filter is right. Thanks in advance. And the code is as follows: #include "stdafx.h" #include <stdio.h> /* for printf() and fprintf() */ #include <winsock2.h> /* for socket(), connect(), sendto(), and recvfrom() */ #include <ws2tcpip.h> /* for ip_mreq */ #include <stdlib.h> /* for atoi() and exit() */ #include <string.h> /* for memset() */ #include <time.h> /* for timestamps */ #include <pcap.h> #include <Iphlpapi.h> #pragma comment(lib, "Ws2_32.lib") #pragma comment(lib, "wpcap.lib") #pragma comment(lib, "Iphlpapi.lib") int _tmain(int argc, _TCHAR* argv[]) { int sfd; int on, length, iResult; WSADATA wsaData; struct addrinfo Hints; struct addrinfo *multicastAddr, *localAddr; char buf[46]; // Initialize Winsock iResult = WSAStartup(MAKEWORD(2, 2), &wsaData); if (iResult != 0) { printf("WSAStartup failed: %d\n", iResult); return 1; } /* Resolve destination address for multicast datagrams */ memset(&Hints, 0, sizeof (Hints)); Hints.ai_family = AF_INET6; Hints.ai_socktype = SOCK_DGRAM; Hints.ai_protocol = IPPROTO_UDP; Hints.ai_flags = AI_NUMERICHOST; iResult = getaddrinfo("FF02::1:2", "547", &Hints, &multicastAddr); if (iResult != 0) { /* error handling */ printf("socket error: %d\n", WSAGetLastError()); return -1; } /* Get a local address with the same family (IPv4 or IPv6) as our multicast group */ Hints.ai_family = multicastAddr->ai_family; Hints.ai_socktype = SOCK_DGRAM; Hints.ai_flags = AI_PASSIVE; /* Return an address we can bind to */ if ( getaddrinfo(NULL, "546", &Hints, &localAddr) != 0 ) { printf("getaddrinfo() failed: %d\n", WSAGetLastError()); exit(-1); } // Create sending socket //sfd = socket (multicastAddr->ai_family, multicastAddr->ai_socktype, multicastAddr->ai_protocol); sfd = socket(AF_INET6, SOCK_DGRAM, IPPROTO_UDP); if (sfd == -1) { printf("socket error: %d\n", WSAGetLastError()); return 0; } /* Bind to the multicast port */ if ( bind(sfd, localAddr->ai_addr, localAddr->ai_addrlen) != 0 ) { printf("bind() failed: %d\n", WSAGetLastError()); exit(-1); } if (multicastAddr->ai_family == AF_INET6 && multicastAddr->ai_addrlen == sizeof(struct sockaddr_in6)) /* IPv6 */ { on = 1; if (setsockopt (sfd, IPPROTO_IPV6, IPV6_MULTICAST_IF, (char *)&on, sizeof (on) /*(char *)&interface_addr, sizeof(interface_addr)*/) == -1) { printf("setsockopt error:%d\n", WSAGetLastError()); return -1; } if (setsockopt (sfd, IPPROTO_IPV6, IPV6_MULTICAST_LOOP, (char *)&on, sizeof (on) /*(char *)&interface_addr, sizeof(interface_addr)*/) == -1) { printf("setsockopt error:%d\n", WSAGetLastError()); return -1; } struct ipv6_mreq multicastRequest; /* Multicast address join structure */ /* Specify the multicast group */ memcpy(&multicastRequest.ipv6mr_multiaddr, &((struct sockaddr_in6*)(multicastAddr->ai_addr))->sin6_addr, sizeof(struct in6_addr)); /* Accept multicast from any interface */ multicastRequest.ipv6mr_interface = 0; /* Join the multicast address */ if ( setsockopt(sfd, IPPROTO_IPV6, IPV6_JOIN_GROUP, (char*) &multicastRequest, sizeof(multicastRequest)) != 0 ) { printf("setsockopt() failed: %d\n", WSAGetLastError()); return -1; } on = 1; if (setsockopt (sfd, IPPROTO_IPV6, IPV6_MULTICAST_IF, (char *)&on, sizeof (on)) == -1) { printf("setsockopt error:%d\n", WSAGetLastError()); return 0; } } memset(buf, 0, sizeof(buf)); strcpy(buf, "hello world"); iResult = sendto(sfd, buf, strlen(buf), 0, (LPSOCKADDR) multicastAddr->ai_addr, multicastAddr->ai_addrlen); if (iResult == SOCKET_ERROR) { printf("setsockopt error:%d\n", WSAGetLastError()); return -1; /* Error handling */ } return 0; }

    Read the article

  • initrd.lz is corrupted error occured while installing 11.10

    - by zubendra
    C:\ubuntu\install\boot\initrd.lz is corrupted. Error pop-up comes up every time i am trying to install ubuntu-11.10-desktop-i386 using wubi. error comes when the installation process is almost completed. can anyone suggest a solution for this problem. Its occurring regularly. 03-19 18:01 DEBUG TaskList: ## Running copy_installation_files... 03-19 18:01 DEBUG WindowsBackend: Copying C:\DOCUME~1\HP_OWN~1.YOU\LOCALS~1\Temp\pyl59.tmp\data\custom-installation -> C:\ubuntu\install\custom-installation 03-19 18:01 DEBUG WindowsBackend: Copying C:\DOCUME~1\HP_OWN~1.YOU\LOCALS~1\Temp\pyl59.tmp\winboot -> C:\ubuntu\winboot 03-19 18:01 DEBUG WindowsBackend: Copying C:\DOCUME~1\HP_OWN~1.YOU\LOCALS~1\Temp\pyl59.tmp\data\images\Ubuntu.ico -> C:\ubuntu\Ubuntu.ico 03-19 18:01 DEBUG TaskList: ## Finished copy_installation_files 03-19 18:01 DEBUG TaskList: ## Running get_iso... 03-19 18:01 DEBUG CommonBackend: Trying to use pre-specified ISO X:\ubuntu-11.10-desktop-i386.iso 03-19 18:01 DEBUG TaskList: New task is_valid_iso 03-19 18:01 DEBUG TaskList: ### Running is_valid_iso... 03-19 18:01 DEBUG Distro: checking Ubuntu ISO X:\ubuntu-11.10-desktop-i386.iso 03-19 18:01 INFO Distro: Found a valid iso for Ubuntu: X:\ubuntu-11.10-desktop-i386.iso 03-19 18:01 DEBUG TaskList: ### Finished is_valid_iso 03-19 18:01 DEBUG TaskList: New task check_iso 03-19 18:01 DEBUG TaskList: ### Running check_iso... 03-19 18:01 DEBUG CommonBackend: Checking X:\ubuntu-11.10-desktop-i386.iso 03-19 18:01 DEBUG Distro: checking Ubuntu ISO X:\ubuntu-11.10-desktop-i386.iso 03-19 18:01 INFO Distro: Found a valid iso for Ubuntu: X:\ubuntu-11.10-desktop-i386.iso 03-19 18:01 DEBUG CommonBackend: Using distro Ubuntu i386 instead of Ubuntu amd64 03-19 18:01 DEBUG TaskList: New task get_metalink 03-19 18:01 DEBUG TaskList: #### Running get_metalink... 03-19 18:01 DEBUG downloader: downloading http://releases.ubuntu.com/11.10/ubuntu-11.10-desktop-i386.metalink > C:\ubuntu\install 03-19 18:01 ERROR CommonBackend: Cannot download metalink file http://releases.ubuntu.com/11.10/ubuntu-11.10-desktop-i386.metalink err=[Errno 4] IOError: <urlopen error (7, 'getaddrinfo failed')> 03-19 18:01 DEBUG downloader: downloading http://cdimage.ubuntu.com/daily-live/current/oneiric-desktop-i386.metalink > C:\ubuntu\install 03-19 18:01 ERROR CommonBackend: Cannot download metalink file2 http://cdimage.ubuntu.com/daily-live/current/oneiric-desktop-i386.metalink err=[Errno 4] IOError: <urlopen error (7, 'getaddrinfo failed')> 03-19 18:01 DEBUG TaskList: #### Finished get_metalink 03-19 18:01 ERROR CommonBackend: ERROR: the metalink file is not available, cannot check the md5 for X:\ubuntu-11.10-desktop-i386.iso, ignoring 03-19 18:01 DEBUG TaskList: ### Finished check_iso 03-19 18:01 DEBUG TaskList: New task copy_file 03-19 18:01 DEBUG CommonBackend: Copying X:\ubuntu-11.10-desktop-i386.iso > C:\ubuntu\install\installation.iso 03-19 18:01 DEBUG TaskList: ### Running copy_file... 03-19 18:01 DEBUG TaskList: ### Finished copy_file 03-19 18:01 DEBUG TaskList: ## Finished get_iso 03-19 18:01 DEBUG TaskList: ## Running extract_kernel... 03-19 18:01 DEBUG CommonBackend: Extracting files from ISO C:\ubuntu\install\installation.iso 03-19 18:01 DEBUG WindowsBackend: extracting md5sum.txt from C:\ubuntu\install\installation.iso 03-19 18:01 DEBUG WindowsBackend: extracting casper\vmlinuz from C:\ubuntu\install\installation.iso 03-19 18:01 DEBUG WindowsBackend: extracting casper\initrd.lz from C:\ubuntu\install\installation.iso 03-19 18:01 DEBUG CommonBackend: Checking kernel, initrd and md5sums 03-19 18:01 DEBUG CommonBackend: checking C:\ubuntu\install\boot\vmlinuz 03-19 18:01 DEBUG CommonBackend: C:\ubuntu\install\boot\vmlinuz md5 = fde150f5c6fd2de66ed7876efbfcc4c7 == fde150f5c6fd2de66ed7876efbfcc4c7 03-19 18:01 DEBUG CommonBackend: checking C:\ubuntu\install\boot\initrd.lz 03-19 18:01 DEBUG CommonBackend: C:\ubuntu\install\boot\initrd.lz md5 = 8900200c764438c1b124dff5ae92c763 != d6baee1e11f1d6de6eba6bd43dbde352 03-19 18:01 ERROR TaskList: File C:\ubuntu\install\boot\initrd.lz is corrupted Traceback (most recent call last): File "\lib\wubi\backends\common\tasklist.py", line 197, in __call__ File "\lib\wubi\backends\common\backend.py", line 623, in extract_kernel Exception: File C:\ubuntu\install\boot\initrd.lz is corrupted 03-19 18:01 DEBUG TaskList: # Cancelling tasklist 03-19 18:01 ERROR root: File C:\ubuntu\install\boot\initrd.lz is corrupted Traceback (most recent call last): File "\lib\wubi\application.py", line 58, in run File "\lib\wubi\application.py", line 132, in select_task File "\lib\wubi\application.py", line 158, in run_installer File "\lib\wubi\backends\common\tasklist.py", line 197, in __call__ File "\lib\wubi\backends\common\backend.py", line 623, in extract_kernel Exception: File C:\ubuntu\install\boot\initrd.lz is corrupted 03-19 18:01 DEBUG TaskList: # Finished tasklist

    Read the article

  • Finding Local IP via Socket Creation / getsockname

    - by BSchlinker
    I need to get the IP address of a system within C++. I followed the logic and advice of another comment on here and created a socket and then utilized getsockname to determine the IP address which the socket is bound to. However, this doesn't appear to work (code below). I'm receiving an invalid IP address (58.etc) when I should be receiving a 128.etc Any ideas? string Routes::systemIP(){ // basic setup int sockfd; char str[INET_ADDRSTRLEN]; sockaddr* sa; socklen_t* sl; struct addrinfo hints, *servinfo, *p; int rv; memset(&hints, 0, sizeof hints); hints.ai_family = AF_UNSPEC; hints.ai_socktype = SOCK_DGRAM; if ((rv = getaddrinfo("4.2.2.1", "80", &hints, &servinfo)) != 0) { fprintf(stderr, "getaddrinfo: %s\n", gai_strerror(rv)); return "1"; } // loop through all the results and make a socket for(p = servinfo; p != NULL; p = p->ai_next) { if ((sockfd = socket(p->ai_family, p->ai_socktype, p->ai_protocol)) == -1) { perror("talker: socket"); continue; } break; } if (p == NULL) { fprintf(stderr, "talker: failed to bind socket\n"); return "2"; } // get information on the local IP from the socket we created getsockname(sockfd, sa, sl); // convert the sockaddr to a sockaddr_in via casting struct sockaddr_in *sa_ipv4 = (struct sockaddr_in *)sa; // get the IP from the sockaddr_in and print it inet_ntop(AF_INET, &(sa_ipv4->sin_addr.s_addr), str, INET_ADDRSTRLEN); printf("%s\n", str); // return the IP return str; }

    Read the article

  • rsync error on Downloading

    - by Chandan
    Sir I am trying to setup a Rsyncmirror on my mount drive /mnt/Mirror/ubuntu_mirror .so I am trying the command rsync -a --bwlimit=128 rsync://archive.ubuntu.com/ubuntu /mnt/Mirror/ubuntu_mirror but it shows error rsync: getaddrinfo: archive.ubuntu.com 873: Name or service not known rsync error: error in socket IO (code 10) at clientserver.c(122) [Receiver=3.0.9] can anyone help me.. Thanks.

    Read the article

  • How to open a MIB file in tkmib?

    - by l0b0
    I've tried to open several MIB files in tkmib without success. For example: $ sudo apt-get install tkmib $ wget http://www.mibsearch.com/vendors/Compaq/download/CPQHLTH-MIB $ tkmib CPQHLTH-MIB Click "walk", then you should get an error message like this: setting opts getaddrinfo: CPQHLTH-MIB No address associated with hostname error:snmp_new_session: Couldn't open SNMP session at /usr/lib/perl5/SNMP.pm line 475. unable to create session at /usr/lib/perl5/SNMP.pm line 547. Tk::Error: Can't call method "getnext" on unblessed reference at /usr/bin/tkmib line 506. main::snmpwalk at /usr/bin/tkmib line 506 Tk callback for .frame5.button2 Tk::__ANON__ at /usr/lib/perl5/Tk.pm line 250 Tk::Button::butUp at /usr/lib/perl5/Tk/Button.pm line 175 <ButtonRelease-1> (command bound to event) As I'm completely new to SNMP and MIB files, and man tkmib is sparse to say the least, what do I actually need to do to be able to work with this file?

    Read the article

  • Mail not being sent when using phpmailer

    - by mithunmo
    I am using the following code to send mail to a smtp server . <?php // example on using PHPMailer with GMAIL include("PHPMailer/class.phpmailer.php"); include("PHPMailer/class.smtp.php"); // note, this is optional - gets called from main class if not already loaded $mail = new PHPMailer(); $mail->IsSMTP(); $mail->SMTPAuth = true; // enable SMTP authentication $mail->Host = "mucse491.eu.xxxxx.com"; // sets GMAIL as the SMTP server $mail->Port = 143; // set the SMTP port $mail->Username = "[email protected]"; // GMAIL username $mail->Password = "xxxx"; // GMAIL password $mail->From = "[email protected]"; $mail->FromName = "mithun"; $mail->Subject = "This is the subject"; $mail->AltBody = "This is the body when user views in plain text format"; //Text Body $mail->WordWrap = 50; // set word wrap $mail->AddAddress("[email protected]","First Last"); $mail->IsHTML(true); // send as HTML if(!$mail->Send()) { echo "Mailer Error: " . $mail->ErrorInfo; } else { echo "Message has been sent"; } ?> When I run it from the command line I get the following error PHP Deprecated: Function eregi() is deprecated in C:\wamp\www\phpmailer\class.p hpmailer.php on line 593 Deprecated: Function eregi() is deprecated in C:\wamp\www\phpmailer\class.phpmai ler.php on line 593 PHP Warning: fputs() expects parameter 1 to be resource, integer given in C:\wa mp\www\phpmailer\class.smtp.php on line 213 Warning: fputs() expects parameter 1 to be resource, integer given in C:\wamp\ww w\phpmailer\class.smtp.php on line 213 Mailer Error: SMTP Error: Could not connect to SMTP host. When i run from the browser I get the following error Deprecated: Function eregi() is deprecated in C:\wamp\www\phpmailer\class.phpmailer.php on line 593 Warning: fsockopen() [function.fsockopen]: php_network_getaddresses: getaddrinfo failed: This is usually a temporary error during hostname resolution and means that the local server did not receive a response from an authoritative server. in C:\wamp\www\phpmailer\class.smtp.php on line 122 Warning: fsockopen() [function.fsockopen]: unable to connect to mucse491.xx.xxxxx.com:143 (php_network_getaddresses: getaddrinfo failed: This is usually a temporary error during hostname resolution and means that the local server did not receive a response from an authoritative server. ) in C:\wamp\www\phpmailer\class.smtp.php on line 122 Mailer Error: SMTP Error: Could not connect to SMTP host. Please someone guide me .

    Read the article

  • Gethostname and IPv6

    - by Indhu Bharathi
    Microsoft recommends not to use 'gethostname' on IPv6 and instead use 'getaddrinfo' or 'getnameinfo'. http://msdn.microsoft.com/en-us/library/ms899604.aspx But 'gethostname' doesn't seem to have any problem working on IPv6. Does anyone know any reason why 'gethostname' is not recommended on IPv6?

    Read the article

  • Segfault (possibly due to casting)

    - by BSchlinker
    I don't normally go to stackoverflow for sigsegv errors, but I have done all I can with my debugger at the moment. The segmentation fault error is thrown following the completion of the function. Any ideas what I'm overlooking? I suspect that it is due to the casting of the sockaddr to the sockaddr_in, but I am unable to find any mistakes there. (Removing that line gets rid of the seg fault -- but I know that may not be the root cause here). // basic setup int sockfd; char str[INET_ADDRSTRLEN]; sockaddr* sa; socklen_t* sl; struct addrinfo hints, *servinfo, *p; int rv; memset(&hints, 0, sizeof hints); hints.ai_family = AF_UNSPEC; hints.ai_socktype = SOCK_DGRAM; // return string string foundIP; // setup the struct for a connection with selected IP if ((rv = getaddrinfo("4.2.2.1", NULL, &hints, &servinfo)) != 0) { fprintf(stderr, "getaddrinfo: %s\n", gai_strerror(rv)); return "1"; } // loop through all the results and make a socket for(p = servinfo; p != NULL; p = p->ai_next) { if ((sockfd = socket(p->ai_family, p->ai_socktype, p->ai_protocol)) == -1) { perror("talker: socket"); continue; } break; } if (p == NULL) { fprintf(stderr, "talker: failed to bind socket\n"); return "2"; } // connect the UDP socket to something connect(sockfd, p->ai_addr, p->ai_addrlen); // we need to connect to get the systems local IP // get information on the local IP from the socket we created getsockname(sockfd, sa, sl); // convert the sockaddr to a sockaddr_in via casting struct sockaddr_in *sa_ipv4 = (struct sockaddr_in *)sa; // get the IP from the sockaddr_in and print it inet_ntop(AF_INET, &(sa_ipv4->sin_addr), str, INET_ADDRSTRLEN); printf("%s\n", str); // return the IP return foundIP; }

    Read the article

  • Python thinks I'm a different IP

    - by Yongho
    I'm trying to set a page that displays the visitor's IP. All the methods I have tried show an IP different from the IP my computer has. I've tried: Looking up http://www.whatismyip.com/automation/n09230945.asp Using socket.getaddrinfo(socket.gethostname(), None)[0][4][0] How can I find the real IP of the visitor?

    Read the article

  • download mbox files over https using python

    - by VenkatS
    I was trying to find the right module for downloading kernel patches from kernel.org site For example,to download the file at https://patchwork.kernel.org/patch/62948/mbox/ I understand urlgrabber has a problem with https on debian. urllib2 seems to have problem with this url as well (says getaddrinfo failed, even though there are no problems reaching other urls) Any help would be appreciated

    Read the article

  • Is gethostbyname guaranteed to return hostent structures with IPv4 addresses?

    - by Robert
    I cannot use getaddrinfo(...) for resolving hostnames and therefore must stick to gethostbyname(...) Is the gethostbyname(...) function guaranteed to return hostent structures that contain only IPv4 (AF_INET) addresses on success, so that the following code would always lead to an IPv4 address: int resolve(const char *name, struct in_addr *addr) { struct hostent *he = gethostbyname(name); if (!he) return 1; memcpy(addr,he->h_addr_list[0],4); return 0; }

    Read the article

  • PHP file_get_contents() does not work after uploading to the webserver

    - by Ethan
    Sample code: $html = file_get_contents('http://www.google.com'); echo $html; It works on localhost. But after uploading to the webserver, it gives me a warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution. If I replace the domain name with google's IP address, it gives a warning: failed to open stream: Connection timed out. And ini_get("allow_url_fopen") return 1.

    Read the article

  • Advice on Mocking System Calls

    - by Robert S. Barnes
    I have a class which calls getaddrinfo for DNS look ups. During testing I want to simulate various error conditions involving this system call. What's the recommended method for mocking system calls like this? I'm using Boost.Test for my unit testing.

    Read the article

  • How can I obtain the IP address of my server program?

    - by Dr Dork
    Hello! This question is related to another question I just posted. I'm prepping for a simple work project and am trying to familiarize myself with the basics of socket programming in a Unix dev environment. At this point, I have some basic server side code and client side code setup to communicate. Currently, my client code successfully connects to the server code and the server code sends it a test message, then both quit out. Perfect! That's exactly what I wanted to accomplish. Now I'm playing around with the functions used to obtain info about the two environments (server and client). I'd like to obtain my server program's IP address. Here's the code I currently have to do this, but it's not working... int sockfd; unsigned int len; socklen_t sin_size; char msg[]="test message"; char buf[MAXLEN]; int st, rv; struct addrinfo hints, *serverinfo, *p; struct sockaddr_storage client; char s[INET6_ADDRSTRLEN]; char ip[INET6_ADDRSTRLEN]; //zero struct memset(&hints,0,sizeof(hints)); hints.ai_family = AF_UNSPEC; hints.ai_socktype = SOCK_STREAM; hints.ai_flags = AI_PASSIVE; //get the server info if((rv = getaddrinfo(NULL, SERVERPORT, &hints, &serverinfo ) != 0)){ perror("getaddrinfo"); exit(-1); } // loop through all the results and bind to the first we can for( p = serverinfo; p != NULL; p = p->ai_next) { //Setup the socket if( (sockfd = socket( p->ai_family, p->ai_socktype, p->ai_protocol )) == -1 ) { perror("socket"); continue; } //Associate a socket id with an address to which other processes can connect if(bind(sockfd, p->ai_addr, p->ai_addrlen) == -1){ close(sockfd); perror("bind"); continue; } break; } if( p == NULL ){ perror("Fail to bind"); } inet_ntop(p->ai_family, get_in_addr((struct sockaddr *)p->ai_addr), s, sizeof(s)); printf("Server has TCP Port %s and IP Address %s\n", SERVERPORT, s); and the output for the IP is always empty... server has TCP Port 21412 and IP Address :: any ideas for what I'm missing? thanks in advance for your help! this stuff is really complicated at first.

    Read the article

  • How to go to a website on a shared server by its ip address?

    - by user1502776
    I have a few questions, please help: Fist, I can access google search just by typing http://74.125.224.211 because this is the ip address returned by nslookup. However, I could not do so with ip addresses returned from www.yahoo.com. How do I go to yahoo search page by its ip ? Another example, http://www.allaboutcircuits.com will resolve to 68.233.243.63 by DNS server, but if I go to http://68.233.243.63 I got "Hello world!" , lol ! Second, for some reason, there is something wrong with DNS resolvers with my web hosting service (it will not be fixed !!). So command like, get_file_contents("http://www.allaboutcircuits.com"); will return php_network_getaddresses: getaddrinfo failed: Name or service not known How do I get around this with IP address , 68.233.243.63 I mean somehow attach the HTTP hostname parameter to get_file_contents() ? I would like to solve this on my own side (in my code), no troubleshooting/adjustment will be done by server admin.

    Read the article

  • sshd warning, "POSSIBLE BREAK-IN ATTEMPT!" for failed reverse DNS

    - by rking
    Whenever I SSH somewhere I get something like this in the logs: sshd[16734]: reverse mapping checking getaddrinfo for 1.2.3.4.crummyisp.net [1.2.3.4] failed - POSSIBLE BREAK-IN ATTEMPT! And it is right: if I do host 1.2.3.4 it returns 1.2.3.4.crummyisp.net, but if I do host 1.2.3.4.crummyisp.net it is not found. I have two questions: What security threat is there? How could anyone fake a one-way DNS in some threatening way? Do I have any recourse for fixing this? I'll send my ISP a bug report, but who knows where that'll go.

    Read the article

  • webserver running as nobody cannot resolve domain names

    - by jalal
    if i try to run the following: <?php echo file_get_contents("http://www.yahoo.com/index.html"); ?> through the web server I get a an "php_network_getaddresses: getaddrinfo" error. If I run the same file from the shell with: php test.php then I get the expected file output. This indicates to me that the 'nobody' user, which the webserver runs as, is not able to resolve the domain name, but the shell user can. Any ideas on how to fix this? Further info: CentOS 6, cPanel install, Apache, PHP running as dso. BTW, I've tried disabling the firewall to no effect.

    Read the article

  • Puppet claims to be unable to resolve domains even if domain properly resolves

    - by gparent
    I have a fairly simple puppet setup, one master and one node, both running Debian Squeeze 6.0.4. I have DNS entries for the two machines, client and master respectively. Both client and master's DNS entries resolve correctly on both machines to the right IPs. On my client, I have this configuration: [main] server = master.example.org logdir=/var/log/puppet vardir=/var/lib/puppet ssldir=/var/lib/puppet/ssl rundir=/var/run/puppet factpath=$vardir/lib/facter pluginsync=true templatedir=/var/lib/puppet/templates Key exchange seems to fail, according to this messages in /var/log/syslog: localhost puppet-agent[11364]: Could not request certificate: getaddrinfo: Name or service not known Why is resolution not working only for puppet?

    Read the article

  • fstab mount after network initialization

    - by Philip
    I'm automatically mounting a NFS with fstab. Sometimes the mount fails because the hostname of the NFS mount cannot be resolved (getaddrinfo failed). I'm assuming that this happens because the network initialization is slower than the mounts. Is there any way to initialize the network before mounting any devices? I'm already using _netdev as a mount option but this does not help. This is my current fstab file: # <file system> <mount point> <type> <options> <dump> <pass> /dev/md2 / ext3 errors=remount-ro 0 1 /dev/md1 /boot ext3 errors=remount-ro 0 1 /dev/sda3 swap swap defaults 0 0 /dev/sdb3 swap swap defaults 0 0 connect.mygluster.net:/data /var/gluster/data glusterfs ro,_netdev 0

    Read the article

  • How to use Nginx to export the mongoDB connection?

    - by Totty
    I have on my server 2 things: the node.js server and a mongodb database; The node.js server is reachable from myip/server; and now I would like to export the mongodb database to myip/database for example. Now when I use my mongodb viewer (MongoVUE) with "http://myip/database:9000" (the port 9000 is set in nginx and it's also the port that I start mongod). If I go to "http://myip/database:9000" or "http://myip/database" in a browser it look like: "You are trying to access MongoDB on the native driver port. For http diagnostic access, add 1000 to the port number". But in MongoVUE it says: Unable to connect to server 192.168.1.16/database:9000: No such host is known. Type: MongoDB.Driver.MongoConnectionException Stack: at MongoDB.Driver.Internal.DirectConnector.Connect(TimeSpan timeout) at MongoDB.Driver.MongoServer.Connect(TimeSpan timeout, ConnectWaitFor waitFor) at MongoDB.Driver.MongoServer.Connect(TimeSpan timeout) at MongoDB.Driver.MongoServer.Connect() at MangoUI.MMongo.FQlxNlJKqO74gYmXgZR4(Object ) at MangoUI.MMongo.Open(Boolean useSamus) at MangoUI.MMongo.Open() at MangoUI.ComNavTree.wJQdUqApCpjoC39P59n(Object ) at MangoUI.ComNavTree.ExpandMe(MTreeNode expand) at MangoUI.ComNavTree.tree_BeforeExpand(Object sender, TreeViewCancelEventArgs e) No such host is known Type: System.Net.Sockets.SocketException Stack: at System.Net.Dns.GetAddrInfo(String name) at System.Net.Dns.InternalGetHostByName(String hostName, Boolean includeIPv6) at System.Net.Dns.GetHostAddresses(String hostNameOrAddress) at MongoDB.Driver.MongoServerAddress.ToIPEndPoint(AddressFamily addressFamily) at MongoDB.Driver.MongoServerInstance.Connect(Boolean slaveOk) at MongoDB.Driver.Internal.DirectConnector.Connect(TimeSpan timeout)

    Read the article

  • Rails: Open HTTP URL From HTTPS site

    - by Imran
    I have a rails application running on SSL. I also have setup Piwik (for analytics) and it is running non-secure i.e. HTTP. When I try to make a call to Piwik API from my ruby code (the application running on SSL) it gives me the following error: SocketError (getaddrinfo: Name or service not known): /usr/lib/ruby/1.8/net/http.rb:560:in initialize' /usr/lib/ruby/1.8/net/http.rb:560:inopen' /usr/lib/ruby/1.8/net/http.rb:560:in connect' /usr/lib/ruby/1.8/timeout.rb:53:intimeout' /usr/lib/ruby/1.8/timeout.rb:93:in timeout' /usr/lib/ruby/1.8/net/http.rb:560:inconnect' /usr/lib/ruby/1.8/net/http.rb:553:in do_start' /usr/lib/ruby/1.8/net/http.rb:542:instart' /usr/lib/ruby/1.8/net/http.rb:379:in get_response' app/controllers/piwik_charts_controller.rb:195:inmake_graph' It works perfect when I make call from an application running on HTTP. Please advise. Thanks, Imran

    Read the article

< Previous Page | 1 2 3  | Next Page >