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

Can't connect to ts server #38

Open
n00bst3r opened this issue May 28, 2021 · 2 comments
Open

Can't connect to ts server #38

n00bst3r opened this issue May 28, 2021 · 2 comments
Labels
question Further information is requested

Comments

@n00bst3r
Copy link

Hi!

I don't get what I'm doing wrong here.
This is in general my ClientSocket Bean:

@Bean
	public LocalTeamspeakClientSocket localTeamspeakClientSocket() throws IOException, TimeoutException, CommandException, InterruptedException, GeneralSecurityException {
		LocalTeamspeakClientSocket localTeamspeakClientSocket = new LocalTeamspeakClientSocket();
		localTeamspeakClientSocket.setIdentity(LocalIdentity.generateNew(10));
		localTeamspeakClientSocket.setNickname("Audiobot");
		localTeamspeakClientSocket.addListener(new Ts3AudioBotListener());
		return localTeamspeakClientSocket;

	}

And this is the way I connect to the server:

`          localTeamspeakClientSocket.connect(
                    new InetSocketAddress(
                            InetAddress.getByName(appConfig.getServerurl()),
                            appConfig.getServerport() // UDP client port, Teamspeak3 client uses 9987
                    ),
                    appConfig.getServerpassword(),
                    50000L
            );`

The password is correct if I debug and look at the password.

But the response from the Server is:

[DEBUG] [COMMAND] error id=1028 msg=invalid\sserver\spassword

I don't get what I'm doing wrong here. Do you have any idea?

Thanks for your help in advance and best regards

@Manevolent Manevolent added the question Further information is requested label May 28, 2021
@Manevolent
Copy link
Owner

Based on reading:

https://github.com/Manevolent/ts3j/blob/master/src/main/java/com/github/manevolent/ts3j/protocol/socket/client/LocalTeamspeakClientSocket.java#L391

and,

https://github.com/Manevolent/ts3j/blob/master/src/main/java/com/github/manevolent/ts3j/protocol/packet/handler/client/LocalClientHandlerConnecting.java#L261

I think we transport the password correctly through the chain there. However, I suppose it could be possible that the password field on the initial command is wrong. That, or the bytes of the password aren't getting transported properly.

@Bettehem
Copy link

Hello, any ideas how this could be solved? I'm trying to use this library in my project, but I'm having the same issue, where I can't connect to a password protected ts server. Only if a server doesn't have a password, it connects successfully.

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

No branches or pull requests

3 participants