You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by Prasanna Kumar G <pr...@vimukti.com> on 2011/04/21 08:07:42 UTC

Getting Exception while writting the DHCP response message to the Session

Hi,
     I am running Dhcp Server with ApacheDS latest Ldap version. But i am
getting Permission Denied Exception when writing the DhcpResponse Message
into the IOSession in DhcpProtocolHandler.messageReceived() Method.
Here is my Exception...

java.net.SocketException: Permission denied: no further information
at sun.nio.ch.DatagramChannelImpl.send0(Native Method)
at
sun.nio.ch.DatagramChannelImpl.sendFromNativeBuffer(DatagramChannelImpl.java:301)
at sun.nio.ch.DatagramChannelImpl.send(DatagramChannelImpl.java:281)
at sun.nio.ch.DatagramChannelImpl.send(DatagramChannelImpl.java:250)
at
org.apache.mina.transport.socket.nio.NioDatagramAcceptor.send(NioDatagramAcceptor.java:189)
at
org.apache.mina.transport.socket.nio.NioDatagramAcceptor.send(NioDatagramAcceptor.java:46)
at
org.apache.mina.core.polling.AbstractPollingConnectionlessIoAcceptor.flush(AbstractPollingConnectionlessIoAcceptor.java:496)
at
org.apache.mina.core.polling.AbstractPollingConnectionlessIoAcceptor.flushSessions(AbstractPollingConnectionlessIoAcceptor.java:450)
at
org.apache.mina.core.polling.AbstractPollingConnectionlessIoAcceptor.access$700(AbstractPollingConnectionlessIoAcceptor.java:56)
at
org.apache.mina.core.polling.AbstractPollingConnectionlessIoAcceptor$Acceptor.run(AbstractPollingConnectionlessIoAcceptor.java:364)
at
org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)


Please Help Me...!!
Thanks in Advance

-- 
Thanks & Regards

Prasanna kumar.G, Software Programmer, Vimukti Technologies Pvt.Ltd.

Cell: + 91-8985995161|  Email: prasannakumar.g@vimukti.com   |
www.vimukti.com
+91-8985995161

Re: Getting Exception while writting the DHCP response message to the Session

Posted by Emmanuel Lécharny <el...@apache.org>.
On 4/21/11 9:17 AM, Prasanna Kumar G wrote:
> Yes i am Running ApacheDS ladap Dhcp Server on 67 port And run my Java
> Datagram packet handling program on port 67 only. Ldap dhcp server getting
> exception and my program is working fine.

Strange...

Although the Apache DS DHCP server is not actively developed, so it may 
be buggy. I'm afraid that you are on your own here, but if you find some 
fix, we would be happy to apply it on trunk.



-- 
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com


Re: Getting Exception while writting the DHCP response message to the Session

Posted by Prasanna Kumar G <pr...@vimukti.com>.
Yes i am Running ApacheDS ladap Dhcp Server on 67 port And run my Java
Datagram packet handling program on port 67 only. Ldap dhcp server getting
exception and my program is working fine.

Thanks
Prasanna Kumar G

On Thu, Apr 21, 2011 at 12:43 PM, Emmanuel Lécharny <el...@apache.org>wrote:

> On 4/21/11 8:50 AM, Prasanna Kumar G wrote:
>
>> I run my own java program to handle Datagram packet as same as dhcp server
>> using mina and it's working fine in the same system.
>>
>
> Are you using the same port ?
>
>
>
> --
> Regards,
> Cordialement,
> Emmanuel Lécharny
> www.iktek.com
>
>


-- 
Thanks & Regards

Prasanna kumar.G, Software Programmer, Vimukti Technologies Pvt.Ltd.

Cell: + 91-8985995161|  Email: prasannakumar.g@vimukti.com   |
www.vimukti.com
+91-8985995161

Re: Getting Exception while writting the DHCP response message to the Session

Posted by Emmanuel Lécharny <el...@apache.org>.
On 4/21/11 8:50 AM, Prasanna Kumar G wrote:
> I run my own java program to handle Datagram packet as same as dhcp server
> using mina and it's working fine in the same system.

Are you using the same port ?


-- 
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com


Re: Getting Exception while writting the DHCP response message to the Session

Posted by Prasanna Kumar G <pr...@vimukti.com>.
I run my own java program to handle Datagram packet as same as dhcp server
using mina and it's working fine in the same system.

On Thu, Apr 21, 2011 at 12:05 PM, Emmanuel Lécharny <el...@apache.org>wrote:

> On 4/21/11 8:07 AM, Prasanna Kumar G wrote:
>
>> java.net.SocketException: Permission denied
>>
> Are you on windows ? Have you a firewall set ?
>
> --
> Regards,
> Cordialement,
> Emmanuel Lécharny
> www.iktek.com
>
>


-- 
Thanks & Regards

Prasanna kumar.G, Software Programmer, Vimukti Technologies Pvt.Ltd.

Cell: + 91-8985995161|  Email: prasannakumar.g@vimukti.com   |
www.vimukti.com
+91-8985995161

Re: Getting Exception while writting the DHCP response message to the Session

Posted by Prasanna Kumar G <pr...@vimukti.com>.
I am running Server on windows7 OS and Firewall is Already turned off.

And Here is my DhcpProtocolHandler.messageReceived() method....

public void messageReceived(IoSession session, Object message)
throws Exception {
if (logger.isDebugEnabled())
logger.debug("{} -> {} RCVD: {} " + message, session
.getRemoteAddress(), session.getLocalAddress());

final DhcpMessage request = (DhcpMessage) message;

final DhcpMessage reply = dhcpService.getReplyFor(
(InetSocketAddress) session.getServiceAddress(),
(InetSocketAddress) session.getRemoteAddress(), request);

if (null != reply) {
final InetSocketAddress isa = determineMessageDestination(request,
reply);
session.write(reply, isa);
}
}

And i am not getting Exception at session.write(reply,isa). I am getting
that exception after Execution of that line as well as method.


Thanks
Prasanna Kumar G

On Thu, Apr 21, 2011 at 12:05 PM, Emmanuel Lécharny <el...@apache.org>wrote:

> On 4/21/11 8:07 AM, Prasanna Kumar G wrote:
>
>> java.net.SocketException: Permission denied
>>
> Are you on windows ? Have you a firewall set ?
>
> --
> Regards,
> Cordialement,
> Emmanuel Lécharny
> www.iktek.com
>
>


-- 
Thanks & Regards

Prasanna kumar.G, Software Programmer, Vimukti Technologies Pvt.Ltd.

Cell: + 91-8985995161|  Email: prasannakumar.g@vimukti.com   |
www.vimukti.com
+91-8985995161

Re: Getting Exception while writting the DHCP response message to the Session

Posted by Emmanuel Lécharny <el...@apache.org>.
On 4/21/11 8:07 AM, Prasanna Kumar G wrote:
> java.net.SocketException: Permission denied
Are you on windows ? Have you a firewall set ?

-- 
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com