Koozali.org: home of the SME Server

Wildfire Server HowTo:

Offline william_syd

  • ****
  • 1,608
  • +0/-0
  • Nothing to see here.
    • http://www.magicwilly.info
Wildfire Server HowTo:
« Reply #15 on: July 14, 2006, 05:13:22 PM »
Quote from: "jmarcosm"
I followed your instructions and @ when the system start, I can see service wilfire [ok] , but when i try to connect to the admin page, doesn´t work.

I observe when I start wilfire manually the following message:

Starting wildfire

no hup: se añade la salida a <<nohup.out>> (translation: the output is append  to <<nohup.out>>

If have to press the enter key to obtain again the prompt.
If I don´t press the enter key , wildfire never start!

What do you thinK?

Regards Marcos


Marcos,

I don't use Wildfire (yet).

Has it ever worked for you when started from

/opt/wildfire/bin/wildfire start

?
Regards,
William

IF I give advise.. It's only if it was me....

Offline jmarcosm

  • **
  • 59
  • +0/-0
Wildfire Server HowTo:
« Reply #16 on: July 14, 2006, 10:04:41 PM »
I login as root , then I run from /opt/wildfire/bin/wildfire start, and the wildfire server works perfect. ! , if I reboot , even that I can see in the console "service wildfire start [ok]" , the server doesn't work.

Any clues?
...

Offline william_syd

  • ****
  • 1,608
  • +0/-0
  • Nothing to see here.
    • http://www.magicwilly.info
Wildfire Server HowTo:
« Reply #17 on: July 15, 2006, 06:21:53 AM »
I've had a play..

wildfire runs as the user you have logged in as  eg. root

wildfired attemps to run wildfire as user jive.

When run as user jive lots of java/database errors are generated.

To get wildfired to work I made a few changes...


Code: [Select]
#!/bin/sh

# wildfired
#
# chkconfig: 2345 20 80
# description: Used to start and stop the wildfire XMPP server
#
# Script used to start wildfire as daemon
# The script has currently been tested on Redhat Fedora Core 3,
# but should theoretically work on most UNIX like systems
#
# before running this script make sure $WILDFIRE_HOME/bin/wildfire is
# executable by the user you want to run wildfire as
# (chmod +x $WILDFIRE_HOME/bin/wildfire)
#
# This script should be copied into /etc/init.d and linked into
# your default runlevel directory.
# You can find your default runlevel directory by typing:
# grep default /etc/inittab
#
# Link to the directory like follows
# cd /etc/rc<num>.d
# ln -s ../init.d/wildfired $90wildfired
#

# Set this to tell this script where wildfire lives
# If this is not set the script will look for /opt/wildfire, then /usr/local/wildfire
#export WILDFIRE_HOME=

# If there is a different user you would like to run this script as,
# change the following line
#export WILDFIRE_USER=jive

# -----------------------------------------------------------------

# If a wildfire home variable has not been specified, try to determine it
#if [ ! $WILDFIRE_HOME ]; then
# if [ -d "/opt/wildfire" ]; then
# WILDFIRE_HOME="/opt/wildfire"
# elif [ -d "/usr/local/wildfire" ]; then
# WILDFIRE_HOME="/usr/local/wildfire"
# else
# echo "Could not find Wildfire installation under /opt or /usr/local"
# echo "Please specify the Wildfire installation location in environment variable WILDFIRE_HOME"
# exit 1
# fi
#fi


function execCommand() {
OLD_PWD=pwd
       cd /opt/wildfire/bin
# cd $WILDFIRE_HOME/bin
CMD="./wildfire $1"
        $CMD
# su -c "$CMD" $WILDFIRE_USER &
cd $OLD_PWD
}


start() {
execCommand "start"
}

stop() {
execCommand "stop"
}


case "$1" in
start)
start
;;
stop)
stop
;;
*)
echo "Usage $0 {start|stop}"
exit 1
esac

exit 0


I've basically hardcoded the user as root and and the location of wildfire as /opt/wildfire/bin/ and commented out the bit where it tries to determine the wildfire home directory.

The

Code: [Select]
nohup: appending output to nohup.out'

message appears normal for the nohup command. The nohup.out file lives in opt/wildfire/bin and is empty.

All the above was done at the command line. I'll now try to get it to start at boot time.

Note also I have not connected a jabber client only just using the admin web page.

Log files are your friend.
Regards,
William

IF I give advise.. It's only if it was me....

Offline william_syd

  • ****
  • 1,608
  • +0/-0
  • Nothing to see here.
    • http://www.magicwilly.info
Wildfire Server HowTo:
« Reply #18 on: July 15, 2006, 06:30:43 AM »
One other thing..

I run SME in server only mode behind a Smoothwall firewall.

SME lives on the Orange net with a 192.168.2 subdomain.

My desktop lives on the Green net with a 192.168.1 subdomain.

For SME to allow access to the wildfire admin console I had to add my desktops IP to SME via the Server Manager 'Local Networks' page.

Hmm Hope I used the correct terms above. I'm new to all this.
Regards,
William

IF I give advise.. It's only if it was me....

Offline william_syd

  • ****
  • 1,608
  • +0/-0
  • Nothing to see here.
    • http://www.magicwilly.info
Wildfire Server HowTo:
« Reply #19 on: July 15, 2006, 09:52:59 AM »
I now appear to have it running at boot time.

Follow the steps outlined in my first post but use the modified wildfired.

I also modified wildfire. Look for a line starting with nohup. It is near the end.

Insert

Code: [Select]
>>/opt/wildfire/bin/nohup.out

at the end of the line but before the & .

To stop it starting at startup do this..
Code: [Select]
/sbin/e-smith/db configuration setprop wildfired service status disabled

To stop it manually
Code: [Select]
/etc/rc7.d/S90wildfired stop

To start it manually
Code: [Select]
/etc/rc7.d/S90wildfired start

See how all that goes.

Remember, it will be running as root.
Everything assumes it is installed in /opt/wildfire/

Get /opt/wildfire/bin/extra/wildfired working before making it autostart.

Check info.log located in /opt/wildfire/logs . If you don't see something similar to
Code: [Select]
2006.07.15 16:33:51 Started server (unencrypted) socket on port: 5269
2006.07.15 16:33:51 Started plain (unencrypted) socket on port: 5222
2006.07.15 16:33:54 Started SSL (encrypted) socket on port: 5223
2006.07.15 16:33:54 Publish-Subscribe domain: pubsub.192.168.2.10
2006.07.15 16:33:54 Multi User Chat domain: conference.192.168.2.10
2006.07.15 16:33:54 Wildfire 3.0.1 [Jul 15, 2006 4:33:54 PM]
2006.07.15 16:34:02 Admin console listening at:
  http://192.168.2.10:9090
  https://192.168.2.10:9091

it ain't going to work.
Regards,
William

IF I give advise.. It's only if it was me....

Offline billi

  • *
  • 46
  • +0/-0
    • http://applitec.net
Wildfire Server HowTo:
« Reply #20 on: July 16, 2006, 10:01:52 AM »
I too had the start up at a reboot problem. The script that starts wildfire does not allow  it to be run without $1 to be defined. Not being very good at shell scripting I googled the  for a solution and came across this site

http://www.stclair.k12.il.us/tech/meetings/wildfireinstall.htm

Is basically said to write a script file that contained the following.
______________________________
#!/bin/sh

/opt/wildfire/bin/wildfire start
_______________________________

It replaced the info in the /etc/rc.d/init.d/wildfired created as stated in ealier posts in this thread.
It starts the service as root but for now that will have to do

Offline william_syd

  • ****
  • 1,608
  • +0/-0
  • Nothing to see here.
    • http://www.magicwilly.info
Wildfire Server HowTo:
« Reply #21 on: July 16, 2006, 12:08:32 PM »
I too don't know mush about scripting. The little I do now comes from looking at other peoples script and reading documentation.

Docs for Init(start-up scripts) here..

Code: [Select]
/usr/share/doc/initscripts-7.93.24.EL

However that is for a stock linux distro. Your init script then has to be used as per the SME developer docs...

http://mirror.contribs.org/smeserver/contribs//gordonr/devguide/html/devguide.html#AEN2105

Basically you need a script that takes start/stop commands.

You then link it to /etc/rc.d/init.d/e-smith-service which will put the start command in at boot time.
Regards,
William

IF I give advise.. It's only if it was me....

Offline jmarcosm

  • **
  • 59
  • +0/-0
Wildfire Server HowTo:
« Reply #22 on: July 17, 2006, 11:28:51 PM »
I´m not a SME or linux expert but I findout a couple of things:

1) I found some files inside the opt/wildfire/ .... directories with owner root even if I aready  executed the redhut -postinstali.sh script. I no remeber which file (plese search yourself). I guess this is the reason why wildfired doesn't run well with the user jive , and runs perfect with root.

2) I don´t know exactly how the sme start scrips works (S90wildfired) but if I run S90wildfired the script ask for (start|stop) . Looks like this script doesn´t "send" the command start to the wildfired script. If I run manualy the wildfired script ( wildfired start ) everything works. On the other hand if I check with the command /sbin/e-smith/db configuration getprop wildfire status , the answer is alway "enable" even if I stop the service with wildfired stop.
My humble opinion is that there is something wrong in the "connection" between S90wildfired and the script wildfired.

Any comments / clues?

Marcos
...

Offline william_syd

  • ****
  • 1,608
  • +0/-0
  • Nothing to see here.
    • http://www.magicwilly.info
Wildfire Server HowTo:
« Reply #23 on: July 18, 2006, 09:57:34 AM »
I'm currently rebuilding my SME and intend to put as little as possible on it. I'll probably only add ALSA sound, fetchmail (for multiple ISP's) and VMware server. Any additional stuff will go into a Centos 4.3 text based VM.

I can't really help with your problem except to read the SME documentation.

Regarding your points,

1. I think that redhat script is bad on a SME box. It uses 'adduser' from the command line to create a jive user. Maybe a SME guru can give more details.

2. Again, the developer docs will explain where the 'start' command will come from. A quote from the manual (slightly modified)..
Code: [Select]
If your package implements a server or daemon, you will probably want it to be started automatically when the system boots.

The SME Server boots in runlevel 7, so you can get an idea of the startup processes by listing the contents of /etc/rc.d/rc7.d.

These are similar to the init scripts you may be familiar with from other Linux systems, with one important differnce. Instead of pointing to scripts within /etc/rc.d/init.d, all of those init entries are links to /etc/rc.d/init.d/e-smith-service. This is a wrapper which checks the configuration database to see if the service is supposed to be running and if so, starts the service from /etc/rc.d/init.d/whatever.

So for example, you might have:

S90wildfired -> /etc/rc.d/init.d/e-smith-service

The e-smith-service script looks up the name it was invoked with (S90wildfired), drops the prefix (leaving wildfired), checks the configuration database for the "wildfired" service, then if it's supposed to run, does:

/etc/rc.d/init.d/wildfired start


Starting or stopping any service will not affect the database. It works the other way. The database will determine if e-smith-service is allowed to start the service at boot time.
Regards,
William

IF I give advise.. It's only if it was me....

Offline william_syd

  • ****
  • 1,608
  • +0/-0
  • Nothing to see here.
    • http://www.magicwilly.info
Wildfire Server HowTo:
« Reply #24 on: September 03, 2006, 07:55:17 AM »
I've just put a basic cut'npaste Wildfire how-to together here

http://no.longer.valid/phpwiki/index.php/How-To%20install%20Wildfire%20IM%20server

If you use it, let me know how it goes.
Regards,
William

IF I give advise.. It's only if it was me....

sebastian_sw

Wildfire Server HowTo:
« Reply #25 on: January 10, 2007, 01:30:06 AM »
Hi guys,

Im trying to install the wildfire on my SME7.0 and running with some problems regarding POP3 auth i assume.

This is what i did

1.# /opt/wildfire/bin/wildfire start
2. http://<your server>:9090 and set all the setup wizard with the embedded DB
3. Edit /opt/wildfire/conf/wildfire.xml from:

<-- <authorizedUsernames></authorizedUsernames> -->
To
<authorizedUsernames>admin</authorizedUsernames>

And added

<!-- Example POP3 Authentication-->
<provider>
<auth>
<className>org.jivesoftware.wildfire.auth.POP3AuthProvider</className>
</auth>
<user>
<className>org.jivesoftware.wildfire.user.POP3UserProvider</className>
</user>
</provider>
<pop3>
<host>My Host</host>
<domain>My Domain</domain>
<authRequiresDomain>false</authRequiresDomain>
<ssl>false</ssl>
</pop3>
<!-- End example POP3 Authentication-->

Now im able to log on to http://server:9090 with admin password without a problem.

BUT when i try to log users within the Jabber clients i get rejected.

The Jabber Clients (Pandion) where working finewith other SME Box.

These are my Wildfire Loggs when try to log a client:

2007.01.09 21:23:32 [org.jivesoftware.wildfire.auth.POP3AuthProvider.authenticate(POP3AuthProvider.java:153)]
javax.mail.AuthenticationFailedException: authorization failed
at com.sun.mail.pop3.POP3Store.protocolConnect(POP3Store.java:146)
at javax.mail.Service.connect(Service.java:275)
at org.jivesoftware.wildfire.auth.POP3AuthProvider.authenticate(POP3AuthProvider.java:149)
at org.jivesoftware.wildfire.auth.AuthFactory.authenticate(AuthFactory.java:156)
at org.jivesoftware.wildfire.net.SASLAuthentication.doPlainAuthentication(SASLAuthentication.java:339)
at org.jivesoftware.wildfire.net.SASLAuthentication.handle(SASLAuthentication.java:175)
at org.jivesoftware.wildfire.net.SocketReadingMode.authenticateClient(SocketReadingMode.java:117)
at org.jivesoftware.wildfire.net.BlockingReadingMode.readStream(BlockingReadingMode.java:136)
at org.jivesoftware.wildfire.net.BlockingReadingMode.run(BlockingReadingMode.java:62)
at org.jivesoftware.wildfire.net.SocketReader.run(SocketReader.java:123)
at java.lang.Thread.run(Unknown Source)


Any Clue?

Many Thanks
Seb.-