#970 Keepass 2.xx on *nix throw SocketException: No route to host

closed
nobody
None
5
2012-02-05
2012-02-04
Chin Kung
No

Could not use Keepass 2.xx (I've tested using 2,16 and the last 2.18 on Fedora 16)

STR:
1. Install mono via yum command : 'yum install mono-devel' and it's install these package from fedora repository

mono-core-2.10.5-1.fc16.i686
mono-data-sqlite-2.10.5-1.fc16.i686
mono-winfx-2.10.5-1.fc16.i686
mono-extras-2.10.5-1.fc16.i686
mono-winforms-2.10.5-1.fc16.i686
mono-web-2.10.5-1.fc16.i686
mono-mvc-2.10.5-1.fc16.i686
mono-wcf-2.10.5-1.fc16.i686
mono-data-2.10.5-1.fc16.i686
monodoc-2.10.5-1.fc16.i686
mono-devel-2.10.5-1.fc16.i686
libgdiplus-2.10.5-1.fc16.i686

2. Download portable version of keepass 2.18 the xtract and run using command 'mono Keepass.exe' and error throw

Unhandled Exception: System.TypeInitializationException: An exception was thrown by the type initializer for System.Windows.Forms.XplatUI ---> System.Net.Sockets.SocketException: No route to host
at System.Net.Sockets.Socket.Connect (System.Net.EndPoint remoteEP) [0x00000] in <filename unknown>:0
at System.Windows.Forms.XplatUIX11.SetDisplay (IntPtr display_handle) [0x00000] in <filename unknown>:0
at System.Windows.Forms.XplatUIX11..ctor () [0x00000] in <filename unknown>:0
at System.Windows.Forms.XplatUIX11.GetInstance () [0x00000] in <filename unknown>:0
at System.Windows.Forms.XplatUI..cctor () [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at System.Windows.Forms.Application.EnableVisualStyles () [0x00000] in <filename unknown>:0
at KeePass.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: An exception was thrown by the type initializer for System.Windows.Forms.XplatUI ---> System.Net.Sockets.SocketException: No route to host
at System.Net.Sockets.Socket.Connect (System.Net.EndPoint remoteEP) [0x00000] in <filename unknown>:0
at System.Windows.Forms.XplatUIX11.SetDisplay (IntPtr display_handle) [0x00000] in <filename unknown>:0
at System.Windows.Forms.XplatUIX11..ctor () [0x00000] in <filename unknown>:0
at System.Windows.Forms.XplatUIX11.GetInstance () [0x00000] in <filename unknown>:0
at System.Windows.Forms.XplatUI..cctor () [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at System.Windows.Forms.Application.EnableVisualStyles () [0x00000] in <filename unknown>:0
at KeePass.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0

Full log with MONO_LOG_LEVEL=debug is attached

Discussion

  • Chin Kung
    Chin Kung
    2012-02-04

    Keepass run log with MONO_LOG_LEVEL=debug

     
    Attachments
  • Dominik Reichl
    Dominik Reichl
    2012-02-05

    As it can be seen from the stack trace (thanks for posting it), the problem occurs deep within Mono, not caused by KeePass code. The issue must be resolved in Mono.

    Best regards
    Dominik

     
  • Dominik Reichl
    Dominik Reichl
    2012-02-05

    • status: open --> closed
     
  • Chin Kung
    Chin Kung
    2012-02-05

    Found issue:

    My loopback is missing from iptables so it not allow mono to connect loopback

    Fix by add lo allow to input chain