Questions tagged [apache-mina]

Excerpt from apache site : Apache MINA is a network application framework which helps users develop high performance and high scalability network applications easily. It provides an abstract,event-driven,asynchronous API over various transports such as TCP/IP and UDP/IP via Java NIO.

281 questions
156
votes
10 answers

Import PEM into Java Key Store

I am trying to connect to an SSL server which requires me to authenticate myself. In order to use SSL over Apache MINA I need a suitable JKS file. However, I have only been given a .PEM file. How would I go about creating a JKS file from a PEM…
jwoolard
  • 5,466
  • 9
  • 33
  • 37
147
votes
7 answers

Netty vs Apache MINA

They both provide roughly the same functionality. Which one should I choose to develop my high-performance TCP server? What are the pros & cons? Reference links: Apache MINA (source) Netty (source)
GabiMe
  • 16,471
  • 25
  • 71
  • 106
26
votes
1 answer

Apache MINA server closes active UDP "session" after 60s

My client-server app works with Apache MINA at both, client and server sides. Sending data via UDP works OK, but after a minute server closes the connection (or MINA's way - "session") and stops answering. The strange part is that the connection is…
Jakub Turcovsky
  • 1,955
  • 3
  • 25
  • 38
22
votes
2 answers

Maven: NoClassDefFoundError in the main thread

I am currently building a little Apache-Mina Server app. I am using Maven to build it. When i try to run the jar, I get the following error: Exception in thread "main" java.lang.NoClassDefFoundError:…
fr1zle
  • 297
  • 1
  • 2
  • 8
14
votes
1 answer

Gradle: MessageIOException: Could not write message [EndOfStream] to 127.0.0.1 (Firewall)?

I wrote a simple test project, which opens port 9123 for some time and exit: import java.io.IOException; import java.net.InetSocketAddress; import java.nio.charset.Charset; import java.util.Date; import…
Dims
  • 37,353
  • 77
  • 251
  • 478
14
votes
1 answer

apache mina sshd authenticate client signatures

I'm trying to authenticate a signature that clients generate from their private key and send to the server. The only authenticator I could find in the library that sounded appropriate was the PublickeyAuthenticator. Please correct me if this is the…
Hooli
  • 1,055
  • 2
  • 14
  • 42
14
votes
3 answers

How to Set Root Directory in Apache Mina Sshd Server in Java

I use Apache Mina Sshd API to start up a local SFTP server in java.In SFTP client i use Jcraft jsch API to create my SFTP client.I successfully start up a server.The problem is that i want to write some unit test cases to check whether client can…
gihan-maduranga
  • 3,609
  • 1
  • 34
  • 66
12
votes
1 answer

SFTP server set user/password in Apache Mina SSHD

I'm using this example, taken from Java SFTP Server Library?: public void setupSftpServer(){ SshServer sshd = SshServer.setUpDefaultServer(); sshd.setPort(22); sshd.setKeyPairProvider(new SimpleGeneratorHostKeyProvider("hostkey.ser")); …
Alvins
  • 836
  • 15
  • 27
8
votes
1 answer

Apache Mina: how to get the IP from a connected client

Can anyone tell me how the get the IP address from a connected client? So far I've found session.getRemoteAddress().toString() and returns something like /192.168.1.100:49879 is this ok? Can I do something that can return only 192.168.1.100…
Doua Beri
  • 9,236
  • 15
  • 78
  • 126
7
votes
1 answer

strange messages in log file @^@^@^@^@^@^@^@^@^@^@^@^@^@^@^

I have a application server for network operations written with Java based on Apache Mina. Recently I encounter a strange behavior in my log files. I noticed that the log file is full of @^@^@^@^@^@^@^@^@^@^@^@^.... characters. I mean those…
pars
  • 3,500
  • 6
  • 34
  • 52
7
votes
1 answer

Apache MINA vs netty for Android

There is a very informative comparison between MINA and netty in here I would like to know your preference when the platform is Android! I have a host that should accept connections from as well as establish connections to android devices. This…
rahman
  • 4,370
  • 13
  • 42
  • 80
6
votes
1 answer

Apache MINA Vysper documentation?

I plan on making an instant messaging app on Android and iOS, where you can chat to other people with the app, along with some custom features. I’m going to use the XMPP protocol, and make a custom extension for it. I plan on making a Java…
Jon Cox
  • 9,614
  • 21
  • 72
  • 113
6
votes
3 answers

Lightweight Java socket library

I've used Mina and Netty, but now I'm in the market for a lightweight library that may also be used in Android. I prefer Nio or AsyncIo over standard io implementations. Update 1 The lack of responses really makes me think I should write my own…
Paul Gregoire
  • 9,350
  • 11
  • 56
  • 128
6
votes
1 answer

"no matching host key type found" - Apache MINA SFTP server

I’m hoping to set up a SFTP server in Java using Apache MINA. It seems to start OK, but when I try to connect to it with an OpenSSH client, I get: $ ssh localhost -p 2222 Unable to negotiate with ::1: no matching host key type found. Their offer:…
Rich
  • 13,254
  • 1
  • 56
  • 102
6
votes
1 answer

several TCP-servers on the same port

It looks very strange for me. I can run several TCP servers on the same port. I use Apache MINA library with following code: IoAcceptor acceptor = new NioSocketAcceptor(); acceptor.bind(new InetSocketAddress(80)); Port 80 is already used by another…
sasha_trn
  • 1,756
  • 2
  • 19
  • 30
1
2 3
18 19