Hello all. I am using IRCServices 5.0.57 on UltimateIRCd(Tsunami)-3.0(01), though this problem occurs regardless of what IRCd is used. (Services never makes it to the IRCd)<br><br>Following are a C&amp;P of services' log, followed by the contents of 
socktest.c, which is a socket testing program my buddy wrote (so he says) for me, followed by the output of ./socktest.<br> <br>I hope I've provided enough information, if anyone needs more information or needs me to take any additional steps for further troubleshooting, that's no problem at all. 
<br><br>Any help would be appreciated, thanks in advance.<br><br>Dave<br><br>Logs:<br>[Feb 14 20:12:25.677031 2006] IRC Services 5.0.57 starting up (options: debug)<br>[Feb 14 20:12:25.722001 2006] debug: Loading language 0 from file `languages/en_us'
<br>[Feb 14 20:12:25.728089 2006] debug: Loading language 10 from file `languages/nl'<br>[Feb 14 20:12:25.734271 2006] debug: Loading language 6 from file `languages/fr'<br>[Feb 14 20:12:25.740649 2006] debug: Loading language 9 from file `languages/de'
<br>[Feb 14 20:12:25.747259 2006] debug: Loading language 11 from file `languages/hu'<br>[Feb 14 20:12:25.753610 2006] debug: Loading language 8 from file `languages/it'<br>[Feb 14 20:12:25.758795 2006] debug: Loading language 2 from file `languages/ja_euc'
<br>[Feb 14 20:12:25.764741 2006] debug: Loading language 3 from file `languages/ja_sjis'<br>[Feb 14 20:12:25.770444 2006] debug: Loading language 5 from file `languages/pt'<br>[Feb 14 20:12:25.779258 2006] debug: Loading language 12 from file `languages/ru'
<br>[Feb 14 20:12:25.785985 2006] debug: Loading language 4 from file `languages/es'<br>[Feb 14 20:12:25.792501 2006] debug: Loading language 7 from file `languages/tr'<br>[Feb 14 20:12:25.798826 2006] debug: Loaded languages
<br>[Feb 14 20:12:25.802596 2006] debug: Loading module `protocol/bahamut'<br>[Feb 14 20:12:25.809033 2006] debug: Successfully loaded module `protocol/bahamut'<br>[Feb 14 20:12:25.812829 2006] debug: Loading module `database/version4'
<br>[Feb 14 20:12:25.821537 2006] debug: Successfully loaded module `database/version4'<br>[Feb 14 20:12:25.825316 2006] debug: Loading module `mail/main'<br>[Feb 14 20:12:25.830547 2006] debug: Successfully loaded module `mail/main'
<br>[Feb 14 20:12:25.834844 2006] debug: Loading module `mail/smtp'<br>[Feb 14 20:12:25.841417 2006] debug: Successfully loaded module `mail/smtp'<br>[Feb 14 20:12:25.844974 2006] debug: Loading module `operserv/main'<br>
[Feb 14 20:12:25.852625 2006] debug: Successfully loaded module `operserv/main'<br>[Feb 14 20:12:25.856821 2006] debug: Loading module `operserv/akill'<br>[Feb 14 20:12:25.862871 2006] debug: Successfully loaded module `operserv/akill'
<br>[Feb 14 20:12:25.866979 2006] debug: Loading module `operserv/news'<br>[Feb 14 20:12:25.872761 2006] debug: Successfully loaded module `operserv/news'<br>[Feb 14 20:12:25.876803 2006] debug: Loading module `operserv/sessions'
<br>[Feb 14 20:12:25.883016 2006] debug: Successfully loaded module `operserv/sessions'<br>[Feb 14 20:12:25.888510 2006] debug: Loading module `operserv/sline'<br>[Feb 14 20:12:25.894708 2006] debug: Successfully loaded module `operserv/sline'
<br>[Feb 14 20:12:25.898628 2006] debug: Loading module `nickserv/main'<br>[Feb 14 20:12:25.910032 2006] debug: Successfully loaded module `nickserv/main'<br>[Feb 14 20:12:25.913969 2006] debug: Loading module `nickserv/access'
<br>[Feb 14 20:12:25.920316 2006] debug: Successfully loaded module `nickserv/access'<br>[Feb 14 20:12:25.924218 2006] debug: Loading module `nickserv/link'<br>[Feb 14 20:12:25.930096 2006] debug: Successfully loaded module `nickserv/link'
<br>[Feb 14 20:12:25.933580 2006] debug: Loading module `nickserv/mail-auth'<br>[Feb 14 20:12:25.940245 2006] debug: Successfully loaded module `nickserv/mail-auth'<br>[Feb 14 20:12:25.944046 2006] debug: Loading module `nickserv/sendpass'
<br>[Feb 14 20:12:25.951050 2006] debug: Successfully loaded module `nickserv/sendpass'<br>[Feb 14 20:12:25.954684 2006] debug: Loading module `chanserv/main'<br>[Feb 14 20:12:25.963185 2006] debug: Successfully loaded module `chanserv/main'
<br>[Feb 14 20:12:25.967062 2006] debug: Loading module `chanserv/access-levels'<br>[Feb 14 20:12:25.974581 2006] debug: Successfully loaded module `chanserv/access-levels'<br>[Feb 14 20:12:25.978429 2006] debug: Loading module `chanserv/sendpass'
<br>[Feb 14 20:12:25.984940 2006] debug: Successfully loaded module `chanserv/sendpass'<br>[Feb 14 20:12:25.989298 2006] debug: Loading module `memoserv/main'<br>[Feb 14 20:12:25.996230 2006] debug: Successfully loaded module `memoserv/main'
<br>[Feb 14 20:12:25.999969 2006] debug: Loading module `memoserv/forward'<br>[Feb 14 20:12:26.006549 2006] debug: Successfully loaded module `memoserv/forward'<br>[Feb 14 20:12:26.010419 2006] debug: Loading module `memoserv/ignore'
<br>[Feb 14 20:12:26.014360 2006] debug: Successfully loaded module `memoserv/ignore'<br>[Feb 14 20:12:26.015657 2006] debug: Loading module `statserv/main'<br>[Feb 14 20:12:26.020414 2006] debug: Successfully loaded module `statserv/main'
<br>[Feb 14 20:12:26.021535 2006] debug: Loading module `misc/helpserv'<br>[Feb 14 20:12:26.025979 2006] debug: Successfully loaded module `misc/helpserv'<br>[Feb 14 20:12:26.026995 2006] debug: Loading module `httpd/main'
<br>[Feb 14 20:12:26.031818 2006] httpd/main: Listening on <a href="http://72.20.8.98:5347">72.20.8.98:5347</a><br>[Feb 14 20:12:26.033102 2006] debug: Successfully loaded module `httpd/main'<br>[Feb 14 20:12:26.034463 2006] debug: Loading module `httpd/auth-ip'
<br>[Feb 14 20:12:26.039295 2006] debug: Successfully loaded module `httpd/auth-ip'<br>[Feb 14 20:12:26.040407 2006] debug: Loading module `httpd/auth-password'<br>[Feb 14 20:12:26.044648 2006] debug: Successfully loaded module `httpd/auth-password'
<br>[Feb 14 20:12:26.045835 2006] debug: Loading module `misc/xml-export'<br>[Feb 14 20:12:26.050744 2006] debug: Successfully loaded module `misc/xml-export'<br>[Feb 14 20:12:26.051928 2006] debug: Loading module `misc/xml-import'
<br>[Feb 14 20:12:26.057501 2006] debug: Successfully loaded module `misc/xml-import'<br>[Feb 14 20:12:26.058620 2006] debug: Loaded modules<br>[Feb 14 20:12:26.068373 2006] FATAL: Can't connect to server (<a href="http://72.20.8.98:8899">
72.20.8.98:8899</a>): Invalid argument<br><br>--END LOG--<br><br>Code from socktest.c:<br>#include &lt;stdarg.h&gt;<br>#include &lt;stdio.h&gt;<br>#include &lt;stdlib.h&gt;<br>#include &lt;string.h&gt;<br>#include &lt;unistd.h
&gt;<br>#include &lt;signal.h&gt;<br>#include &lt;time.h&gt;<br>#include &lt;errno.h&gt;<br>#include &lt;grp.h&gt;<br>#include &lt;limits.h&gt;<br>#include &lt;netdb.h&gt;<br>#include &lt;netinet/in.h&gt;<br>#include &lt;sys/socket.h&gt;
<br>#include &lt;sys/stat.h&gt;        /* for umask() on some systems */<br>#include &lt;sys/types.h&gt;<br>#include &lt;sys/time.h&gt;<br><br>int conn(const char *host, int port, const char *lhost, int lport);<br>void disconn(int s);
<br><br>int conn(const char *host, int port, const char *lhost, int lport)<br>{<br>    struct hostent *hp;<br>    struct sockaddr_in sa, lsa;<br>    int sock;<br><br>    printf(&quot;Conn() called\n&quot;);<br><br>    memset(&amp;lsa, 0, sizeof(lsa));
<br>    if (lhost) {<br>        if ((hp = gethostbyname(lhost)) != NULL) {<br>            memcpy((char *) &amp;lsa.sin_addr, hp-&gt;h_addr, hp-&gt;h_length);<br>            lsa.sin_family = hp-&gt;h_addrtype;<br>        } else {
<br>            lhost = NULL;<br>        }<br>    }<br>    if (lport)<br>        lsa.sin_port = htons((unsigned short) lport);<br><br>    printf(&quot;Conn() LocalHost stuff setup\n&quot;);<br><br>    memset(&amp;sa, 0, sizeof(sa));
<br>    if (!(hp = gethostbyname(host))) {<br>        printf(&quot;Error during gethostbyname\n&quot;);<br>        return -1;<br>    }<br>    printf(&quot;Conn() gethostbyname successful\n&quot;);<br><br>    memcpy((char *) &amp;sa.sin_addr, hp-&gt;h_addr, hp-&gt;h_length);
<br>    sa.sin_family = hp-&gt;h_addrtype;<br>    sa.sin_port = htons((unsigned short) port);<br><br>    printf(&quot;Conn() before socket call\n&quot;);<br><br>    printf(&quot;Check sa family %d AF_INET %d\n&quot;, sa.sin_family
, AF_INET);<br>    printf(&quot;Check sa port %d %d htons check %d\n&quot;, port, sa.sin_port, htons((unsigned short) port));<br>    printf(&quot;Check sa address %s\n&quot;, inet_ntoa(sa.sin_addr));<br><br>    if ((sock = socket(
sa.sin_family, SOCK_STREAM, 0)) &lt; 0) {<br>        printf(&quot;Error during socket\n&quot;);<br>        return -1;<br>    }<br>    printf(&quot;Conn() sock %d\n&quot;, sock);<br><br>    if ((lhost || lport)<br>        &amp;&amp; bind(sock, (struct sockaddr *) &amp;lsa, sizeof(lsa)) &lt; 0) {
<br>        close(sock);<br>        printf(&quot;Error during bind\n&quot;);<br>        return -1;<br>    }<br><br>    if (connect(sock, (struct sockaddr *) &amp;sa, sizeof(sa)) &lt; 0) {<br>        printf(&quot;Error during connect\n&quot;);
<br>        printf(&quot;Errno is %d\n&quot;, errno);<br>        printf(&quot;strerror says %s\n&quot;, strerror(errno));<br>        printf(&quot;Check sizeof(sa) %ld\n&quot;, sizeof(sa));<br>        printf(&quot;Check socket %d\n&quot;, sock);
<br>        printf(&quot;Check sa family %d AF_INET %d\n&quot;, sa.sin_family, AF_INET);<br>        printf(&quot;Check sa port %d\n&quot;, sa.sin_port);<br>        printf(&quot;Check sa address %s\n&quot;, inet_ntoa(sa.sin_addr
));<br><br>        close(sock);<br>        return -1;<br>    }<br>    printf(&quot;Successful sock value %d&quot;, sock);<br>    return sock;<br>}<br><br>/*************************************************************************/
<br><br>void disconn(int s)<br>{<br>    shutdown(s, 2);<br>    close(s);<br>}<br><br>int main(int ac, char **av, char **envp)<br>{<br>  int s;<br>  printf(&quot;Calling conn()\n&quot;);<br>  s = conn(&quot;<a href="http://72.20.8.98">
72.20.8.98</a>&quot;, 8899, &quot;<a href="http://72.20.8.98">72.20.8.98</a>&quot;, 8891);<br>  printf(&quot;after conn()\n&quot;);<br>  disconn(s);<br>  printf(&quot;exit\n&quot;);<br>  return 0;<br>}<br><br><br>--END OF 
socktest.c--<br><br><br>And, finally, the output from socktest.c:<br><br>Calling conn()<br>Conn() called<br>Conn() LocalHost stuff setup<br>Conn() gethostbyname successful<br>Conn() before socket call<br>Check sa family 2 AF_INET 2
<br>Check sa port 8899 49954 htons check 49954<br>Check sa address <a href="http://72.20.8.98">72.20.8.98</a><br>Conn() sock 3<br>Error during connect<br>Errno is 22<br>strerror says Invalid argument<br>Check sizeof(sa) 16
<br>Check socket 3<br>Check sa family 2 AF_INET 2<br>Check sa port 49954<br>Check sa address <a href="http://72.20.8.98">72.20.8.98</a><br>after conn()<br>exit<br><br>--END OF socktest output--<br>