Skip to main content

Initial Context : Bad IIOP profile returned

1 reply [Last post]
Olivier Chorier...
Offline
Joined: 2011-06-15
Points: 0

Hello,

Here's my configuration :
- My computer : Win XP, Eclipse, 192.168.1.1/24
- Server : Glassfish 3.1.2.2, 2
- 192.168.2.250/24 available for customers only
- 192.168.3.250/24 available for developers only
- port 13700 for IIOP default listener (0.0.0.0). (We tried to make 2
listeners, see further)

First of all, customers don't have problems to access EJBs from the
application (standalone Swing).
From the developpers side, we can build an initial context, but we can't
lookup EJBs. We can ping GIOP : http://192.168.3.250:13700 returns GIOP

Here are the properties sent to Initial Context :

13700
com.sun.enterprise.naming.SerialInitContextFactory
8080
192.168.2.250
8181
com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl
com.sun.enterprise.naming

When calling EJB, we get stuck at this stack trace :
Net.connect(FileDescriptor, InetAddress, int, int) line: not available
[native method]
SocketChannelImpl.connect(SocketAddress) line: 532
ORBUtility.openSocketChannel(SocketAddress) line: 110
IIOPSSLSocketFactory.createSocket(String, InetSocketAddress) line: 324
SocketOrChannelConnectionImpl.(ORB, CorbaContactInfo, boolean,
boolean, String, String, int) line: 242
SocketOrChannelConnectionImpl.(ORB, CorbaContactInfo, String, String,
int) line: 270
SocketOrChannelContactInfoImpl.createConnection() line: 129
CorbaClientRequestDispatcherImpl.beginRequest(Object, String, boolean,
CorbaContactInfo) line: 223
CorbaClientDelegateImpl.request(Object, String, boolean) line: 228
CorbaClientDelegateImpl.is_a(Object, String) line: 393
CORBAObjectImpl(ObjectImpl)._is_a(String) line: 112
NamingContextHelper.narrow(Object) line: 69
SerialContext$ProviderCacheKey.getNameService() line: 1239
SerialContext.getRemoteProvider() line: 410
SerialContext.getProvider() line: 346
SerialContext.lookup(String, int) line: 504
SerialContext.lookup(String) line: 455
InitialContext.lookup(String) line: 392

So, we used Wireshark in order to analyze the server response from
Glassfish.
I'll try to report interesting frames only...

Frame 299
From 192.168.1.1 To 192.168.3.250 Protocol NBNS
Name Query NBSTAT *<00><00>........ type NBSTAT, class IN

Frame 301
From 192.168.3.250 To 192.168.1.1 Protocol ICMP
Destination unreachable (Port unreachable)

Maybe the previous error (appeared 3 times) raises the following ones I
don't know :

Frame 320 ; 321 ; 322 : SYN / ACK caids-sensor > 13700

Frame 323
From 192.168.1.1 To 192.168.3.250 Protocol GIOP
Request operation : _is_a
Context_data : .......(IDL:
omg.org/SendingContext/CodeBase:1.0.........j.........192.168.1.1.......e................&..
..
Type ID : IDL:omg.org/CosNaming/NamingContext:1.0

Frame 325
From 192.168.3.250 To 192.168.1.1 Protocol GIOP
GIOP 1.2 Reply
Reply status : Location forward (3)
ServiceContextID : SendingContextRunTime(6)
context_data: .......(IDL:
omg.org/SendingContext/CodeBase:1.0.....................192.168.2.250..................d...........................
...................
...............&...........!...x...............$.......f............1
IOR::type_id: IDL:omg.org/CosNaming/NamingContextExt:1.0
IIOP::Profile_host: 192.168.2.250
IIOP::Profile_port: 13700

Here is the problem : the GIOP response, frame 325, returns the
customer-side IP (192.168.2.250) instead of the developers one
(192.168.3.250).
(I think this is the problem)

I thought I had to make a new ORB listener. One for customers, one for
developers :

orb-listener1: Address 192.168.2.250 Port 13700
orb-listener2: Address 192.168.3.250 Port 13701

After restarting Glassfish and updating the context properties, nothing
better happened.

Does anybody have an idea ? I've googled for many hours, and tested many
options, but found nothing that worked.
Could it be a glassfish / orb / omg / ior issue ? Is is resolved in a
snapshot release ?

Thanks very much for your help.
Olivier.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
mgainty
Offline
Joined: 2004-05-21
Points: 0

Hi Olivier 0.0.0.0 is all hosts.. so i wouldnt bind any port to IP 0.0.0.0

apparently there is one ORB listener allowed per GF Domain.. sostart first GF domain on 192.168.2.250 (where ORB listener port= 13700)
start another GF domain (with a new ORB listener port=13700) on host 192.168.3.250 pingback for questions HTH
Martin Gainty
_____________________________________________
Note de déni et de confidentialitéCe message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.

From: lapsus63@gmail.com
Date: Wed, 9 Jan 2013 08:28:24 +0100
Subject: Re: Initial Context : Bad IIOP profile returned
To: users@glassfish.java.net

Hi Martin,
Thanks a lot for your reply, but I'm not sure to understand what you mean my "is not configured". Do I have to check my IIOP listeners or is it a different problem ?

I tried not to change them, as default orb listener using 0.0.0.0.
But I tried the following too :Update the first listener to 192.168.2.250 and make a second listener bound to 192.168.3.250.

In both cases, I can't access the server.Olivier.

2013/1/9 Martin Gainty

Hi Olivier-

apparently 192.168.2.250 is configured completely..(the reason why 192.168.2.250:13700 works)

apparently 192.168.3.250 is not configured at all so a GIOP request to 192.168.3.250:13700 forwards to

192.168.2.250:13700

Martin
______________________________________________
Note de déni et de confidentialité

Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.

From: lapsus63@gmail.com
Date: Tue, 8 Jan 2013 19:40:42 +0100
Subject: Initial Context : Bad IIOP profile returned
To: users@glassfish.java.net

Hello,

Here's my configuration :
- My computer : Win XP, Eclipse, 192.168.1.1/24
- Server : Glassfish 3.1.2.2, 2

- 192.168.2.250/24 available for customers only

- 192.168.3.250/24 available for developers only
- port 13700 for IIOP default listener (0.0.0.0). (We tried to make 2 listeners, see further)

First of all, customers don't have problems to access EJBs from the application (standalone Swing).

From the developpers side, we can build an initial context, but we can't lookup EJBs. We can ping GIOP : http://192.168.3.250:13700 returns GIOP

Here are the properties sent to Initial Context :

13700
com.sun.enterprise.naming.SerialInitContextFactory

8080
192.168.2.250
8181

com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl
com.sun.enterprise.naming

When calling EJB, we get stuck at this stack trace :
Net.connect(FileDescriptor, InetAddress, int, int) line: not available [native method]

SocketChannelImpl.connect(SocketAddress) line: 532
ORBUtility.openSocketChannel(SocketAddress) line: 110
IIOPSSLSocketFactory.createSocket(String, InetSocketAddress) line: 324
SocketOrChannelConnectionImpl.(ORB, CorbaContactInfo, boolean, boolean, String, String, int) line: 242

SocketOrChannelConnectionImpl.(ORB, CorbaContactInfo, String, String, int) line: 270
SocketOrChannelContactInfoImpl.createConnection() line: 129
CorbaClientRequestDispatcherImpl.beginRequest(Object, String, boolean, CorbaContactInfo) line: 223

CorbaClientDelegateImpl.request(Object, String, boolean) line: 228
CorbaClientDelegateImpl.is_a(Object, String) line: 393
CORBAObjectImpl(ObjectImpl)._is_a(String) line: 112
NamingContextHelper.narrow(Object) line: 69

SerialContext$ProviderCacheKey.getNameService() line: 1239
SerialContext.getRemoteProvider() line: 410
SerialContext.getProvider() line: 346
SerialContext.lookup(String, int) line: 504
SerialContext.lookup(String) line: 455

InitialContext.lookup(String) line: 392

So, we used Wireshark in order to analyze the server response from Glassfish.
I'll try to report interesting frames only...

Frame 299

From 192.168.1.1 To 192.168.3.250 Protocol NBNS
Name Query NBSTAT *<00><00>........ type NBSTAT, class IN

Frame 301
From 192.168.3.250 To 192.168.1.1 Protocol ICMP
Destination unreachable (Port unreachable)

Maybe the previous error (appeared 3 times) raises the following ones I don't know :

Frame 320 ; 321 ; 322 : SYN / ACK caids-sensor > 13700

Frame 323

From 192.168.1.1 To 192.168.3.250 Protocol GIOP
Request operation : _is_a
Context_data : .......(IDL:omg.org/SendingContext/CodeBase:1.0.........j.........192.168.1.1.......e................&....

Type ID : IDL:omg.org/CosNaming/NamingContext:1.0

Frame 325
From 192.168.3.250 To 192.168.1.1 Protocol GIOP
GIOP 1.2 Reply
Reply status : Location forward (3)

ServiceContextID : SendingContextRunTime(6)
context_data: .......(IDL:omg.org/SendingContext/CodeBase:1.0.....................192.168.2.250..................d........................... ................... ...............&...........!...x...............$.......f............1

IOR::type_id: IDL:omg.org/CosNaming/NamingContextExt:1.0
IIOP::Profile_host: 192.168.2.250
IIOP::Profile_port: 13700

Here is the problem : the GIOP response, frame 325, returns the customer-side IP (192.168.2.250) instead of the developers one (192.168.3.250).

(I think this is the problem)

I thought I had to make a new ORB listener. One for customers, one for developers :

orb-listener1: Address 192.168.2.250 Port 13700
orb-listener2: Address 192.168.3.250 Port 13701

After restarting Glassfish and updating the context properties, nothing better happened.

Does anybody have an idea ? I've googled for many hours, and tested many options, but found nothing that worked.

Could it be a glassfish / orb / omg / ior issue ? Is is resolved in a snapshot release ?

Thanks very much for your help.
Olivier.

Olivier Chorier...
Offline
Joined: 2011-06-15
Points: 0

Hello Martin,

Great thanks for your reply.
But I need some more help to understand.

The hosts 192.168.2.250 and 192.168.3.250 describe the same physical
machine (two network interfaces, eth0 and eth1)
How can I force GF to work with one IP instead of another one ?

Maybe orb-listeners can't do it as you said, but is it a domain property
then ?

It seems strange that GF doesn't allow many orb listeners, since asadmin
interface allows to make many listeners.

pingback: initial-context-bad-iiop-profile-returned
(not sure to understand what a pingback is, first attempt...)

Olivier.

2013/1/9 Martin Gainty

> Hi Olivier
>
> 0.0.0.0 is all hosts.. so i wouldnt bind any port to IP 0.0.0.0
>
> apparently there is one ORB listener allowed per GF Domain.. so
> start first GF domain on 192.168.2.250 (where ORB listener port= 13700)
> start another GF domain (with a new ORB listener port=13700) on
> host 192.168.3.250
>
> pingback for questions
>
> HTH
> Martin Gainty
> _____________________________________________
> Note de déni et de confidentialité
>
> Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.
>
>
>
>

Olivier Chorier...
Offline
Joined: 2011-06-15
Points: 0

Hello,

Something weird.
We tried the following : We kept the domain with just one iiop listener.
But instead of 0.0.0.0 we put 192.168.3.250 in the address field (for
testing purpose).
It still doesn't work from developper's LAN and the server still gives
192.168.2.250 as source IP in GIOP response.

Any suggestion ? Thanks a lot.

initial-context-bad-iiop-profile-returned

2013/1/9 Olivier Chorier

> Hello Martin,
>
> Great thanks for your reply.
> But I need some more help to understand.
>
> The hosts 192.168.2.250 and 192.168.3.250 describe the same physical
> machine (two network interfaces, eth0 and eth1)
> How can I force GF to work with one IP instead of another one ?
>
> Maybe orb-listeners can't do it as you said, but is it a domain property
> then ?
>
> It seems strange that GF doesn't allow many orb listeners, since asadmin
> interface allows to make many listeners.
>
> pingback: initial-context-bad-iiop-profile-returned
> (not sure to understand what a pingback is, first attempt...)
>
> Olivier.
>
>
> 2013/1/9 Martin Gainty
>
>> Hi Olivier
>>
>> 0.0.0.0 is all hosts.. so i wouldnt bind any port to IP 0.0.0.0
>>
>> apparently there is one ORB listener allowed per GF Domain.. so
>> start first GF domain on 192.168.2.250 (where ORB listener port= 13700)
>> start another GF domain (with a new ORB listener port=13700) on
>> host 192.168.3.250
>>
>> pingback for questions
>>
>> HTH
>> Martin Gainty
>> _____________________________________________
>> Note de déni et de confidentialité
>>
>> Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.
>>
>>
>>
>>