We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › Cannot Create Server
Page Index Toggle Pages: 1
Cannot Create Server (Read 507 times)
Cannot Create Server
Nov 2nd, 2007, 11:27pm
 
using the example code to start a server
I get

java.net.BindException: Permission denied
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(Unknown Source)
at java.net.ServerSocket.bind(Unknown Source)
at java.net.ServerSocket.<init>(Unknown Source)
at java.net.ServerSocket.<init>(Unknown Source)
at processing.net.Server.<init>(Server.java:53)
at Temporary_9826_8878.setup(Temporary_9826_8878.java:20)

java.lang.RuntimeException: Error inside Server.<init>()
at processing.core.PApplet.die(PApplet.java:2384)
at processing.core.PApplet.die(PApplet.java:2402)
at processing.net.Server.errorMessage(Server.java:227)
at processing.net.Server.<init>(Server.java:74)
at Temporary_9826_8878.setup(Temporary_9826_8878.java:20)
at processing.core.PApplet.handleDisplay(PApplet.java:1285)
at processing.core.PGraphics.requestDisplay(PGraphics.java:680)
at processing.core.PApplet.run(PApplet.java:1454)
at java.lang.Thread.run(Unknown Source)

i'm running Processing version 0125 beta on Ubuntu 7.10

i have created a semi-working proxy web server in Turing (http://compsci.ca/v3/viewtopic.php?p=147882&no=1#147882) but I need a more efficient and capable version
Re: Cannot Create Server
Reply #1 - Nov 2nd, 2007, 11:42pm
 
Unless you're running as root, you'll be unable to start the serve ron any port below 1024.
Re: Cannot Create Server
Reply #2 - Nov 3rd, 2007, 1:01am
 
how do i do this without logging in as root?
i tried opening processing with sudo but it won't run
Re: Cannot Create Server
Reply #3 - Nov 3rd, 2007, 4:35pm
 
use a port above 1024. because the code runs externally from processing, sudo prolly isn't gonna do it (are forked processes give sudo permissions? my guess would be no, though i'm not certain).

if you need to use a port that's lower (e.g. you're trying to implement a web server), i'd recommend using a higher port number to debug, then change the port number before you export the sketch to an application, and then run the exported application using sudo.
Page Index Toggle Pages: 1