Openfire 3.9.1 Doesn't Open Ports

I’m just migrated from 3.9.1 Windows to 3.9.1 Linux and it went well. I am having a issue that when I restart the openfire service it is not opening all the ports. The admin console runs on 9090 and 9091 but nothing else does. If I go into the console and change the ports say from 5222 to 5888 and then back to 5222 then 5222 works again.

I have been reading in the forums of other people having this issue but no real solutions. Something about urandom and when openfire starts it hangs on opening ports or something to that effect.

Ubuntu 12.04 Server x64

OpenJDK 6

MySQL

Try Oracle JDK 7

I thought about JDK 7 and I had that when I first setup the server but I am using Fastpath and it doesn’t want to work properly with JDK 7 installed.

I have fastpath installed in Tomcat7 I suppose I could install both java 6 and 7 and force tomcat7 to 6 and openfire to 7 but that is a little past my linux knowledge at this time.

I was reading up more last night and I seen acouple of posts that if i used Centos rather then Ubuntu that it would work better. This I can do if it would work.

Java Version:
1.7.0_51 Oracle Corporation – Java HotSpot™ 64-Bit Server VM
Appserver:
jetty/7.x.y-SNAPSHOT
Host Name:

OS / Hardware:
Linux / amd64
Locale / Timezone:
en / Eastern Standard Time (-5 GMT)
Java Memory



37.68 MB of 1774.50 MB (2.1%) used

Still have the issues when I start up Openfire that the ports don’t open. Only 9090 and 9091 open but if i change all the ports to different #'s and back again then the rest open up.

I’m going to try a new install of Ubuntu with just Oracle Java and not install any of the openJDK stuff.

make sure your firewall is allowing those ports of course. also depending on the default tomcat config from the ubuntu package manager repo, it may conflict with the jetty server built into openfire.

usually the tomcat configs in most distros are located in /etc/tomcat or /usr/share/tomcat

the ports don’t even show up in the openfire web admin site as ports which are in use. After i change them and change them back then they show up. I have completely turned off the firewall and it still goes on. It is as if during startup it hangs on opening ports. there are posts about the same thing in past versions.

a similar question for ubuntu and ports failing to open for another xmpp server: http://askubuntu.com/questions/201462/why-does-ejabberd-start-fail

seems it was related to having a bad server setup…

in your screenshot above, there is nothing in “Server Hostname:”… I assume it’s because you blanked it out. Is that a FQDN or did you make it an IP address? It should be a FQDN, and your /etc/hosts file should have an entry so your server knows whwere that FQDN is located (itself).

As a sidenote: there’s no reason to run java6 anymore, even with tomcat7… eveything will run just fine on java7. openjdk and oracel’s jdk have some minor differences… from what i’ve noted it’s usually how the GUI Swing and AWT components gets rendered on different OS’s… but this won’t (shouldn’t) affect openfire since it’s using niether.

THis sounds promising with the FQDN.

just know you cannot change it after the install… if you picked an IP address during setup, you will have to re-do the setup.

So the server name is connected.domain.com of the linux install

Openfire Server Name: conencted.domain.com

Enviroment Host Name: connected.domain.com

hosts file

1.2.3.4 connected.domain.com connected

Still hangs the ports when starting up.

Run “jstack OPENFIRE-PID >stacktrace.date +%s.txt” a few times. In the files you should see which thread is hanging.

Is there anything I should be looking for the logs? Not a big linux person.

you could post the logs here. click the “undefined” button in the top left corner and you will be able to attach files.

I did this just after I started openfire. Not sure if you need that or more.
stacktrace.1398154351.txt.zip (3343 Bytes)

The trace looks a little bit odd. I wonder what’s going on. Normally there should be no BLOCKED port 9090 thread.

Would you please remove the archive plugin, start again and create a new stacktrace. There is quite a long stack in your trace accessing Mysql. Hopefully this helps.

Anyhow I think that some custom properties cause these issues.

My message archive is quite big, what looks like is happening is when Openfire starts and it gets to the plugins there is a lot of MySQL usage going on when the archive plugin loads and until this is done it locks up everything else. Today I killed the DB connections during this time and right away the server finshed starting normally. Would this explain what I am seeing with the ports?

I am starting to wonder if there is something wrong with my archive DB. If I go into the plugin and reduce the number of days to archive it does nothing but from what I read it should delete all the archives from before x days.

So I deleted the ofMessageArchive and remade it using this from the monitoring pluging mysql file. The index was missing in my tables wow what a different now in speeds. I can pull weeks and it is almost instant now.

CREATE TABLE ofMessageArchive (

conversationID BIGINT NOT NULL,

fromJID VARCHAR(255) NOT NULL,

fromJIDResource VARCHAR(100) NULL,

toJID VARCHAR(255) NOT NULL,

toJIDResource VARCHAR(100) NULL,

sentDate BIGINT NOT NULL,

body TEXT,

INDEX ofMessageArchive_con_idx (conversationID)

);

CREATE TABLE ofRRDs (

id VARCHAR(100) NOT NULL,

updatedDate BIGINT NOT NULL,

bytes MEDIUMBLOB NULL,

PRIMARY KEY (id)

);

I also fixed the index from ofConversation and ofConParticipant

These don’t seem to be getting recreate when you install the plugin.