Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Tor Tor
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 339
    • Issues 339
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 31
    • Merge requests 31
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • The Tor Project
  • Core
  • TorTor
  • Issues
  • #2850
Closed
Open
Issue created Apr 04, 2011 by Trac@tracbot

use of SO_REUSEADDR socket option, was: Error binding network socket: Address already in use

Blutmagie and Tory exits frequently log the error Apr 04 15:27:48.706 [warn] Error binding network socket: Address already in use

According to Roger's answer to my today's posting on tor-relays mailing list the SO_REUSEADDR socket option isn't used in all cases. It might be an idea to set this option in any case.

Roger's answer

Actually, we only use SO_REUSEADDR when binding listening sockets. The errors you're seeing are likely because you can't open a new socket for an outbound connection. And we don't use SO_REUSEADDR when creating outbound sockets: see connection_connect().

We also don't set SO_REUSEADDR on the new socket we make after receiving connections on a listening socket: see connection_handle_listener_read().

I don't know what behavior to expect, but I would not be surprised to learn that we should set it in both of these cases too. Worth experimenting.

--Roger

Trac:
Username: Falo

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking