[SOLVED] Can not Start Local Server on Win8.1

Hi,
Trying to start the local server and the following error is reported:

Server ports are busy. Most probably server already launched. See C:\cygwin64\home\cpike\Blynk.\logs for more

I am using the default certificates at this stage, as on internal net.
I have server working on another PC at home using cygwin64 with no problems.
I am starting the server with following command:

java -jar server-0.14.0.jar -dataFolder C:/cygwin64/home/cpike/Blynk &

java -version is:

java version “1.8.0_73”
Java™ SE Runtime Environment (build 1.8.0_73-b02)
Java HotSpot™ 64-Bit Server VM (build 25.73-b02, mixed mode)

I have not set up email address at this stage.
Here is some of the Blynk.log:

21:21:54.996 INFO - Using data dir ‘C:\cygwin64\home\cpike\Blynk’
21:21:55.293 ERROR - Error parsing file ‘C:\cygwin64\home\cpike\Blynk\server-0.14.0.jar’.
21:21:55.293 ERROR - Error parsing file ‘C:\cygwin64\home\cpike\Blynk\server.properties’.
21:21:55.324 INFO - Initializing mail transport. Username : example@gmail.com. SMTP host : smtp.gmail.com:587
21:21:55.652 INFO - Plain tcp/ip hardware server port 8442.
java.net.BindException: Address already in use: bind

try running “netstat -an | findstr 8442”

If a proces shows up it is probably already started. Have you looked in the task manager? I see you are using something from cygwin. This is not needed. The java jar file can be executed directly on your windows platform

Tanks for your help
There is no process shown using that port when i use nestat.
quote=“Lichtsignaal, post:2, topic:4915”]
“netstat -an | findstr 8442”
[/quote]

I use cygwin just to keep in touch with the unix feel

That’s weird. Have you tried telnetting to localhost on that port? Does that give a connection? Maybe reboot stuff?

-edit

Btw, make sure your firewall is turned off … :wink:

1 Like

I think it may be the work firewall app. on my laptop. I’m away working for the next 4 days, and hoping to get some Blynk work in while away…

99% sure it is :slight_smile:

I manage somewhat bigger firewalls on a daily basis and it usually is the culprit, lol.

@Lichtsignaal is right. Problem either is that you already has server instance running either port is blocked with firewall. Most probably you have running Blynk server already (you may for instance check that with http://localhost:8080/token/pin/d1).

I am too getting the same error “C:\Users\Shivasiddharth\Blynk Server>java -jar server-0.15.2.jar -dataFolder /path Server ports are busy. Most probably server already launched. See C:\Users\Shivasiddharth\Blynk Server.\logs for more info.”

But when i try to connect the app to the server it says, user not registered. And my log file looks like something below.

12:01:03.911 INFO - Using data dir ‘\path’
12:01:04.045 INFO - Initializing mail transport. Username : ushivasiddharth@gmail.com. SMTP host : smtp.gmail.com:587
12:01:04.731 INFO - Plain tcp/ip hardware server port 8442.
12:01:04.733 WARN - ATTENTION. Certificate C:\Users\Shivasiddharth\Blynk Server and key C:\Users\Shivasiddharth\Blynk Server paths not valid. Using embedded certs. This is not secure. Please replace it with your own certs.
12:01:05.611 INFO - SSL hardware port 8441.
12:01:05.616 WARN - ATTENTION. Server certificate paths cert : ‘C:\Users\Shivasiddharth\Blynk Server’, key : ‘C:\Users\Shivasiddharth\Blynk Server’ - not valid. Using embedded server certs and one way ssl. This is not secure. Please replace it with your own certs.
12:01:05.805 INFO - Application server port 8443.
12:01:05.825 INFO - HTTP API port 8080.
12:01:05.827 WARN - ATTENTION. Certificate C:\Users\Shivasiddharth\Blynk Server and key C:\Users\Shivasiddharth\Blynk Server paths not valid. Using embedded certs. This is not secure. Please replace it with your own certs.
12:01:06.189 INFO - HTTPS API port 9443.
12:01:06.198 WARN - ATTENTION. Certificate C:\Users\Shivasiddharth\Blynk Server and key C:\Users\Shivasiddharth\Blynk Server paths not valid. Using embedded certs. This is not secure. Please replace it with your own certs.
12:01:06.393 INFO - HTTPS admin UI port 7443.
12:01:06.650 INFO - HTTP reset pass port 7444.
12:01:06.651 INFO - Web Sockets port 8082.
12:01:06.651 WARN - ATTENTION. Certificate C:\Users\Shivasiddharth\Blynk Server and key C:\Users\Shivasiddharth\Blynk Server paths not valid. Using embedded certs. This is not secure. Please replace it with your own certs.
12:01:06.968 INFO - Web SSL Sockets port 8081.
12:01:07.233 ERROR - Error initializing HTTP API, port 8080
java.net.BindException: Address already in use: bind
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Unknown Source)
at sun.nio.ch.Net.bind(Unknown Source)
at sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source)
at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source)
at io.netty.channel.socket.nio.NioServerSocketChannel.doBind(NioServerSocketChannel.java:125)
at io.netty.channel.AbstractChannel$AbstractUnsafe.bind(AbstractChannel.java:498)
at io.netty.channel.DefaultChannelPipeline$HeadContext.bind(DefaultChannelPipeline.java:1271)
at io.netty.channel.AbstractChannelHandlerContext.invokeBind(AbstractChannelHandlerContext.java:413)
at io.netty.channel.AbstractChannelHandlerContext.bind(AbstractChannelHandlerContext.java:399)
at io.netty.channel.DefaultChannelPipeline.bind(DefaultChannelPipeline.java:1019)
at io.netty.channel.AbstractChannel.bind(AbstractChannel.java:198)
at io.netty.bootstrap.AbstractBootstrap$2.run(AbstractBootstrap.java:349)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:358)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:357)
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:112)
at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:137)
at java.lang.Thread.run(Unknown Source)
12:01:49.889 ERROR - User not registered. Username ‘ushivasiddharth@gmail.com’, /10.4.100.31:62913

PS: My firewall is disabled. I am using my university internet.

You already have running server. You need to stop it if you want to run it again.

There is no java process running. I checked it in the task manager.

In that case something else is using 8080 port. Either find it and close, either change 8080 port to something else via server.properties file as described in instruction.

thanks a lot. I changed it to port 80 and it started working

1 Like

Now when i try to login from my android app it says something went wrong. the ip that i have assigned in the app is the ip4 of my internet. and port i have given 8443. Kindly excuse my lack of knowledge.

You need to put IP in app. of machine where your server is (in case both app and server within one network).

IPv4 Address. . . . . . . . . . . : 10.4.100.31(Preferred) this is what i saw by giving “ipconfig /all”

ANd i have entered the same thing app also.

How does your app connect to internet?

I have an ethernet connection connected to the laptop. and i am sharing the ethernet connection to my app through virtual router/ soft acces point

I am getting user unregistered as well… Kindly help

On local server? That’s ok, as for local server you have to create separate account.

OMG how did i really miss this… Instead of signing up separately with custom server, i was trying to login using the blynk server credentials… Thanks a lot for your guidance and support. Now i have got it working.