It is very likely not related to Processing but to your operating system. How do you run your code? If you are calling the file in your shell, I would think you need to use sudo or have the proper permissions to run the file (chmod command for example).
Are you following any instructions to setup the server? If you are not, I would recommend you search for one and start with them (and share them here)
Make sure your code runs by testing it in your local environment first.
Providing small code snippets will also help in this cases.