Code Monkey home page Code Monkey logo

Comments (17)

ubergeek42 avatar ubergeek42 commented on July 29, 2024

The problem with the library I'm using for ssh is that it gives terrible error messages. What this error likely means is that the ssh connection itself failed in some way. Check passwords, ip addresses, ports, etc. Are you trying to use an ssh key or password based auth?

Can you give me more details about your configuration? Feel free to email if you don't want it public, [email protected]. I'm also on freenode in #weechat-android if you want to chat that way.

from weechat-android.

0mark avatar 0mark commented on July 29, 2024

Well, now im feeling stupid. I just set the ssh settings again (did that before twice today and thrice last evening). Now it worked. I checked the settings before altering them, and they seemed right. Also my weechat client has a lot connection/disconnection messages in its log, so i guess the ssh settings where alright before. I have deleted the ssl certificates (found that by accident after changing the ssh settings).

My configuration:
Server:
weechat 2.11.1p1 on a root server, providing a weechat relay on port 9001.
OpenSSH 6.1p1, OpenSSL 1.0.1c on port 22

Tablet:
Android 4.0.3, latest stable weechat-android version

If you need other data just ask :)

from weechat-android.

ubergeek42 avatar ubergeek42 commented on July 29, 2024

Wait, so is everything working fine now?

from weechat-android.

rrrrt avatar rrrrt commented on July 29, 2024

(UPDATE below)
I seem to encounter the same issue.

"Error: PortForwardingL: local port 127.0.0.1:22231 cannot be bound." displayed on the phone. However, it seems to create ssh connections to the server (I can see them with netstat), so I don't believe it is an authentication problem.

Sometimes, I get the message "connected to " as a notification, without anything else being displayed. I have yet to find a pattern for this behaviour.

So far, I have never managed to connect successfully through an ssh tunnel, while ssl and plain both work fine.

The problem appears both for IPv4 and IPv6.

0mark, It would be great if you could describe what you did to make it work.

My configuration:
Android 4.1.2 on a phone,
weechat-android 0.08-dev using an ssh tunnel with private key file,
connecting to weechat 0.4.0, relay set to weechat on port 8025

UPDATE: Success!
I managed to get it to run after a lot of re-starting, re-installing, and re-configuring; I cannot pinpoint exactly why it works now while it didn't before.
My guess would be that the Socket for the local connection (try/catch block for local Socket in createSSHTunnelSocketConnection, RelayConnection.java:495) is not closed again if the connection fails. On subsequent connection attempts, the Socket then probably cannot be re-opened at the same port.

UPDATE (2):
I also managed to reproduce the error by hitting 'disconnect', followed by 'connect'. To successfully establish a connection after that, the app has to be restarted.

from weechat-android.

 avatar commented on July 29, 2024

Just for reference:
screenshot_2013-07-17-09-47-39 resize

from weechat-android.

sitedyno avatar sitedyno commented on July 29, 2024

For the record this happened to me when I did not use 127.0.0.1 for the relay address while using SSH Tunnel. I had left it as public ip address from earlier configuration.

from weechat-android.

rlazarus avatar rlazarus commented on July 29, 2024

I encountered this when turning on SSH tunneling for the first time: I only had an SSL relay configured in weechat and this error appeared. When I used a non-SSL relay instead, the issue resolved itself.

I can also confirm @rrrrt's second update: I had to quit and reopen the app, rather than just disconnecting and connecting.

from weechat-android.

pvl1 avatar pvl1 commented on July 29, 2024

I think iptlables on CyanogenMod blocks that port
EDIT: I think the ssh tunnel doesn't use weechat ssl
Double edit: yup I enabled regular relay on the next port, made weechat-android ssh tunnel to the hostname on said port.

from weechat-android.

etu avatar etu commented on July 29, 2024

Just experinced this issue when trying out the beta app. Found that my issue was that the non-beta app was already connected because they apparantly use the same local port. Just putting it here if people encounter that.

from weechat-android.

ardumont avatar ardumont commented on July 29, 2024

Hello,

I am hitting this issue after having upgraded the android version from 6 to 7 (on a oneplus3 if that matters).

It's the same error message as the initial comment with the sensibly same screenshot (except for the running weechat-android version really :)

I did not touch any weechat-android configuration whatsoever after android upgrade (v.0.12-git installed from f-droid).
I'm forgetting one important point, weechat-android worked perfectly prior the android upgrade (through ssh tunnel configuration with private key)

Also, nothing changed on the server ;)

So far, I did not successfully reconnected. What I tried and did not help:

  • Force stopping the app

  • Rebooting the complete phone did not help.

  • Taking a look at the relay buffer, i saw some hanging connections (but nothing quite distinguishing the relay connection), disconnecting them all (yes, at the expanse of other clients) and trying to connect again did not help either.

  • Purging the application data...? Well, i screwed up that test and direcly uninstalled it (mind plays trick sometimes :)

  • Uninstalling the app and reinstalling it then.
    After configuration, I have no more error message.
    I don't see any buffer though.
    I see one new connection in the relay list (the timestamp match the time i hit connection on the phone)... Definitely disconnecting it from the relay buffer stops weechat in the phone (or crash it?)...

Anyway, i'm at a loss for what i can try next.
Any hint would be appreciated, thanks a bunch in advance.

Also, worth mentioning, thanks a lot for weechat-android, it's awesome!

Cheers,

from weechat-android.

ardumont avatar ardumont commented on July 29, 2024

adb logcat might help...

So authentication actually succeeds, but 'address is already in use':

02-11 17:38:20.743 10617 10682 I Jsch    : Authentication succeeded (publickey).
02-11 17:38:20.746 10617 10682 E AbstractConnection: connectOnce(): exception while state == CONNECTING
02-11 17:38:20.746 10617 10682 E AbstractConnection: com.jcraft.jsch.JSchException: PortForwardingL: local port 127.0.0.1:22231 cannot be bound.
02-11 17:38:20.746 10617 10682 E AbstractConnection:    at com.jcraft.jsch.PortWatcher.<init>(PortWatcher.java:158)
02-11 17:38:20.746 10617 10682 E AbstractConnection:    at com.jcraft.jsch.PortWatcher.addPort$2a866d1d(PortWatcher.java:110)
02-11 17:38:20.746 10617 10682 E AbstractConnection:    at com.jcraft.jsch.Session.setPortForwardingL(Session.java:1798)
02-11 17:38:20.746 10617 10682 E AbstractConnection:    at com.ubergeek42.weechat.relay.connection.SSHConnection.doConnect(SSHConnection.java:4781)
02-11 17:38:20.746 10617 10682 E AbstractConnection:    at com.ubergeek42.weechat.relay.connection.AbstractConnection.access$100(AbstractConnection.java:21)
02-11 17:38:20.746 10617 10682 E AbstractConnection:    at com.ubergeek42.weechat.relay.connection.AbstractConnection$1.run(AbstractConnection.java:52)
02-11 17:38:20.746 10617 10682 E AbstractConnection:    at java.lang.Thread.run(Thread.java:761)
02-11 17:38:20.746 10617 10682 E AbstractConnection: Caused by: java.net.BindException: Address already in use
02-11 17:38:20.746 10617 10682 E AbstractConnection:    at java.net.PlainSocketImpl.socketBind(Native Method)
02-11 17:38:20.746 10617 10682 E AbstractConnection:    at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:368)
02-11 17:38:20.746 10617 10682 E AbstractConnection:    at java.net.ServerSocket.bind(ServerSocket.java:377)
02-11 17:38:20.746 10617 10682 E AbstractConnection:    at java.net.ServerSocket.<init>(ServerSocket.java:237)
02-11 17:38:20.746 10617 10682 E AbstractConnection:    at com.jcraft.jsch.PortWatcher.<init>(PortWatcher.java:150)
02-11 17:38:20.746 10617 10682 E AbstractConnection:    ... 6 more
02-11 17:38:20.746 10617 10682 E RelayService: onException(JSchException)

Cheers,

from weechat-android.

oakkitten avatar oakkitten commented on July 29, 2024

please try the latest development version, we are not using a fixed local port now. f-droid version seems to be outdated a bit. your last point is weird though; perhaps you can visit us at #weechat-android on freenode?

from weechat-android.

ardumont avatar ardumont commented on July 29, 2024

we are not using a fixed local port now.

Indeed, you no longer do

please try the latest development version,

sure as soon as i have time and figured out how to do so :d

your last point is weird though

I suppose it's the one about the weechat relay disconnection triggering the android client crash?
It does not happen all the time and i did not try to catch the adb log for it as it's a minor inconvenience...
The major one being to not be able to use weechat-android :D

perhaps you can visit us at #weechat-android on freenode?

Thanks. Will do as soon as i can but after trying out your proposed hint (if it fails).

Thanks for your time.

from weechat-android.

ardumont avatar ardumont commented on July 29, 2024

sure as soon as i have time and figured out how to do so :d

Well, thanks again. The latest development version entertained in the readme worked.

I guess it'd be great if f-droid releases could keep up with yours ;D

Cheers,

from weechat-android.

c-MM avatar c-MM commented on July 29, 2024

Would it be possible to push an updated version to f-droid please? I also upgraded to LinageOS 14.1 and the f-droid binary no longer connects to my relay via ssh-tunnel. I have no play-store installed and can't install the development version.
Thanks a lot for this nice app.

from weechat-android.

c-MM avatar c-MM commented on July 29, 2024

I finally found the direct apk download link (stupid me, didn't see it yesterday).
Thanks a lot, this version works fine on my LinageOS 14.1 (Nougat I think).

Thanks for the great app, I like it a lot. An f-droid update would be fine anyways. :-)

from weechat-android.

smaslennikov avatar smaslennikov commented on July 29, 2024

I'd like to suggest cutting a new release (re: #377); as I hit this issue, which seems solved in the currently nightly (works for me with the nightly, but not in 0.11 in Android App Store). I ran into this specific issue after updating to Android 6 recently.

from weechat-android.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.