• Register
    • Help

    striker  0 Items
    Currently Supporting
    • Home
    • News
    • Forum
      • Try XenForo Demo
      • New Posts
      • FAQ
      • Calendar
      • Community
        • Groups
        • Albums
        • Member List
      • Forum Actions
        • Mark Forums Read
      • Quick Links
        • Today's Posts
        • Who's Online
      • Sponsor
        • Sponsor a Feature
        • List of Donors
    • Wiki
    • Support
    • What's New?
    • Buy Now
    • Manual
    • 
    • Blogs
    • pegasus
    • bind(): Cannot assign requested address

    1. Welcome to VaultWiki.org, home of the wiki add-on for vBulletin and XenForo!

      VaultWiki allows your existing forum users to collaborate on creating and managing a site's content pages. VaultWiki is a fully-featured and fully-supported wiki solution for vBulletin and XenForo.

      The VaultWiki Team encourages you to join our community of forum administrators and check out VaultWiki for yourself.

    View RSS Feed

    pegasus

    You can place wiki content at this location.

    Manage

    bind(): Cannot assign requested address

    Rate this Entry
    0 Comments
    by
    pegasus
    • View Profile
    • View Forum Posts
    • View Blog Entries
    • Visit Homepage
    • View Articles
    , September 28, 2014 at 6:10 AM (5775 Views)
    I spent 6 hours (or more, I don't know) dealing with this tonight, particularly in the antiquated DomainKeys milter for Postfix (not to be confused with the oft-confused Domain Keys/DKIM).

    My /var/logs/maillog was filling up in seconds to many megabytes in size, simply repeating a variation of:
    Code:
    bind(): Cannot assign requested address
    To the point where every 30 seconds I would have to truncate the log file just to avoid running out of space on the partition.

    All I wanted to do was have the milter listen on port 19892. Repetitive checks to netstat and lsof showed that no processes were using the port, yet the issue persisted.

    I went so far as completely rewriting the init.d script (which was hard enough to find as it was for something published in 2007), under the premise that maybe it was just initing itself too many times and engaging in a race condition with itselves.

    Searched around Google and StackOverflow for hours, trying to find someone with the same problem to no avail. I just about gave up on DomainKeys and uninstalled it several times, citing that no one uses it as a sole means for email verification anyway.

    At some point of reading all these other issues, discounting the ones where ports were actually unavailable, people mistyping IP addresses and such and banging my head because I was only trying to bind to localhost, and it was spelled correctly.

    And then I had a eureka moment, because we had recently updated the hostname for the server, including the 127.0.0.1 address. And of course, rather than putting the new name as an alias, we inadvertently had erased localhost from the /etc/hosts file.

    So of course it could not bind to localhost, because "localhost" is actually not a hard-coded shortcut, it was actually defined as 127.0.0.1 in /etc/hosts

    After adding it back to the file like so:
    Code:
    127.0.0.1     custom.tld localhost localhost.localdomain
    The insanity-inducing bind() errors came to an end.

    Submit "bind(): Cannot assign requested address" to Digg Submit "bind(): Cannot assign requested address" to del.icio.us Submit "bind(): Cannot assign requested address" to StumbleUpon Submit "bind(): Cannot assign requested address" to Google

    Tags: bind, hosts, linux, localhost, port, socket
    Categories
    Uncategorized
    « Prev     Main     Next »

    Comments

    Oops!

     
    Cancel Changes
    + Create Blog
    pegasus
    pegasus's Avatar
    • Go to Profile Go to Profile
    • Mark as Read Mark as Read
    Join Date
    March 28, 2004
    Location
    New York, NY
    Posts
    2,884
    Blog Entries
    18
    • Recent Blog Posts
      • How to Be a Smart Wiki Editor
        November 3, 2015 10:42 AM
      • A Feature A Day
        October 8, 2014 1:20 PM
      • bind(): Cannot assign requested address
        September 28, 2014 6:10 AM
      • VaultWiki Development Reality Check
        May 28, 2014 1:48 AM
      • How to Upgrade to VaultWiki 4
        September 3, 2013 4:25 PM
    • Recent Comments
      • A Feature A Day
        by Alfa1
      • New in VaultWiki 4
        by pegasus
      • VaultWiki Mobile Style
        by pegasus
      • What's Changing About VaultWiki (Re-post)
        by ashley76
      • VaultWiki 4: Articles, Comments, and Attachments
        by Mokonzi
    • Recent Visitors
      • ACL,
      • doulie,
      • dvsDave,
      • gerryvz,
      • Grimscythe,
      • JulianD,
      • medic917,
      • RockGermany,
      • Stefanus,
      • Vilandra
    • Archive

        <   February 2021    
      Su Mo Tu We Th Fr Sa
      24 25 26 27 28 29 30
      31 1 2 3 4 5 6
      7 8 9 10 11 12 13
      14 15 16 17 18 19 20
      21 22 23 24 25 26 27
      28 1 2 3 4 5 6

    You can place wiki content at this location.

    Manage
    • Contact Us
    • License Agreement
    • Privacy
    • Terms
    • Top
    All times are GMT -4. The time now is 2:50 PM.
    This site uses cookies to help personalize content, to tailor your experience, and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Learn more… Accept Remind me later
  • striker
    Powered by vBulletin® Version 4.2.5 Beta 2
    Copyright © 2021 vBulletin Solutions Inc. All rights reserved.
    Search Engine Optimisation provided by DragonByte SEO (Pro) - vBulletin Mods & Addons Copyright © 2021 DragonByte Technologies Ltd.
    Copyright © 2008 - 2013 VaultWiki Team, Cracked Egg Studios, LLC.