users@glassfish.java.net

RE: Initial Context : Bad IIOP profile returned

From: Martin Gainty <mgainty_at_hotmail.com>
Date: Tue, 8 Jan 2013 21:38:03 -0500

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 to192.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_at_gmail.com
Date: Tue, 8 Jan 2013 19:40:42 +0100
Subject: Initial Context : Bad IIOP profile returned
To: users_at_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 :


<properties>
    <entry key="org.omg.CORBA.ORBInitialPort">13700</entry>
    <entry key="java.naming.factory.initial">com.sun.enterprise.naming.SerialInitContextFactory</entry>


    <entry key="fr.crosstalk.HTTPInitialPort">8080</entry>
    <entry key="org.omg.CORBA.ORBInitialHost">192.168.2.250</entry>
    <entry key="fr.crosstalk.HTTPSInitialPort">8181</entry>


    <entry key="java.naming.factory.state">com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl</entry>
    <entry key="java.naming.factory.url.pkgs">com.sun.enterprise.naming</entry>


</properties>


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.<init>(ORB, CorbaContactInfo, boolean, boolean, String, String, int) line: 242


SocketOrChannelConnectionImpl.<init>(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.