Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
On the face of it, a function (pack_sockaddr_in) is being called with something with length 0, instead of length 4. Given the name of the function and the fact that it's expecting a '4', I'd guess that it wants an IP address.

So my best guess is that you're running a script which gets an IP address from somewhere (perhaps on the command line as an option, perhaps from a config file, perhaps it queries the system to find one) and this isn't happening, so the variable which normally contains the IP address is empty - causing the error.

So you might want to check whatever documentation you have for this script (or read the source) to see how it gets the IP address it listens on. You might also want to check that if the box has any additional IP addresses, they are all present.

Of course, this is all supposition. For trouble-shooting, some useful things to know are:

  • Did it use to work? (I guess it did?)
  • If it used to work, what has changed on that system since it did work? In particular anything related to network names or addresses.
Good luck.

p.s. The comments boxes on perlmonks take HTML, not plain text. Amongst other things, this means that your comment appears on one long line (and is harder to read) unless you break it up with <p> or <br> tags. You can use the 'Preview' button to see how others will see your comment.


In reply to Re: Perl network programming by jbert
in thread Perl network programming by Viki@Stag

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and all is quiet...

    How do I use this? | Other CB clients
    Other Users?
    Others romping around the Monastery: (10)
    As of 2017-06-26 18:02 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?
      How many monitors do you use while coding?















      Results (585 votes). Check out past polls.