Urgent....sun Instant Messaging not working in SRA
Hi Friends,
I have configured the sun one instant messaging server with the identity server and portal server. I am able to open the instant messaging window from the portal in the open mode. But I am not able to open the instant messaging window from the portal through SRA.
My configuration details:
The portal server, directory server, identity server and IM server are installed in the same machine
port: 49999
muxport: 49919
netlet rule: IM
clientRunMode: plugin
As per the documentation, for accessing IM through gateway in secure mode we need to create a netlet rule with name as IM which we created with following values:
URL:null
Client Port:49919
Target Host:machinename
Target Port:80
When I click the IM link in the portal it opens the applet window and is not able to install the applet and throws an I/O exception. It doesn't show any error message. When I viewed the source of the applet HTML page, i found that it is taking the machine name for "codebase" as 'localhost' instead of server name.
*************************************************
I have pasted the html source of the applet window below:
<html>
<head>
<title>Sun ONE Instant Messenger Applet</title>
</head>
<body bgcolor="#ffffff">
<center>
<table cellpadding=8 width="80%">
<tr valign=top>
<td>
<font size=+1>Attention!
</font>
</td>
<td>
<font size=+1>
Do not close this browser window
or load another web page in this window
as long as you are using Sun ONE Instant Messenger.
</font>
</td>
</tr>
<tr><td colspan=2>
<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
WIDTH=150
HEIGHT=33
codebase="http://java.sun.com/products/plugin/autodl/jinstall-1_4-win32.cab"> ;
<PARAM NAME="type" VALUE="application/x-java-applet;version=1.4">
<PARAM NAME=CODEBASE VALUE="http://localhost:false/iim">
<PARAM NAME=CODE VALUE="com.iplanet.im.client.iIMApplet.class" >
<PARAM NAME=CACHE_OPTION VALUE="Plugin">
<PARAM NAME=CACHE_ARCHIVE
VALUE="messenger.jar,imdesktop.jar,imnet.jar,en_US/imres.jar,en_US/imbrand.jar, icalendar.ja
r">
<PARAM NAME="scriptable" VALUE="false">
<PARAM NAME="server" VALUE="localhost:49919">
<PARAM NAME="uid" VALUE="62819">
<PARAM NAME="token"
VALUE="AQIC5wM2LY4SfczMQ++4j8fU6YleRQi5NZ2R53iRTYvp7rQ=">
<COMMENT></COMMENT>
<EMBED TYPE="application/x-java-applet;version=1.4"
WIDTH=150
HEIGHT=33
PLUGINSPAGE="http://java.sun.com/products/plugin/1.4/plugin-install.html"
CODEBASE="http://localhost:false/iim"
CODE="com.iplanet.im.client.iIMApplet.class"
CACHE_OPTION="Plugin"
CACHE_ARCHIVE="messenger.jar,imdesktop.jar,imnet.jar,en_US/imres.jar,en_US/imbr and.jar
,icalendar.jar"
ARCHIVE="messenger.jar,imdesktop.jar,imnet.jar,en_US/imres.jar,en_US/imbrand.ja r,icalenda
r.jar"
SCRIPTABLE=false
server="localhost:49919"
uid="62819"
token="AQIC5wM2LY4SfczMQ++4j8fU6YleRQi5NZ2R53iRTYvp7rQ="
>
</EMBED>
<NOEMBED>
</NOEMBED>
</OBJECT>
</td>
</tr>
</table>
</center>
</body>
</html>
***************************************************
Kindly help me in this issue.
Thanks & Regards
Ramkumar R
[3830 byte] By [
ramsys79] at [2007-11-25 17:43:53]

# 1
Try the solution mentioned in the Release Notes http://docs.sun.com/source/816-6761-10/index.html#wp39240-Rahul
# 2
Hi
Thanks for the reply. I have configured as per the release notes page. Now it is able to load the applet but gives error since it is not taking the value of the Instant Messenger hostname. It tooks the IM hostname has "localhost" and it is not able to find the 'jar' files. I have tried to give the IP address instead of the hostname but still it refers as "localhost" only. I am not able to determine from where it picks the machine name as "localhost". Kindly help me in this issue.
The error I am getting:
An error occurred while launching/running the application.
Title: Sun ONE Instant Messenger
Vendor: Sun Microsystems, Inc.
Category: Download Error
Unable to load resource: http://localhost:49916/iim/en_US/imres.jar
Best Regards
Ramkumar R
# 3
Hi
Thanks for the reply. I have configured as per the release notes page. Now it is able to load the applet but gives error since it is not taking the value of the Instant Messenger hostname. It tooks the IM hostname has "localhost" and it is not able to find the 'jar' files. I have tried to give the IP address instead of the hostname but still it refers as "localhost" only. I am not able to determine from where it picks the machine name as "localhost". Kindly help me in this issue.
The error I am getting:
An error occurred while launching/running the application.
Title: Sun ONE Instant Messenger
Vendor: Sun Microsystems, Inc.
Category: Download Error
Unable to load resource: http://localhost:49916/iim/en_US/imres.jar
Best Regards
Ramkumar R
# 4
Hi
Thanks for the reply. I have configured as per the release notes page. Now it is able to load the applet but gives error since it is not taking the value of the Instant Messenger hostname. It tooks the IM hostname has "localhost" and it is not able to find the 'jar' files. I have tried to give the IP address instead of the hostname but still it refers as "localhost" only. I am not able to determine from where it picks the machine name as "localhost". Kindly help me in this issue.
The error I am getting:
An error occurred while launching/running the application.
Title: Sun ONE Instant Messenger
Vendor: Sun Microsystems, Inc.
Category: Download Error
Unable to load resource: http://localhost:49916/iim/en_US/imres.jar
Best Regards
Ramkumar R
# 5
This is a bug !
You cannot make the IM to work through SRA even though you follow the instruction with the netlet in the docs. This bug is logged at Sun.
The only easy workaround is to:
First:
In the portlet for the user (or org) change codebase to localhost
(the port should be the loopback port (58000 default))
Second:
Change the multiplexor host in the users portlet to localhost
When the netlet is loaded as per the docs and these changes are made it will work. The bug is that the rewriter won't rewrite these hosts when going through the gw. And the drawback with this workaround is that it will not work when not going through the gw. This could never have been tested by Sun before releasing JES2004Q2.
Another workaround is to edit the loading .jsp to add an "if" statement so localhost is used only through the gw. Or maybe write your own rewriter rules for the gw.
There are no special tricks to make this work. This should work out of the box if you have a std installation with a working gw. The only this you have to do extra is to a add the netlet for IM. And even here a better job could have been done. The netlet should (my point of view) of course start automatically for the user. But why make it easy for the user.....
Sun saw directly that this was a bug...
I suggest you log it as well. I have not received a fix yet.
Regards
Per-Olov Sjholm
# 6
The localhost:49916 is part of the substitution from the netlet rule. The relative path of the url is taken from the codebase property of the IM Channel. From the url it looks like you will be have /iim in the codebase. What is the codebase in which the Instant Messaging Resources are installed?
Ensure that your netlrule maps properly to the IM codebase.
-Rahul
# 7
I added a new ruleset for Instant Messaging in the Rewriter:
<?xml version="1.0" encoding="UTF-8"?>
<!--
Instant Messaging Ruleset by QoS Labs.
-->
<!DOCTYPE RuleSet SYSTEM "jar://rewriter.jar/resources/RuleSet.dtd">
<RuleSet id="im_ruleset">
<HTMLRules>
<!-- IM Applet Rule -->
<Applet code="com.iplanet.im.client.iIMApplet.class"/>
<Applet source="*" code="*" param="CODEBASE"/>
<Attribute name="CODEBASE" tag="applet;object;embed"/>
</HTMLRules>
</RuleSet>
I also had to add something likehttp*://HOSTNAME*/im*|im_ruleset to the Map URIs to RuleSets attribute in the Rewriter tab of the Gateway Service.
The IM is now working through the SRA but with errors in the java console, errors like
...sun.plugin.cache.DownloadException
at sun.plugin.cache.CachedFileLoader.load(Unknown Source)
at sun.plugin.cache.FileCache.get(Unknown Source)
at sun.net.www.protocol.https.PluginDelegateHttpsURLConnection.connectWithCache(Un known Source)
at sun.net.www.protocol.https.PluginDelegateHttpsURLConnection.connect(Unknown Source)
at sun.net.www.protocol.https.PluginDelegateHttpsURLConnection.getInputStream(Unkn own Source)
at java.net.HttpURLConnection.getResponseCode(Unknown Source)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(Unknown Source)
at sun.applet.AppletClassLoader.getBytes(Unknown Source)
at sun.applet.AppletClassLoader.access$100(Unknown Source)
at sun.applet.AppletClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.applet.AppletClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.util.ResourceBundle.loadBundle(Unknown Source)
at java.util.ResourceBundle.findBundle(Unknown Source)
at java.util.ResourceBundle.getBundleImpl(Unknown Source)
at java.util.ResourceBundle.getBundle(Unknown Source)
at com.iplanet.im.util.SafeResourceBundle.<init>(SafeResourceBundle.java:24)
at qd.<clinit>(Unknown Source)
at tf.iB(Unknown Source)
at tf.<init>(Unknown Source)
at zf.PB(Unknown Source)
at zf.<init>(Unknown Source)
at ca.al(Unknown Source)
at com.iplanet.im.client.iIM.LF(Unknown Source)
at ba.Bi(Unknown Source)
at ba.Di(Unknown Source)
at com.iplanet.im.client.iIM.xF(Unknown Source)
at pf.QD(Unknown Source)
at pf.MD(Unknown Source)
at com.iplanet.im.client.iIM.wF(Unknown Source)
at com.iplanet.im.client.iIM.lF(Unknown Source)
at com.iplanet.im.client.iIMApplet.init(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
May be someone could help me to fix these errors, I think there is something else that I need to rewrite because when I invoke the IM the Security Information warning appears telling me the page contains both secure and nonsecure items.
ans
# 8
First patchcluster for JES2004Q2 portal will be out very soon. It will fix IM through GW problem, hanging established netlet sessions among other things...I'm waiting for it myself as I have a couple of logged cases at Sun.Regards/Per-Olov
# 9
Hi, I have also logged a case with sun and waiting for their reply.RegardsRamkumar Raghavan
# 10
Sun has a PC1 for portal 6.3 on the way out that should fix this IM bug through gateway 37161029 among other things, but it does not fix it.... We just returned this info to Sun and are waiting for a reply.
While waiting for the real fix you can use this dirty fix....
The output from row 34 to 58 in our dirty working /etc/opt/SUNWps/desktop/default/IMProvider/IMContent.jsp file follows:
34 var myURL="<%= HttpUtils.getRequestURL(request) %>";
35 var urlprefix = window.location.protocol + "//" +
window.location.hostname;
36 var secure = false;
37 if (urlprefix != myURL.substr(0, urlprefix.length)) {
38 var secure = true;
39launchURL = launchURL + "&secure=yes";
40var src = "<%= request.getParameter("src_url") %>" ;
41if (src != null) {
42 launchURL = launchURL + "&gateway_url=" + src;
43}
44 }
45 // Settings for IMLaunch.jsp on IM Server defined in codebase
property
46launchURL = launchURL + "&type=<dtpc:getStringProperty
key='clientRunMode'/>";
47 if (secure) {
48launchURL = launchURL + "&server=localhost:49909";
49launchURL = launchURL + "&codebase=<localhost:58001/im>";
50 } else {
51launchURL = launchURL + "&server=<im:getIMServer/>";
52launchURL = launchURL + "&codebase=<im:getCodebase/>";
53 }
54
55launchURL = launchURL + "&uid=<im:getUsername/>";
56launchURL = launchURL + "&locale=<dtpc:getLocaleString/>";
57launchURL = launchURL + "&token=<im:getToken/>";
58
Make sure the localhost codebase and server above matches what you have in the "IM" netlet. If that matches, IM will work both through portal gateway and directly, even though it's hard coded.
Regards
/Per-Olov
# 11
Hello ramsys79,
What is the codebase set to in the IM Channel configuration. Is it consistent with the download URL? The resulting
CODEBASE="http://localhost:false/iim"
looks problematic.
If this is an option you can try to get it to work by making the client resources available outside of the SRA realm. This will just mean that the download of the messenger jar files will not be secure. actuall communication after that will go through SRA. You do this by deploying the messenger reources on a web container outside of the firewall setting the codebase to that public site.
# 12
I think localhost:false means that you do not have a codebase value att all on the user in the IM portlet...
This is how it works.......
We assume the following:
GW serverv fqdn: A..B.SE
Portal server fqdn: C.D.SE
IM service (mux) is running on server C.D.SE on port 49909
Portal server is deployed on web server on port 80 (on server C.D.SE). And IM download is from the same server in "/im" as we do not want all files in the web root. If you have another path to the IM jars, cabs etc... use it instead...
This IM portlet settings should then be:
Codebase should be "http://C.D.SE:80/im".
Server mux should be "C.D.SE"
Server mux port should be "49909"
The IM netlet settings should then be:
Name "IM" (can change if you also change name in the portlet)
Download URI "/im"
Download applet "58001:C.D.SE:80"
extend session = yes
And also add a static rule with 49909 to C.D.SE on port 49909
The above stuff from the portlets will be rewritten as stated in the IMContent.jsp. Note that you must have the same port in the IMContent.jsp as in the portlet and the IM netlet rule. This as it's ugly hard coded. The IMContent.jsp adds should from my point of view in a REAL fix ideally be done in the gw rewriter...
If going through GW the codebase will change from:
http://C.D.SE:80/im
to
http://localhost:58001/im
and server from:
C.D.SE:49909
to
localhost:49909
And when the above stuff are rewritten to localhost you have your started IM netlet rule that will catch this.
(Note that the mux (on 49909) is unfortunately named "server" in the IMContent.jsp which is not good. This as the server is not the same as the mux. Se docs... So the server in IMContent.jsp should have the mux values and not the server values (diffent ports))
The reason for downloading the IM files with a netlet through localhost (58001 in this case) is probably due to security in java. Otherwise the downloads of the files itself could easily be downloaded by https://A.B.SE/http://C.D.SE/im/index.html. The real connetion to the server however (user -> server on 49909) would need a netlet anyway..
Hope this helps.
Post and tell if it works...
Regards
/Per-Olov
# 13
Hi,
Great. Thanks for your reply. That solution worked when the browser is not configured for proxy.
I have gateway installed on the same machine itself as the portal server. sorry if I have missed this point before.
I have done according to the configurations you have given above and WAS ABLE TO GET THE INSTANT MESSENGER THROUGH SRA (without proxy enabled on the IE browser).
But when I am setting the proxy configuration in the IE browser it gives the errors and I was not able to get the IM thru SRA. I have pasted the java console messages below.... Kindly help me in this issue.
Best Regards
Ramkumar Raghavan
Java(TM) Plug-in: Version 1.4.2_05
Using JRE version 1.4.2_05 Java HotSpot(TM) Client VM
User home directory = C:\Documents and Settings\AdministratorProxy Configuration: Manual Configuration
Proxy: http=10.205.46.65:8080,https=10.205.46.65:8080,ftp=10.205.46.65:8080,gopher=10. 205.46.65:8080
Proxy Overrides: 10.205.46.65:8080,*test-1*,10.205*,*test*,<local> -
c:clear console window
f:finalize objects on finalization queue
g:garbage collect
h:display this help message
l:dump classloader list
m:print memory usage
o:trigger logging
p:reload proxy configuration
q:hide console
r:reload policy configuration
s:dump system properties
t:dump thread list
v:dump thread stack
x:clear classloader cache
0-5: set trace level to <n>
-
Netlet running on Java 2 Enabled browser
Netlet config: https://test-1.test.com/http://test-1.test.com/portal/NetletConfig?func=loadRes ourcesgateway
protocol : httpsgateway
host : test-1.test.com
gateway port : 443
Java version : 1.4.2_05
Proxy type : manualProxy override - [10.212.47.85:8080, *test-1*, 10.212*, *test*, <local>]
Netlet using proxy : host: 10.212.47.85 port: 8080
Netlet rule 0: local:8098 destination:test-1.test.com:80
Netlet rule 1: local:12386 destination:test-1.test.com:49909
Netlet rule 2: local:49916 destination:test-1.test.com:80
Netlet rule 3: local:12343 destination:test-1.test.com:49999
Netlet rule 4: local:522 destination:TARGET:1503
Netlet rule 5: local:58001 destination:172.16.5.21:80
Netlet rule 6: local:49909 destination:test-1.test.com:49909
Netlet rule 7: local:49909 destination:172.16.5.21:49909
Netlet rule 8: local:58000 destination:test-1.test.com:80
Netlet rule 9: local:30021 destination:TARGET:21
Netlet rule 10: local:10025 destination:TARGET:25
Netlet rule 11: local:10143 destination:TARGET:143
Netlet rule 12: local:30000 destination:TARGET:23
Unable to make server socket at 49909 java.net.BindException: Address already in use: JVM_Bind
Local port configuration -> {myrule=[8098:8098, 12386:12386], IMBKP=[49916:49916, 12343:12343], IM=[58001:58001, 49909:49909, 49909:15745], NetMeeting=[522:522], loopback=[58000:58000], FTP=[30021:30021], IMAP=[10025:10025, 10143:10143], Telnet=[30000:30000]}
Post URL -> https://test-1.test.com/http://test-1.test.com/portal/NetletConfig?func=setLoad ed
Netlet got connection on port: 58001 from port:15761 to gateway:test-1.test.com on port:443
Netlet showing port warning dialog:58001
Netlet running with JSSE :PDC Disabled
ESessionMsg caught exception when writing:
javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.j(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(Unknown Source)
at com.sun.net.ssl.internal.ssl.AppOutputStream.write(Unknown Source)
at java.io.DataOutputStream.write(Unknown Source)
at NL27.b(NL27)
at NL19.<init>(NL19)
at NL45.e(NL45)at NL45.run(NL45)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.EOFException: SSL peer shut down incorrectly
at com.sun.net.ssl.internal.ssl.InputRecord.read(Unknown Source)
... 10 more
# 14
hi, please read IP address 10.205.46.65: as 10.212.47.85. Some problem when I edited the message. Thanks Best RegardsRamkumar Raghavan
# 15
hi, please read IP address 10.205.46.65: as 10.212.47.85. Some problem when I edited the message. Thanks Best RegardsRamkumar Raghavan
# 16
Check this first...
Unable to make server socket at 49909 java.net.BindException: Address already in use: JVM_Bind
B t w, by runing the gw and the server on the same server you will not actually always see the problems as they have the same fqdn....
It's running perfect through a company proxy (I have tested Sun web proxy 3.6sp5). And we use PAC for configuration. IE, Firefox and mozilla all works great.
/Per-Olov
# 17
Hi,
When I try without the "proxy configured" in the browser I am getting the same error but still the IM messenger loads perfectly. I have pasted below the details of sun console messages generated when I have tried to load the IM without proxy configured in the browser.
Thanks and Regards
Ramkumar Raghavan
Java(TM) Plug-in: Version 1.4.2_05
Using JRE version 1.4.2_05 Java HotSpot(TM) Client VM
User home directory = C:\Documents and Settings\AdministratorProxy Configuration: No proxy-
c:clear console window
f:finalize objects on finalization queue
g:garbage collect
h:display this help message
l:dump classloader list
m:print memory usage
o:trigger logging
p:reload proxy configuration
q:hide console
r:reload policy configuration
s:dump system properties
t:dump thread list
v:dump thread stack
x:clear classloader cache
0-5: set trace level to <n>
-
Netlet running on Java 2 Enabled browser
Netlet config: https://test-1.test.com/http://test-1.test.com/portal/NetletConfig?func=loadRes ources
gateway protocol : httpsgateway host : test-1.test.com
gateway port : 443
Java version : 1.4.2_05
Proxy type : direct
Netlet not using proxyNetlet rule 0: local:8098 destination:test-1.test.com:80
Netlet rule 1: local:12386 destination:test-1.test.com:49909
Netlet rule 2: local:49916 destination:test-1.test.com:80
Netlet rule 3: local:12343 destination:test-1.test.com:49999
Netlet rule 4: local:522 destination:TARGET:1503
Netlet rule 5: local:58001 destination:172.16.5.21:80
Netlet rule 6: local:49909 destination:test-1.test.com:49909
Netlet rule 7: local:49909 destination:172.16.5.21:49909
Netlet rule 8: local:58000 destination:test-1.test.com:80
Netlet rule 9: local:30021 destination:TARGET:21
Netlet rule 10: local:10025 destination:TARGET:25
Netlet rule 11: local:10143 destination:TARGET:143
Netlet rule 12: local:30000 destination:TARGET:23
Unable to make server socket at 49909 java.net.BindException: Address already in use: JVM_Bind
Local port configuration -> {myrule=[8098:8098, 12386:12386], IMBKP=[49916:49916, 12343:12343], IM=[58001:58001, 49909:49909, 49909:15345], NetMeeting=[522:522], loopback=[58000:58000], FTP=[30021:30021], IMAP=[10025:10025, 10143:10143], Telnet=[30000:30000]}
Post URL -> https://test-1.test.com/http://test-1.test.com/portal/NetletConfig?func=setLoad edNetlet got connection on port: 58001 from port:15353 to gateway:test-1.test.com on port:443
Netlet showing port warning dialog:58001
Netlet running with JSSE :PDC Disabled
Handshake finished! CipherSuite:SSL_RSA_WITH_RC4_128_MD5 SessionId [Session-2, SSL_RSA_WITH_RC4_128_MD5] PeerHost test-1.test.com*** Applet.init(), first time.Netlet got connection on port: 58001 from port:15357 to gateway:test-1.test.com on port:443Handshake finished! CipherSuite:SSL_RSA_WITH_RC4_128_MD5 SessionId [Session-3, SSL_RSA_WITH_RC4_128_MD5] PeerHost test-1.test.comNetlet got connection on port: 58001 from port:15359 to gateway:test-1.test.com on port:443Handshake finished! CipherSuite:SSL_RSA_WITH_RC4_128_MD5 SessionId [Session-3, SSL_RSA_WITH_RC4_128_MD5] PeerHost test-1.test.comNetlet got connection on port: 58001 from port:15361 to gateway:test-1.test.com on port:443Handshake finished!
***
**
****
**
gateway:test-1.test.com on port:443Handshake finished! CipherSuite:SSL_RSA_WITH_RC4_128_MD5 SessionId [Session-10, SSL_RSA_WITH_RC4_128_MD5] PeerHost test-1.test.comjar:http://localhost:58001/iim/en_US/imres.jar!/com/iplanet/im/c lient/help/help.propertiesNetlet got connection on port: 49909 from port:15435 to gateway:test-1.test.com on port:443Netlet showing port warning dialog:49909Handshake finished!
****
****
test-1.test.comNetlet got connection on port: 58001 from port:15479 to gateway:test-1.test.com on port:443Handshake finished! CipherSuite:SSL_RSA_WITH_RC4_128_MD5 SessionId [Session-12, SSL_RSA_WITH_RC4_128_MD5] PeerHost test-1.test.com****** STARTING APPLET NOW ******
# 18
Hi Everybody,
Thanks for everybody who take part in the discussion and helped solve my issue.
It now works in all the modes after putting the entry "test-1.test.com:443" in "bypass proxy" options in the Internet Explorer.
Thank You.
Best Regards
Ramkumar Raghavan
# 19
Hi Friends,
I thought this posting will help the guys who are facing proxy issue. The culrprit was j2re-1.4.5. This j2re version didn't had the capability to bypass proxy server. SOLUTION: Use the new J2RE 1.5 which has the seperate option of bypassing the proxy. This option is not dependenton the browser "connection settings"
Thanks & Regards
Ramkumar Raghavan