Upgrade from 1.12 to 1.17 and get "java.net.SocketException: Permission denied"

137 views
Skip to first unread message

Andy

unread,
Jul 15, 2012, 6:30:44 AM7/15/12
to scmma...@googlegroups.com
Hi,

Just downloaded 1.17 to my Debian box.

Stopped scm-server and moved the directory to a safe place. Unzipped 1.17 and restarted scm-server. Unable to access SCM, check the logs/scm-server.err and see:

WARN:oejuc.AbstractLifeCycle:FAILED SelectChann...@0.0.0.0:80: java.net.SocketException: Permission denied

Port 80 was used without problems on 1.12.

Any ideas?

Stephan Christann

unread,
Jul 17, 2012, 2:28:51 AM7/17/12
to scmma...@googlegroups.com
Hello Andy,
 
it seems there are some file/folder rights not in order. Please check your Installation dir.
 
What installation type do you use? Standalone or the .war?
 
In our case the directory is ./usr/share/tomcat6/.scm , we are using the .war with the tomcat server.
 
To get better debug information, please look into the log folder that is located in the .scm folder.

Stephan Christann

unread,
Jul 17, 2012, 6:37:46 AM7/17/12
to scmma...@googlegroups.com
Hello Andy,

it seems that my frist suggestion was not right. It is a permission problem, but it seems that the user that starts the service is not allowed to open ports under port 1024. You can try using an unprivileged port above port 1024, or giving the user more rights. A list with the well known ports is usually placed in the file /etc/services .

Andy

unread,
Jul 17, 2012, 7:04:08 AM7/17/12
to scmma...@googlegroups.com


On Tuesday, July 17, 2012 11:37:46 AM UTC+1, Stephan Christann wrote:
Hello Andy,

it seems that my frist suggestion was not right. It is a permission problem, but it seems that the user that starts the service is not allowed to open ports under port 1024. You can try using an unprivileged port above port 1024, or giving the user more rights. A list with the well known ports is usually placed in the file /etc/services .

I'm running as standalone through an init.d script - the same script for both versions (I just change a symbolic link between different directories to swap between the 'old' and the 'new' versions) - so everything is running as root.

Andy

unread,
Jul 17, 2012, 7:29:51 AM7/17/12
to scmma...@googlegroups.com
OK, there is a difference between the 'scm-server' scripts in the two versions. Version 1.12 had a 'USER=""' statement whilst 1.17 didn't. I added the statement to the 1.17 version and it now runs perfectly.

I think that the only difference that this made was that within the scm-server script user_argument would be set to '-user root' (as $USER would be 'root' in my environment) and this would be passed to the Java environment. No idea what impact that would have!
Reply all
Reply to author
Forward
0 new messages