Unable to connect app to local server

Hi Guys, I’ve got my local server installed on my PI3. I can access the admin page all OK.

Now trying to connect my app to the server I get a “Something went wrong when connecting to the server.”

I get 2 errors in the blynk.log whenever I try to create the account.

20:44:00.601 DEBUG - Discarded inbound message UnpooledUnsafeNoCleanerDirectByteBuf(ridx: 0, widx: 296, cap: 296) that reached at the tail of the pipeline. Please check your pipeline configuration.
20:44:01.005 DEBUG - [id: 0xbeef05f7, L:/ - R:/] HANDSHAKEN: TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256`

I’ve also tried the instructions here which has a workaround by registering the user via a java client. This also didn’t work.
I ran this

java -jar c:\BlynkClient\client-0.8.0.jar -mode app -host -port 8443
20:58:32.859 INFO - Creating app client. Host, sslPort : 8443
20:58:32.859 WARN - server.ssl.cert file was not found at location
20:58:32.859 WARN - client.ssl.cert file was not found at location
20:58:32.859 WARN - client.ssl.key file was not found at location
20:58:32.859 INFO - Enabling one-way auth with no certs checks.
register name@mail.com passwordlogin name@mail.com passwordsaveProfile {“dashBoards”:[{“id”:1, “name”:“Local Weather”, “boardType”:“LaunchPad CC3200”}]}getToken 1activate 1
20:58:54.566 TRACE - Message hex : 01558700A36E616D65406D61696C2E636F6D2070617373776F72646C6F67696E206E616D65406D61696C2E636F6D2070617373776F72647361766550726F66696C65207B2264617368426F61726473223A5B7B226964223A312C20226E616D65223A224C6F63616C2057656174686572222C2022626F61726454797065223A224C61756E636850616420434333323030227D5D7D676574546F6B656E203161637469766174652031
20:58:54.635 TRACE - Incoming ResponseMessage{id=21895, command=RESPONSE, responseCode=ILLEGAL_COMMAND}

which got this error in blynk.log

21:00:05.299 ERROR - Register Handler. Wrong income message format. RegisterMessage{id=21895, command=Register, length=163, body=‘name@mail.com passwordlogin name@mail.com passwordsaveProfile {“dashBoards”:[{“id”:1, “name”:“Local Weather”, “boardType”:“LaunchPad CC3200”}]}getToken 1activate 1’}
21:01:06.060 DEBUG - [id: 0x4f0e84c0, L:/ - R:/] HANDSHAKEN: TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256

Any ideas to this issue?

1 Like

Please use latest version. Both for server and client.

1 Like

Hi, Thanks for the reply,

I’m was running 0.16.4 server but had just used the commands copied from the instructions for the client download.
Client now running 0.16.4 also, Still no luck but different errors in log.

I run the client with

java -jar c:\BlynkClient\client-0.16.4.jar -mode app -host -port 8443

and register a user with

register user@email.com

but I get the following returned from the client

ERROR - Client socket closed. Reason : Server closed client connection.

and the blynk.log has

Not secure connection attempt detected. not an SSL/TLS record: 016eff000e7573657240656d61696c2e636f6d.

Any help appreciated.

1 Like

You should specify password also.

1 Like

So based on the replies so far I’m assuming registering through the android app a new user on the local server doesn’t work as the replies have only been about the workaround I’m trying with the client because of the app issue.

Based on that I haven’t been able to track down any real documentation re the client, if anyone can point me in the direction of it that would be really helpful to be able to confirm the syntax including passing the password required.

I tried the format and many shortened versions from the instructions here but no matter what I put into the client it just closes the connection and the same error in the blynk.log of the not secure connection.


1 Like

Why do you use this client at all? It is designed only for integration tests and not for “real” usage.

1 Like

I’m running the real client on my MacBook with BlueStacks, it’s an Android simulator. It works very well on my MacBook but I heard there are reports from Windows users who have problems with it. Because of the light footprint of Blynk it works wonders. And it’s free :slight_smile:

It’s a bit more real than the client.jar.

1 Like

As above, I’ve tried to use the android app to register a user to my local server, pointed to my server, entered username and password, hit signup and I get back the “Something Went wrong when connecting to the server”
In the Blynk.log now dont see anything (which is different to what I was seeing yesterday)

I’ve tried from 2 android devices with the latest updates to the app.

This is when I started trying the client as a workaround to at least get an account registered to the local server. It wasn’t my first choice.

1 Like

Oh, and I’ve tried it from the client running from windows and also from linux with the same results.

1 Like

Are your phone in same network as server or you are in 3G?

1 Like

Also please post here screenshot of settings when you are connecting to local server.

1 Like

1 Like

I’ve tried from both my phone (with mobile data switched off to be sure) and from my samsung tablet that doesn’t have 3/4G.

1 Like

Just to confirm,
Server from ifconfig

inet addr:

tcp6 0 0 [::]:9443 [::]:* LISTEN
tcp6 0 0 [::]:8082 [::]:* LISTEN
tcp6 0 0 [::]:7443 [::]:* LISTEN
tcp6 0 0 [::]:8441 [::]:* LISTEN
tcp6 0 0 [::]:8442 [::]:* LISTEN
tcp6 0 0 [::]:8443 [::]:* LISTEN

1 Like

There is a chance that your router blocks 8443 port. Could you please check?

1 Like

Stupid question, did you turn off iptables firewall on the Pi? I got several grey hairs before I figured that out.

1 Like

Thanks for the thought but it has no rules by default.

sudo iptables -L -nv
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination

Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination

As my devices are on the same subnet as the server, the traffic wont be passing through the router, but yes my router has port forwarding and firewall rules setup to allow from the outside world but I’m trying from my internal network to ensure that isn’t the cause.

Can you do a telnet to the Pi from another machine on the 8443 port? Just to be sure it’s actually listening there. Did you setup a server.properties file b.t.w.? It may or may not help. And what java version are you running?

Netsat as above shows listening.
Telnet connects from another machine in the network
Yes I have a server.properties with the only change from the default is the path to the certs.
java version “1.8.0_65”
Java™ SE Runtime Environment (build 1.8.0_65-b17)
Java HotSpot™ Client VM (build 25.65-b01, mixed mode)