Re: "java.net.SocketException: Permission denied: connect" after some time
Michael B Allen <[email protected]> Sat, 27 Sep 2014 01:36:32 -0400
| Newsgroups | gmane.network.samba.java |
|---|---|
| Message-ID | <CAGMFw4hi+nsiEmzOaFyu9mvdNfg++qZJvWbQDpyGj_4nnU-_3w@mail.gmail.com> |
On Tue, Aug 26, 2014 at 3:17 AM, luk <[email protected]> wrote: > Hello, > > I have implemented an server which reads and writes files all 30 minutes. > This server is running about 4 weeks now. There were no problems all time. > But now i get following exception: "java.net.SocketException: Permission > denied: connect" > > All user data is right. > I got the errors for 5 days. > After this 5 days i restarted the server. -> No problems anymore. The server > is running now for 1 day. I think after next 4 weeks i will get same problem > again. > > Any ideas? Hi Luk, That error is not related to JCIFS or user credentials. It is a JVM security manager issue. Specifically, it seems the Thread used by JCIFS to call Socket.connect() does not have permission to create a socket. Note that JCIFS uses a separate Thread to create and read sockets. Not sure if that is important in this case. It's difficult to tell what the real cause could be. It could be a ClassLoader issue. For example, if you restart the webapp, but not the entire app server, JCIFS will be loaded into a new ClassLoader and then maybe loose permissions somehow? But this is just a wild guess. There are probably a number of environmental factors that could result in a socket permission issue like this. Just Google "java socket connect permission" and see if anything lines up with your symptoms. Mike -- Michael B Allen Java Active Directory Integration http://www.ioplex.com/