Search Unity

  1. Unity 2018.3 is now released.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. We've updated our Terms of Service. Please read our blog post from Unity CTO and Co-Founder Joachim Ante here
    Dismiss Notice
  4. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  5. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice

Socket: bind failed, error: Address already in use(98)

Discussion in 'Linux Editor' started by nullptr_, Jan 10, 2019.

  1. nullptr_

    nullptr_

    Joined:
    Jan 27, 2016
    Posts:
    14
    After unity hangs I usually kill it with `xkill`. After removing `Temp` folder in project root and relaunch project there is an error message in console "Socket: bind failed, error: Address already in use(98)"

    This forces me to restart system because after this error I can't debug my game at all (Breakpoints not hit)
    There was a thread https://forum.unity.com/threads/socket-bind-failed-error-address-already-in-use-98.350909/ but there is no solution
    On issue tracker https://issuetracker.unity3d.com/is...-already-in-use-48-when-importing-the-project this issue is marked as non-reproducible

    `ps aux | grep unity` gives me some unityhub and unity-editor processes. But killing them still has no effect.
     
  2. senkal_

    senkal_

    Joined:
    May 22, 2018
    Posts:
    20
    Hi @nullptr_
    Do you use any custom way to start adb services?
    If not, looks like it is related to the killing thing.
    After killing, could you check(netstat or similar) if anything is still using the port?
    At least for me, Unity uses 34999 (based on command which uses tcp:34999), so maybe that port is still "locked" by Unity after manual process kill.
     
  3. nullptr_

    nullptr_

    Joined:
    Jan 27, 2016
    Posts:
    14
    Thank you for response

    No, I use adb from official ubuntu repos but it doesn't look like Android related issue

    I checked netstat and there is no unity records at all. Do you use any arguments to find unity in list?
     
  4. senkal_

    senkal_

    Joined:
    May 22, 2018
    Posts:
    20
    @nullptr_
    Unfortuantely my knowledge about the subject is limited here :)
    I don't know about other tricks to find the blocking process apart from what you have been doing.
    The only thing I can suggest is to try to reproduce it and file a bug report.

    As I understand the fact that Unity freezes for you is crucial here.
    Few times Unity freezed/crashed for me but after another Unity(not whole PC) restart I didn't encounter issues you see.
    So maybe it is not that easy to reproduce.

    I have never cleared "Temp" folder after crash, why do you do it?