Unable to connect with Sparkweb over Internet

I’m able to run Sparkweb on the Openfire server and from other internally connected PCs/Servers. However, when I try to run SparkWeb over the Internet, the application doesn’t login.

I can inupt my userID (ewto), server(deathstar), and password(ewto1), but once I click the login button the application seems to just hang. I have the following settings.

server: “my external IP”,

port: “7070”,

bindPath: “/http-bind/”,

connectionType: “http”,

autoLogin: “false”

any tips?

bump for some help

You need to have the ports open on your firewall. You need to to use the Fully Qualified Domain Name of the chat server, which should be the name the chat server wwas given when it was configured. The FQDN needs to be resolved by external DNS.

I have the port opened on my firewall.

I am using the external IP address, and not the FQDN as you suggest, but I would think the IP address would work. I’m not sure why the FQDN would match the server name.

For example, my Server is named Pepsi, so my FQDN can’t be Sparkweb.Pepsi.com, or Pepsi.mycompany.com. Those two things don’t really match in any way.

Can you maybe explain the FQDN part a bit more clearly?

If I access my server at http://111.111.111.111/ and I have that as the settings in SparkWeb, should it matter that I’m not using a FQDN?

Thanks for your help!!

I added the error I am apparently getting in the log.

2008.07.15 11:07:03 [org.jivesoftware.openfire.container.PluginManager$PluginMonitor.unzipPlugin(Pl uginManager.java:1084)

]

java.util.zip.ZipException: error in opening zip file

at java.util.zip.ZipFile.open(Native Method)

at java.util.zip.ZipFile.<init>(Unknown Source)

at java.util.jar.JarFile.<init>(Unknown Source)

at java.util.jar.JarFile.<init>(Unknown Source)

at org.jivesoftware.openfire.container.PluginManager$PluginMonitor.unzipPlugin(Plu ginManager.java:1047)

at org.jivesoftware.openfire.container.PluginManager$PluginMonitor.run(PluginManag er.java:938)

at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)

at java.util.concurrent.FutureTask$Sync.innerRunAndReset(Unknown Source)

at java.util.concurrent.FutureTask.runAndReset(Unknown Source)

at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101 (Unknown Source)

at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodi c(Unknown Source)

at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknow n Source)

at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

at java.lang.Thread.run(Unknown Source)

I could only get sparkweb to work when its server setting matched the openfire server name as found in the openfire admin website. This should also match your xmpp.domain name in the openfire server properties. Unless all these settings matched I could not get sparkweb to connect.

Thanks for the tip. I have the following in the sparkweb.html file

<script type=“text/javascript”>

function jive_sparkweb_getConfig()

{

return {

server: “pepsi”,

port: “7070”,

bindPath: “/http-bind/”,

connectionType: “http”,

autoLogin: “false”

};

}

</script>

I checked the server settings as you suggested and the server is named pepsi. The xmpp.domain is also pepsi.

I still can’t connect.

I have the Sparkweb folder in the wwwroot folder on IIS. Does it matter where I have that folder running from?

When I try to login, Sparkweb just sits there and does nothing. It never errors out and it never times out.

that is because pepsi is not a FQDN that can be discoved via DNS external to your local domain. It would need to be pepsi.domain.com, for an example. Like mine is mtschat.ad.mtstravel.com. My sparkweb config then is:

<script type=“text/javascript”>

function jive_sparkweb_getConfig()

{

return {

server: “someserver.domain.com”,

port: “7070”,

bindPath: “/http-bind/”,

connectionType: “http”,

autoLogin: “false”

};

}

</script>

and

that is my Openfire server name and xmpp.domain.

additionally that means you need to make sure there is an a record in your external DNS for the chat server.

pardon my ignorance as this is probably not going to be of any help… but since sparkweb is hosted on the same network as your openfire server (i am assuming) then wouldn’t it use the local ip to find the openfire server rather than the external one?

Hmmm…that might be difficult to do. I’m not sure I can rename the server at this point, since it is a production box. Hate to take some people off line.

I guess I need another server to experiement with that on and see if that is the real issue. My main concern is that I read that Spark isn’t really going to be supported much going forward and the focus is going to be on Sparkweb.

Thanks for all your help!! I guess I’m stuck until I can try what you suggest.

Now if only I could get fastpath to work…

Well, that is what I thought as well, but apparently that isn’t the case. If I run Sparkweb locally from the same server as Openfire, it works fine. If I run Sparkweb from another server within the network, it also works fine.

When I try to connect from outside the local network, it never connects. It just hangs there looking like it is logging in.

Just ran a test… I was able to connect from outside using my external ip address, not internal. I have a feeling you may have a port forwarding issue. If you already are accessing your server externally via a spark client, I would suggest changing your sparkweb config settings to match the same port you are citing in those clients (port 5222?). If this change allows you to connect it should be pretty easy to troubleshoot to add the 7070 port .

My guess would be that though you have the port open on your firewall you may not have the NAT to your IM server listening on that port.

My point exactly. External web hosts would need an address that can be queried by an external DNS server. Internal hosting would work with your internal DNS but external connections would never find it. That is why you need a FQDN instead of a WINS or SMB name. Simple windows naming does not work for this.

Note: I do not have http bind enabled.

My sparkweb settings were default.

return {

server: "igniterealtime.org",
          connectionType: "socket",
          port: "5222",
          autoLogin: "false"
     };

It may well be true that there is a port mapping issue, but i can assure you that I do not have that problem and direct IP and port do not work for me for sparkweb. My server is available to my users from anywhere in the world or internal via any client or sparkweb.

agreed.

I think it may be an instance of dialect ip-ese v. dns-ese.

same issue.

Yes, well there are a number of ways to crack an egg. I have little knowledge about how everyone has their systems set up. It sounds though as if in this case the network admin has a firewall and router scheme that s/he uses to NAT ports from an external ip to an internal ip. In which case, it would make sense to check the port mappings. I also have a world-wide accessible server. We use an external ip to access our server and use NAT to map appropriate ports on that external ip to openfire.

I am unaware of the caveats of your specific network & server scheme. But it seems that whether you are using a fqdn or an external ip although you are approaching the same issue from different perspectives you still would need to satisfy the same demands.

Changing my setting to something like yours, which I included below, results in getting a login error message, but now I can’t connect successfully internally or externally.

<script type=“text/javascript”>

function jive_sparkweb_getConfig()

{

return {

server: “pepper”,

port: “5222”,

connectionType: “socket”,

autoLogin: “false”

};

}

</script>

I really don’t understand why this is so complicated. I can use the Spark client to connect with no problem.

I guess, I’m just at a loss why if I use the external IP address in the Sparkweb settings and connect with the external IP, it doesn’t work. There shouldn’t be a difference between using the external IP and the FQDN. The two things below should be equal:

http://www.mysparkweb.com

http://111.111.111.111

Do I need to use the IP address when I login? so and password?

  • simply put you need to have your firewall allow the traffic for the ports you want to have access your chat server forward from your external IP to your internal IP or NAT address. You could do this for all openfire ports that are used for chat client or sparkweb.

  • next you should setup an A record on your external DNS to point at that IP you just port forwarded (web addresses are easier for most to remember).

  • point your sparkweb at the external DNS setting, with http-bind.

  • test.

There is no cheating this system. Ideally your chat server should have the sam full name internally and externally. Not just pepsi but pepsi.somedomain.com. You need a full address name to resolve addresses external to you local network.