Quantcast
Channel: Ignite Realtime: Message List
Viewing all 12000 articles
Browse latest View live

Re: Spark on KDE 5


Re: Add users besides Active Directory to OpenFire

$
0
0

This is not possible. You either use AD users or only custom users. No mixing.

XMPP File Transfer Error: refused cancelled error The peer did not find any of the provided stream mechanisms acceptable.

$
0
0

First i run the 2nd user which executes fine but while running the 1st user i get the "refused cancelled error The peer did not find any of the provided stream mechanisms acceptable." error. How do i resolve it? 

 

XmppTest : this is my 1st user for conversation.

 

package com.javacodegeeks.xmpp;

import java.util.Scanner;

 

public class XmppTest {

 

  public static void main(String[] args) throws Exception {

 

  String username = "tupa616684";

  String password = "12345678";

 

  XmppManager xmppManager = new XmppManager("127.0.0.1", 5222);

 

  xmppManager.init();

  xmppManager.performLogin(username, password);

  xmppManager.setStatus(true, "Hello everyone");

 

  String buddyJID = "dhvi427017@yob-dtp-12-stu5tpa";

  String buddyName = "dhvi427017";

  xmppManager.createEntry(buddyJID, buddyName);

 

  xmppManager.sendMessage(null, "dhvi427017@yob-dtp-12-stu5tpa");

  //System.out.println("aaaaaaaaaaaaaaaaa"+xmppManager.getUsers().size());

  xmppManager.send();

  boolean isRunning = true;

  int i=0;

  while (isRunning) {

  //Thread.sleep(10000);

  Scanner reader = new Scanner(System.in);  // Reading from System.in

  System.out.println("Enter a message: ");

  String n = reader.nextLine();

  xmppManager.sendMessage(n, "dhvi427017@yob-dtp-12-stu5tpa");

  }

 

  xmppManager.destroy();

 

  }

}

 

XmppTestUser : This is my 2nd user of conversation.

 

package com.javacodegeeks.xmpp;

import java.util.Scanner;

 

public class XmppTestUser {

 

  public static void main(String[] args) throws Exception {

 

  String username = "dhvi427017";

  String password = "12345678";

 

  XmppManager xmppManager = new XmppManager("127.0.0.1",5222);

 

  xmppManager.init();

  xmppManager.performLogin(username, password);

  xmppManager.setStatus(true, "Hello everyone");

 

  /*String buddyJID = "prashant@yob-ltp-20-dvi";

  String buddyName = "prashant";

  xmppManager.createEntry(buddyJID, buddyName);*/

 

  xmppManager.sendMessage("Hello ADMIN", "tupa616684@yob-dtp-12-stu5tpa");

  xmppManager.receive();

  xmppManager.printRoster();

 

  boolean isRunning = true;

  int i=0;

  while (isRunning) {

  Scanner reader = new Scanner(System.in);  // Reading from System.in

  System.out.println("Enter a message: ");

  String n = reader.nextLine();

 

  //Thread.sleep(12000);

  xmppManager.sendMessage(n, "tupa616684@yob-dtp-12-stu5tpa");

  }

 

  xmppManager.destroy();

  }

}

 

XmppManager : This is a manager file which contains required methods.

 

package com.javacodegeeks.xmpp;

 

import java.io.File;

import java.util.ArrayList;

import java.util.Collection;

import java.util.HashMap;

 

 

import org.jivesoftware.smack.Chat;

import org.jivesoftware.smack.ChatManager;

import org.jivesoftware.smack.ConnectionConfiguration;

import org.jivesoftware.smack.MessageListener;

import org.jivesoftware.smack.Roster;

import org.jivesoftware.smack.RosterEntry;

import org.jivesoftware.smack.SmackConfiguration;

import org.jivesoftware.smack.XMPPConnection;

import org.jivesoftware.smack.XMPPException;

import org.jivesoftware.smack.ConnectionConfiguration.SecurityMode;

import org.jivesoftware.smack.packet.Message;

import org.jivesoftware.smack.packet.Presence;

import org.jivesoftware.smack.packet.Presence.Type;

import org.jivesoftware.smackx.filetransfer.FileTransferListener;

import org.jivesoftware.smackx.filetransfer.FileTransferManager;

import org.jivesoftware.smackx.filetransfer.FileTransferRequest;

import org.jivesoftware.smackx.filetransfer.IncomingFileTransfer;

import org.jivesoftware.smackx.filetransfer.OutgoingFileTransfer;

import org.jivesoftware.smackx.filetransfer.FileTransfer.Status;

 

 

public class XmppManager {

 

  private static final int packetReplyTimeout = 500; // millis

 

  private String server;

  private int port;

 

  private ConnectionConfiguration config;

  private XMPPConnection connection;

 

  private ChatManager chatManager;

  private MessageListener messageListener;

 

  public XmppManager(String server, int port) {

  this.server = server;

  this.port = port;

  }

 

  public void init() throws XMPPException {

 

  System.out.println(String.format("Initializing connection to server %1$s port %2$d", server, port));

 

 

  SmackConfiguration.setPacketReplyTimeout(packetReplyTimeout);

 

  config = new ConnectionConfiguration(server, port);

  config.setSASLAuthenticationEnabled(false);

  config.setSecurityMode(SecurityMode.disabled);

 

  connection = new XMPPConnection(config);

  connection.connect();

 

  System.out.println("Connected: " + connection.isConnected());

 

  chatManager = connection.getChatManager();

  messageListener = new MyMessageListener();

 

  }

 

  public void performLogin(String username, String password) throws XMPPException {

  if (connection!=null && connection.isConnected()) {

  connection.login(username, password);

  }

  }

 

  public void setStatus(boolean available, String status) {

 

  Presence.Type type = available? Type.available: Type.unavailable;

  Presence presence = new Presence(type);

 

  presence.setStatus(status);

  connection.sendPacket(presence);

 

  }

 

  public void destroy() {

  if (connection!=null && connection.isConnected()) {

  connection.disconnect();

  }

  }

 

  public void printRoster() throws Exception {

  Roster roster = connection.getRoster();

  Collection<RosterEntry> entries = roster.getEntries();

  for (RosterEntry entry : entries) {

     System.out.println(String.format("Buddy:%1$s - Status:%2$s",

      entry.getName(), entry.getStatus()));

  }

  }

 

  public void sendMessage(String message, String buddyJID) throws XMPPException {

  System.out.println(String.format("Sending mesage '%1$s' to user %2$s", message, buddyJID));

  Chat chat = chatManager.createChat(buddyJID, messageListener);

  chat.sendMessage(message);

  }

 

  public void createEntry(String user, String name) throws Exception {

  System.out.println(String.format("Creating entry for buddy '%1$s' with name %2$s", user, name));

  Roster roster = connection.getRoster();

  roster.createEntry(user, name, null);

  }

 

  class MyMessageListener implements MessageListener {

 

 

  @Override

  public void processMessage(Chat chat, Message message) {

  String from = message.getFrom();

  String body = message.getBody();

  if(body !=null){

  System.out.println(String.format("'%1$s' from %2$s", body, from));

  }

 

  }

 

  }

 

  public ArrayList<HashMap<String, String>> getUsers(){

     ArrayList<HashMap<String, String>> usersList=new ArrayList<HashMap<String, String>>();

     Presence presence = new Presence(Presence.Type.available);

     connection.sendPacket(presence);

     final Roster roster = connection.getRoster();

     Collection<RosterEntry> entries = roster.getEntries();

 

     for (RosterEntry entry : entries) {

 

             HashMap<String, String> map = new HashMap<String, String>();

             Presence entryPresence = roster.getPresence(entry.getUser());

 

             Presence.Type type = entryPresence.getType();      

 

             map.put("USER", entry.getName().toString());

             map.put("STATUS", type.toString());

             usersList.add(map);

 

     }

  return usersList;

  }

  public void send() throws XMPPException{

  XmppManager xmppManager = new XmppManager("127.0.0.1", 7777);

  //xmppManager.init();

  xmppManager.performLogin("tupa616684", "12345678");

 

  SmackConfiguration.setPacketReplyTimeout(packetReplyTimeout);

 

  config = new ConnectionConfiguration(server, port);

  config.setSASLAuthenticationEnabled(false);

  config.setSecurityMode(SecurityMode.disabled);

 

  connection = new XMPPConnection(config);

  connection.connect();

  FileTransferManager manager = new FileTransferManager(connection);

  OutgoingFileTransfer transfer = manager.createOutgoingFileTransfer("dhvi427017@yob-dtp-12-stu5tpa");

  File file = new File("C:\\Users\\Tushar.Patil\\Desktop\\scopeList.txt");

  try {

    transfer.sendFile(file, "scopeList.txt");

  } catch (XMPPException e) {

    e.printStackTrace();

  }

  while(!transfer.isDone()) {

    if(transfer.getStatus().equals(Status.error)) {

       System.out.println("ERROR!!! " + transfer.getError());

    } else if (transfer.getStatus().equals(Status.cancelled)

                     || transfer.getStatus().equals(Status.refused)) {

       System.out.println("Cancelled!!! " + transfer.getError());

    }

    try {

       Thread.sleep(1000L);

    } catch (InterruptedException e) {

       e.printStackTrace();

    }

  }

  if(transfer.getStatus().equals(Status.refused) || transfer.getStatus().equals(Status.error)

  || transfer.getStatus().equals(Status.cancelled)){

    System.out.println("refused cancelled error " + transfer.getError());

  } else {

    System.out.println("Success");

  }

  }

 

  public void receive(){

 

  FileTransferManager manager = new FileTransferManager(connection);

 

  manager.addFileTransferListener(new FileTransferListener() {

    public void fileTransferRequest(final FileTransferRequest request) {

       new Thread(){

          @Override

          public void run() {

             IncomingFileTransfer transfer = request.accept();

             //File mf = Environment.getExternalStorageDirectory();

             File file = new File("C:\\Users\\Tushar.Patil\\Desktop\\" + transfer.getFileName());

             try{

                 transfer.recieveFile(file);

                 while(!transfer.isDone()) {

                    try{

                       Thread.sleep(1000L);

                    }catch (Exception e) {

                    }

                    if(transfer.getStatus().equals(Status.error)) {

                    }

                    if(transfer.getException() != null) {

                       transfer.getException().printStackTrace();

                    }

                 }

              }catch (Exception e) {

             }

          };

        }.start();

     }

  });

  }

 

}

Re: Problem in using the SSO with Windows 2012R2(AD) and Spark.

$
0
0

Theoretically we can make it work here.

It was verified via wireshark with the search filter with the word "Kerberos" and did not return the domain. But the subdomain for example "talk.xxx.xxx.xxx" and not as I wanted it to be. If only the domain "xxx.xxx.xxx".

Now this all working properly.

What is the character limit for ldap.searchfilter

$
0
0

I've added a group to my ldap.searchfilter property and I am no longer able to login to the openfire console.

It worked fine with 2 groups and one additional filter to limit disabled accounts... but when adding in another group it kills the ability to find the users during authentication.

 

Here is the one that worked:

(&(objectCategory=person)(objectClass=user)(!(userAccountControl:1.2.840.113556. 1.4.803:=2))(|(memberOf=CN=IM_M,OU=Groups,DC=SCSDU,DC=local)(memberOf=CN=IM_U,OU =Groups,DC=SCSDU,DC=local)))

 

Here is the one that did not work:

(&(objectCategory=person)(objectClass=user)(!(userAccountControl:1.2.840.113556. 1.4.803:=2))(|(memberOf=CN=IM_M,OU=Groups,DC=SCSDU,DC=local)(memberOf=CN=IM_SDU, OU=Groups,DC=SCSDU,DC=local)(memberOf=CN=IM_U,OU=Groups,DC=SCSDU,DC=local)))

 

I've tried using wildcards IM_* and IM_% to shorten the group section, but they don't work.

I'd like to know the character limit for this field, and ask if anyone can adjust my filter to make it work better (shorter?)

 

Thanks

 

Rich

Erropr Inisio de sesion con Spark

$
0
0

Buenos días a todos espero me puedan colaborar

Tengo un servidor de Open fire integrado con Asterisk he creado todo los usuarios para que inicien sesion por medio de spark, he validado la contraseña y al iniciar sesion con la aplicacion me dice que usuario o contraseña incorrecto aunque estoy seguro de haberlos escrito bien, de hecho uno de ellos tiene permiso de administrador puedo inicar sesion al administrador de Open Fire sin problemas, pero al ingresar al spark me dice que usuario o contraseña incorrectos.

Captura1.PNG

 

Captura2.PNG

Captura3.PNG

 

agradeceria cualquier ayuda

Re: Problema na utilização do SSO com Windows 2012R2(AD) e Spark

$
0
0

Teoricamente conseguimos fazer funcionar aqui.

 

Foi verificado via wireshark com o filtro de pesquisa com a palavra "Kerberos" e não retornava o dominio. Mas sim o subdominio por exemplo "talk.xxx.xxx.xxx" e não  como eu queria que fosse. No caso só o dominio " xxx.xxx.xxx".

 

Agora esta tudo funcionando corretamente.

Re: Erropr Inisio de sesion con Spark


Re: Receiving new Spark message opens window but doesn't display message

$
0
0

I also just realized that Spark has one other odd behavior for me: when I double click on a contact in my list, it will open a new tab in my chat window for that contact, but the window doesn't come to the top--it flashes and stays hidden behind all my other windows. If I bring the chat window up on top of my other windows, it has the new tab for the contact I just double clicked, but that tab isn't the selected one, whatever tab I was on before is still selected.

 

I'm not 100% sure they're related, and if not, this is not an issue that I would bother to report. If it is related, I thought this may give you a hint as to what's going wrong.

Re: Spark and XEP-0106: JID Escaping

$
0
0

I suppose you have already tested this with 2.8.0 version?

Re: Spark on KDE 5

$
0
0

I have also filed links opening on KDE as https://issues.igniterealtime.org/browse/SPARK-1801  and Alexander has provided a fix for it. Couldn't test it myself. Wasn't able to install Kubuntu in my VirtualBox environment because of some weird visual issues. But you can try the latest build:

https://bamboo.igniterealtime.org/browse/SPARK-NIGHTLYDEB-608/artifact/JOB1/Debi an/spark-messenger_2.8.0_all.deb

https://bamboo.igniterealtime.org/artifact/SPARK-INSTALL4J/shared/build-896/Inst all4j/spark_2_8_0_896.tar.gz

 

Again. Links worked fine for me on Ubuntu\Xubuntu\Windows with or without this fix. Fix itself Added support for open link which pointed to Spark forum when user uses KDE by Alexander198961 · Pull Request #218 · ign…

Chating between two client.

$
0
0

Hi All,

 

Two user can chat between each other in client server architecture.

Architecture look like this:

 

Client1<-->gateway<-->SEVER<-->gateway<-->Client2

 

1: Client1 can ping to server ip, then login successfull.

2: Client2 also can ping to server ip, then login successfull.

3: but Client1 & Client2 is not ping each other

4: then client1 & client2 can chat?????

 

 

Open fire/sparweb how to work, it's chating direct Ethernet to Ethernet.

Or

Client1 send the request to server then server send the response to Client2 ?

 

Please help me

Thanks

Re: Chating between two client.

$
0
0

All communication in xmpp (except for file transfers) is client-server-client based. No direct chat.

Re: Can't make Spark 2.7.2 to work on Ubuntu 14.04 LTS x64

$
0
0

Can you try the latest version of Spark and see if the issue is still there? install4j has been updated since then, so maybe the issue is gone.

Openfire is installed and now?

$
0
0

I'm not able to configure openfire that I can use any service. Where ever I'm looking for I coudn't find an documentation.

How can I configure and are there additional services on the server needed?

Or where can I find a documetation for the  configuration of openfire. Openfire is running on ubuntu server 16.04.


Re: Spark and XEP-0106: JID Escaping

$
0
0

Yes, tried in both 2.8.0 and 2.7.7 (due to the login problems I'm having with 2.8.0). 

Re: Openfire is installed and now?

Re: Spark and XEP-0106: JID Escaping

Re: Receiving new Spark message opens window but doesn't display message

$
0
0

I now have Spark 2.8.0.895 installed. Here's another excerpt from my spark raw packets received around another message that didn't show in my spark window. (The message itself is just "Sure" because that person was responding to a spark I'd sent him before I installed the new version).

 

<iq type="get" id="713-50216" from="OpenFireServer" to="gretchen@OpenFireServer/Spark 2.6.3"><ping xmlns="urn:xmpp:ping"/></iq><presence id="I6323-10" from="nancy@OpenFireServer/Spark 2.6.3" to="gretchen@OpenFireServer"><status>Online</status><priority>1</priority><c xmlns="http://jabber.org/protocol/caps" hash="sha-1" node="http://www.igniterealtime.org/projects/smack" ver="TJuVIXqTCVfJSthaPu4MtTbaf9A="/></presence><presence id="8Gm29-10" from="angel@OpenFireServer/Spark" to="gretchen@OpenFireServer"><status>Online</status><priority>1</priority><c xmlns="http://jabber.org/protocol/caps" hash="sha-1" node="http://www.igniterealtime.org/projects/smack" ver="TJuVIXqTCVfJSthaPu4MtTbaf9A="/></presence><presence id="719A1-10" from="andy@OpenFireServer/Spark 2.6.3" to="gretchen@OpenFireServer"><status>Online</status><priority>1</priority><c xmlns="http://jabber.org/protocol/caps" hash="sha-1" node="http://www.igniterealtime.org/projects/smack" ver="TJuVIXqTCVfJSthaPu4MtTbaf9A="/></presence><message to="gretchen@OpenFireServer/Spark 2.6.3" id="719A1-1777" type="chat" from="andy@OpenFireServer/Spark 2.6.3"><thread>HcNo2r</thread><composing xmlns="http://jabber.org/protocol/chatstates"/></message><message to="gretchen@OpenFireServer/Spark 2.6.3" id="719A1-1778" type="chat" from="andy@OpenFireServer/Spark 2.6.3"><body>Sure</body><thread>HcNo2r</thread><x xmlns="jabber:x:event"><offline/><composing/></x><active xmlns="http://jabber.org/protocol/chatstates"/></message><message to="gretchen@OpenFireServer/Spark 2.6.3" id="719A1-1780" type="chat" from="andy@OpenFireServer/Spark 2.6.3"><thread>HcNo2r</thread><paused xmlns="http://jabber.org/protocol/chatstates"/></message>

 

Also, while my spark error log is silent, my warning log has these warnings:

 

WARNING: chatRoomActivated:  andy@OpenFireServer
Sep 09, 2016 2:47:21 PM org.jivesoftware.spark.util.log.Log warning
WARNING: chatRoomOpened:  andy@OpenFireServer
Sep 09, 2016 2:58:18 PM org.jivesoftware.spark.util.log.Log warning
WARNING: userHasJoined:  andy@OpenFireServer Spark 2.6.3
Sep 09, 2016 2:58:24 PM org.jivesoftware.spark.util.log.Log warning
WARNING: userHasJoined:  andy@OpenFireServer Spark 2.6.3

Re: Receiving new Spark message opens window but doesn't display message

$
0
0

It's somewhat suspicious that I can't identify the source of those 'warning' log messages. They did point me towards more code locations where the isolation fix was needed. I've prepared another patch.

 

There's no need to provide further packet dumps, by the way. We've learned what we can from them, I think.

Viewing all 12000 articles
Browse latest View live