Re: [fpc-pascal] FPC + Indy
Hi Burkhard, Am Freitag, 18. Juli 2008 18:04 schrieb Cesar Romero: I wrote a appserver with fpc +Indy, all works just fine in OpenSuse 11, but when I install in a Fedora box (I tried Fedora 7, 8 and 9) it just dont run and raises the exception: An unhandled exception occurred at $08159DC9 : EIdCouldNotBindSocket : Could not bind socket. Address and port are already in use. $08159DC9 $0817CC21 $0817D404 $0817C8F5 $0806610D $08065D43 $08064228 $08048F7B "EIdSocketError : Socket Error # 98" Im using a custom port number and Im sure that it is not in use, does anyone know if I should install custom packages in Fedora to have this working? IIRC, this is a bug which shows only on systems having IPv6 support enabled. Make sure to add a IPv4 binding to your server, otherwise it tries to start listening socket for IPv4 and IPv6, which fails (or something like that; can't remember the exact details ..). However, following code solved my problems: MyServer:=TIdTCPServer.create; MyServer.DefaultPort:=8099; MyServer.bindings.add.IPVersion:=Id_IPv4; I figured out that this weekend binding did the trick MyServer.bindings.add.IPVersion:=Id_IPv4; Thank you, for the reply. Best regards, -- Cesar Romero http://blogs.liws.com.br/cesar http://blogs.liws.com.br/cesar/?feed=rss2 ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] FPC + Indy
Am Freitag, 18. Juli 2008 18:04 schrieb Cesar Romero: > I wrote a appserver with fpc +Indy, all works just fine in OpenSuse > 11, but when I install in a Fedora box (I tried Fedora 7, 8 and 9) it > just dont run and raises the exception: > > An unhandled exception occurred at $08159DC9 : EIdCouldNotBindSocket > : Could not bind socket. Address and port are already in use. > $08159DC9 $0817CC21 $0817D404 $0817C8F5 $0806610D $08065D43 $08064228 > $08048F7B "EIdSocketError : Socket Error # 98" > > Im using a custom port number and Im sure that it is not in use, does > anyone know if I should install custom packages in Fedora to have > this working? IIRC, this is a bug which shows only on systems having IPv6 support enabled. Make sure to add a IPv4 binding to your server, otherwise it tries to start listening socket for IPv4 and IPv6, which fails (or something like that; can't remember the exact details ..). However, following code solved my problems: MyServer:=TIdTCPServer.create; MyServer.DefaultPort:=8099; MyServer.bindings.add.IPVersion:=Id_IPv4; regards Burkhard ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] FPC + Indy
On Fri, 18 Jul 2008, Cesar Romero wrote: > Marco van de Voort escreveu: > > > > > Im using a custom port number and Im sure that it is not in use, does > > > > > anyone > > > > > know if I should install custom packages in Fedora to have this > > > > > working? > > > > > > > > > Things that jump to mind: > > > > - If the port number is below 1024, you must run as root. > > > > > > > > > > > The port Im using in 8090 or 8099 and Im already runnig as root for this > > > tests. > > > > > > > - It's also possible that the firewall settings are different on fedora > > > > by default > > > > > > > > > > > No firewall started > > > > > > > - Maybe selinux is installed and it doesn't allow anything by default ? > > > > > > > I disabled that too. > > > > > > > I agree with Michael, and the only thing I can think of is selinux. However > > in case of doubt, use strace. > > > > Btw, I assume this is indy 10. > > > Yes, it is. Did you try strace ? Michael. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] FPC + Indy
Marco van de Voort escreveu: Im using a custom port number and Im sure that it is not in use, does anyone know if I should install custom packages in Fedora to have this working? Things that jump to mind: - If the port number is below 1024, you must run as root. The port Im using in 8090 or 8099 and Im already runnig as root for this tests. - It's also possible that the firewall settings are different on fedora by default No firewall started - Maybe selinux is installed and it doesn't allow anything by default ? I disabled that too. I agree with Michael, and the only thing I can think of is selinux. However in case of doubt, use strace. Btw, I assume this is indy 10. Yes, it is. -- Cesar Romero http://blogs.liws.com.br/cesar http://blogs.liws.com.br/cesar/?feed=rss2 ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] FPC + Indy
> >> Im using a custom port number and Im sure that it is not in use, does > >> anyone > >> know if I should install custom packages in Fedora to have this working? > > > > Things that jump to mind: > > - If the port number is below 1024, you must run as root. > > > The port Im using in 8090 or 8099 and Im already runnig as root for this > tests. > > - It's also possible that the firewall settings are different on fedora by > > default > > > No firewall started > > - Maybe selinux is installed and it doesn't allow anything by default ? > I disabled that too. I agree with Michael, and the only thing I can think of is selinux. However in case of doubt, use strace. Btw, I assume this is indy 10. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] FPC + Indy
Hi Michael, I wrote a appserver with fpc +Indy, all works just fine in OpenSuse 11, but when I install in a Fedora box (I tried Fedora 7, 8 and 9) it just dont run and raises the exception: An unhandled exception occurred at $08159DC9 : EIdCouldNotBindSocket : Could not bind socket. Address and port are already in use. $08159DC9 $0817CC21 $0817D404 $0817C8F5 $0806610D $08065D43 $08064228 $08048F7B "EIdSocketError : Socket Error # 98" Im using a custom port number and Im sure that it is not in use, does anyone know if I should install custom packages in Fedora to have this working? Things that jump to mind: - If the port number is below 1024, you must run as root. The port Im using in 8090 or 8099 and Im already runnig as root for this tests. - It's also possible that the firewall settings are different on fedora by default No firewall started - Maybe selinux is installed and it doesn't allow anything by default ? I disabled that too. I tested: Hardware: OpenSuse 11 - works fine Fedora 7 - do not work VM: Fedora 8: do not work Fedora 9: do not work -- Cesar Romero http://blogs.liws.com.br/cesar http://blogs.liws.com.br/cesar/?feed=rss2 ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] FPC + Indy
On Fri, 18 Jul 2008, Cesar Romero wrote: > I wrote a appserver with fpc +Indy, all works just fine in OpenSuse 11, but > when I install in a Fedora box (I tried Fedora 7, 8 and 9) it just dont run > and raises the exception: > > An unhandled exception occurred at $08159DC9 : EIdCouldNotBindSocket : Could > not bind socket. Address and port are already in use. $08159DC9 $0817CC21 > $0817D404 $0817C8F5 $0806610D $08065D43 $08064228 $08048F7B > "EIdSocketError : Socket Error # 98" > > Im using a custom port number and Im sure that it is not in use, does anyone > know if I should install custom packages in Fedora to have this working? Things that jump to mind: - If the port number is below 1024, you must run as root. - It's also possible that the firewall settings are different on fedora by default - Maybe selinux is installed and it doesn't allow anything by default ? Michael. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] FPC + Indy
I wrote a appserver with fpc +Indy, all works just fine in OpenSuse 11, but when I install in a Fedora box (I tried Fedora 7, 8 and 9) it just dont run and raises the exception: An unhandled exception occurred at $08159DC9 : EIdCouldNotBindSocket : Could not bind socket. Address and port are already in use. $08159DC9 $0817CC21 $0817D404 $0817C8F5 $0806610D $08065D43 $08064228 $08048F7B "EIdSocketError : Socket Error # 98" Im using a custom port number and Im sure that it is not in use, does anyone know if I should install custom packages in Fedora to have this working? Regards, Cesar Romero http://blogs.liws.com.br/cesar ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal