Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem executing SampleListener #1

Open
Ivo-Balbaert opened this issue Oct 30, 2020 · 2 comments
Open

Problem executing SampleListener #1

Ivo-Balbaert opened this issue Oct 30, 2020 · 2 comments

Comments

@Ivo-Balbaert
Copy link

The program doesn't work for me. I can start it up, and the server starts with the message:
Started server at port 9092
Then I open other another terminal window, and try to connect with telnet or netcat (nc) like this:
nc 127.0.0.1 9092
However, a connection is not established or if there is one, it is immediately disrupted.
Nothing is echoed or printed to the console, but I also do not see any error messages.
The server window just stays open, until it is closed or via CTRL+C.
I am testing on Windows 10 with Beef 0.42.7
Any idea what could be the problem, or what I am doing wrong?
Thanks!

@jairopaiva
Copy link
Owner

Hi, try to clean solution (clean all), rebuild the workspace, and run it again.
I'm not having any issue, i tested with jMeter. You can see it working opening the server address in a browser.

@Ivo-Balbaert
Copy link
Author

I did the clean all, haven't tried jMeter yet.

When I open a browser with localhost:9092, I get a ERR_SOCKET_NOT_CONNECTED, nothing in server console
However when I debug this, I see a connection and the following text appears in the server console:

GET / HTTP/1.1
Host: localhost:9092
Connection: keep-alive
DNT: 1
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.75 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,/;q=0.8,application/signed-exchange;v=b3;q=0.9
Sec-Fetch-Site: none
Sec-Fetch-Mode: navigate
Sec-Fetch-User: ?1
Sec-Fetch-Dest: document
Accept-Encoding: gzip, deflate, br
Accept-Language: nl-NL,nl;q=0.9,en-US;q=0.8,en;q=0.7

Failed to receive data from socket

Trying to open a telnet connection:
Microsoft Telnet> o localhost 9092
Connecting To localhost...

// After a few seconds:
Could not open connection to the host, on port 9092: Connect failed
or
Connection to host lost.

In the debugger, mHandle seems to be INVALID_SOCKET

Changing the port number doesn't help.

jMeter sends hundreds of requests per second, but a manual connection doesn't seem to get through in the code.
Thanks for looking into this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants