RTC Forums
April 26, 2024, 03:31:48 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   Home   Help Login Register  
Pages: [1]
  Print  
Author Topic: ai_protocol not supported on OSX  (Read 3447 times)
ManfredPfeiffer
RTC License++
*****
Posts: 14


« on: July 28, 2012, 08:03:37 AM »

Hello,
I'm trying to use rtcHttpserver (port 80) on OSX but getting an "ai_protocol not supported" exception.
Is there any help available?
Kind regards,
Manfred
Logged
D.Tkalcec (RTC)
Administrator
*****
Posts: 1881


« Reply #1 on: July 28, 2012, 11:21:47 AM »

On Mac OSX, only root users are allowed to listen on ports below 1024. The error message you are getting on Mac OSX when trying to Listen on Port 80 is "#13: ai_protocol not supported". The #13 error code means "Permission denied" and "ai_protocol not supported" means that the Port (protocol) you are trying to use is not supported for users with your permission level.

Provided you know the root user password, you can start any process with root user permissions by using the "sudo" command. For example, if you wanted to start the "fmxAppServer" process as root user, open a new Terminal window, navigate to the folder with "fmxAppServer.app" (using the "cd" command) and enter ...

> sudo ./fmxAppServer.app/Contents/MacOS/fmxAppServer

When using relative paths, as in the command example above, make sure to include ./ before the name of the app. The sudo command will prompt you to enter the root user password (and confirm with the <Enter> key), after which your App will start and you will be able to listen on Ports below 1024 (like 80).

Instead of starting your App manually from a Terminal window, you could also log in to MacOSX as a root user, which would eliminate the need to use "sudo". Or, if you want to automate the process of starting your app with root permissions, but do NOT want to be logged in as a root user, you could create a ".command" file to start your app with the "sudo" command. You might have to use absolute paths with "sudo" in the ".command" file, though.

Optionally, in case you do NOT have the permission to run your app as a root user, you could use a Port number above 1024 instead of 80, then configure your internet router / firewall to map the external Port 80 (incoming connections) to any Port number you choose to use on your Mac.

Best Regards,
Danijel Tkalcec
Logged
ManfredPfeiffer
RTC License++
*****
Posts: 14


« Reply #2 on: July 28, 2012, 05:40:16 PM »

Thank you Danijel, for clarifying this somehow cryptic error message!
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.022 seconds with 16 queries.