Showing posts with label xmpp. Show all posts
Showing posts with label xmpp. Show all posts

Friday, 18 September 2015

Tigase 5.2 and Spark Authentication failed

The messages noted during the login on tigase.0.log are:


18.085 [ConnectionOpenThread]  ConnectionManager$ConnectionListenerImpl.accept()  FINEST: Accept called for service: null@null
2014-04-29 23:46:18.086 [ConnectionOpenThread]  ConnectionManager.serviceStarted()  FINER: [[c2s]] Connection started: null, type: accept, Socket: nullSocket[addr=/192.168.10.40,port=55458,localport=5222], jid: null
2014-04-29 23:46:18.104 [pool-11-thread-4]  ClientConnectionManager.xmppStreamOpened()  FINER: Stream opened: {xmlns:stream=http://etherx.jabber.org/streams, to=192.168.10.40, xmlns=jabber:client, version=1.0}
2014-04-29 23:46:18.106 [pool-11-thread-4]  ConnectionManager.serviceStopped()  FINER:  [[c2s]] Connection stopped: c2s@space01.local/192.168.10.40_5222_192.168.10.40_55458, type: accept, Socket: c2s@space01.local/192.168.10.40_5222_192.168.10.40_55458 Socket[unconnected], jid: null
2014-04-29 23:46:18.108 [pool-11-thread-4]  ClientConnectionManager.xmppStreamClosed()  FINER: Stream closed: c2s@space01.local/192.168.10.40_5222_192.168.10.40_55458
2014-04-29 23:46:42.625 [hostnames]        UserRepoRepository.reload()        CONFIG:   All loaded items: {local=Domain: local, enabled: true, anonym: true, register: true, maxusers: 0, tls: false, s2sSecret: null, domainFilter: ALL}
2014-04-29 23:47:42.625 [hostnames]        UserRepoRepository.reload()        CONFIG:   All loaded items: {local=Domain: local, enabled: true, anonym: true, register: true, maxusers: 0, tls: false, s2sSecret: null, domainFilter: ALL}
2014-04-29 23:48:42.627 [hostnames]        UserRepoRepository.reload()        CONFIG:   All loaded items: {local=Domain: local, enabled: true, anonym: true, register: true, maxusers: 0, tls: false, s2sSecret: null, domainFilter: ALL}
2014-04-29 23:49:42.624 [hostnames]        UserRepoRepository.reload()        CONFIG:   All loaded items: {local=Domain: local, enabled: true, anonym: true, register: true, maxusers: 0, tls: false, s2sSecret: null, domainFilter: ALL}
2014-04-29 23:50:42.625 [hostnames]        UserRepoRepository.reload()        CONFIG:   All loaded items: {local=Domain: local, enabled: true, anonym: true, register: true, maxusers: 0, tls: false, s2sSecret: null, domainFilter: ALL}
2014-04-29 23:51:42.624 [hostnames]        UserRepoRepository.reload()        CONFIG:   All loaded items: {local=Domain: local, enabled: true, anonym: true, register: true, maxusers: 0, tls: false, s2sSecret: null, domainFilter: ALL}
2014-04-29 23:52:42.629 [hostnames]        UserRepoRepository.reload()        CONFIG:   All loaded items: {local=Domain: local, enabled: true, anonym: true, register: true, maxusers: 0, tls: false, s2sSecret: null, domainFilter: ALL}
2014-04-29 23:53:42.625 [hostnames]        UserRepoRepository.reload()        CONFIG:   All loaded items: {local=Domain: local, enabled: true, anonym: true, register: true, maxusers: 0, tls: false, s2sSecret: null, domainFilter: ALL}
2014-04-29 23:54:42.628 [hostnames]        UserRepoRepository.reload()        CONFIG:   All loaded items: {local=Domain: local, enabled: true, anonym: true, register: true, maxusers: 0, tls: false, s2sSecret: null, domainFilter: ALL}
2014-04-29 23:55:42.626 [hostnames]        UserRepoRepository.reload()        CONFIG:   All loaded items: {local=Domain: local, enabled: true, anonym: true, register: true, maxusers: 0, tls: false, s2sSecret: null, domainFilter: ALL}
2014-04-29 23:56:42.629 [hostnames]        UserRepoRepository.reload()        CONFIG:   All loaded items: {local=Domain: local, enabled: true, anonym: true, register: true, maxusers: 0, tls: false, s2sSecret: null, domainFilter: ALL}


Solution :

step 1:

init.propertis files make as

config-type=--gen-config-all
--admins=admin@localhost
--virt-hosts = localhost
--debug=server,xmpp.impl
--cluster-mode=false
--tigase-cache=false
--user-db=pgsql
--user-db-uri=jdbc:postgresql://localhost:5432/tigase?user=tigase

step 2:

Now in spark if there is ssl method is check then uncheck it and try for login now. I follow these steps and i am enable for login.



Saturday, 30 May 2015

Spark cannot connect to Openfire Server

If you try login or new register using spark to openfire and openfire runing but you are enable to connect openfire .
  
   you can connect to openfire by other system using spark then change advanced setting of spark
  

   Go to advanced tab of spark and check use old SSL port method


how to install spark on ubuntu

Step 1:


  download spark  click here
 
   or

 use this command

wget http://download.igniterealtime.org/spark/spark_2_6_3.tar.gz

 

step 2: 

  Now  extract tar file Using this command

 tar -zxvf spark_2_7_0.tar.gz

and it makes Spark folder

Step 3:
  
  Now  go to in Spark  folder and run this Command

Dell-System-Inspiron-N4110:~/Spark$  ./Spark


After this you can see spark windows






Saturday, 4 April 2015

Get Roster List From XMPP IM with Smack API in Java Application

package com.javaproficiency.demo;

import java.util.Collection;

import org.jivesoftware.smack.ConnectionConfiguration;
import org.jivesoftware.smack.Roster;
import org.jivesoftware.smack.RosterEntry;
import org.jivesoftware.smack.XMPPConnection;
import org.jivesoftware.smack.XMPPException;

public class GETRoster {
    public static void main(String[] args) {
        GETRoster getRoster = new GETRoster();
        XMPPConnection connection = getRoster.Connect();


       // Login User
        getRoster.loginUser(connection);
  
    // Get Roster Of Login User
        Roster roster = connection.getRoster();
        Collection<RosterEntry> entries = roster.getEntries();
        for (RosterEntry entry : entries) {
            System.out.println("name=" + entry.getName() + "userName="
                    + entry.getUser());
        }
        connection.disconnect();
    }
   
    public void loginUser(XMPPConnection connection){
        try {
            connection.login("userName","Password");
        } catch (XMPPException e) {
           
            e.printStackTrace();
        }
    }

    /**
     *
     * @return XMPP Connection
     */

    public XMPPConnection Connect() {

        ConnectionConfiguration config = new ConnectionConfiguration(
                "localhost", 5222);

        /*
         * ConnectionConfiguration config = new ConnectionConfiguration(
         * "192.163.2.200", 5222);
         */
        XMPPConnection connection = new XMPPConnection(config);
        try {
            connection.connect();
        } catch (XMPPException e) {

            e.printStackTrace();
        }
        return connection;
    }

}

Connecting to XMPP IM with Smack for Java applications

We will connect to openfire server using smack api

package com.javaproficiency.demo;

import org.jivesoftware.smack.ConnectionConfiguration;
import org.jivesoftware.smack.XMPPConnection;
import org.jivesoftware.smack.XMPPException;

public class SmackDemo {
    public static void main(String[] args) {
          SmackDemo smackDemo=new  SmackDemo();

          XMPPConnection connection=smackDemo.XMPPConnection();




        
          System.out.println("Connecting to="+connection.getHost()+"  Post:"+connection.getPort());
    }

    public XMPPConnection XMPPConnection() {
        ConnectionConfiguration config = new ConnectionConfiguration(
                "host", "port");

        /*
         * ConnectionConfiguration config = new ConnectionConfiguration(
         * "192.163.2.200", 5222);
         */
        XMPPConnection connection = new XMPPConnection(config);
        try {
            connection.connect();
        } catch (XMPPException e) {
       
            e.printStackTrace();
        }
        return connection;
    }
}