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

DBInstaller and FTP Server port 5000 conflict #96

Open
anders0ny opened this issue Jan 16, 2025 · 4 comments
Open

DBInstaller and FTP Server port 5000 conflict #96

anders0ny opened this issue Jan 16, 2025 · 4 comments

Comments

@anders0ny
Copy link

Hello, I found a conflict between Sphaira's FTP-srv and DBInstaller.

When I start DBI through Sphaira and try to start its FTP service, I get an error:

Starting port 5000: Error: address already in use.

I went to the FPT-srv configuration and changed the port to 5001, and DBI started working again.

One of the two will need to change the FTP port for the solution to work correctly.
dbierror

@ITotalJustice
Copy link
Owner

well, that is very very strange!

the ftp server is always closed on exit,

void loop(void* arg) {
while (!g_should_exit) {
ftpsrv_init(&g_ftpsrv_config);
while (!g_should_exit) {
if (ftpsrv_loop(100) != FTP_API_LOOP_ERROR_OK) {
svcSleepThread(1e+6);
break;
}
}
ftpsrv_exit();
}
}

and the call to exit is made here

ftpsrv::Exit();

closing the server itself is done here https://github.com/ITotalJustice/ftpsrv/blob/e8ef5f9e9f168bc25a03a22e93f32c4912c4d003/src/ftpsrv.c#L1776 which does the following https://github.com/ITotalJustice/ftpsrv/blob/e8ef5f9e9f168bc25a03a22e93f32c4912c4d003/src/ftpsrv.c#L493-L494


tldr, it properly closes the socket. I also can't reproduce this at all 😄 Do you have ftpsrv installed as a sysmodule by any chance?

@ninstar
Copy link
Contributor

ninstar commented Jan 16, 2025

Normally, if you have a ftp server as a sysmodule but you want to use a homebrew-specific one, you should first disable the sysmodule.

@anders0ny
Copy link
Author

Hey!! Yes.... So I think this could be a problem with the AWS that I'm using and that most of Brazil uses hahahah it's called CNX, it already comes with the ftp-sys module active in the background... and in the latest version it removed HBMenu and left Sphaira as their main Menu, here I changed the port of mine to 5001 and I no longer have a conflict, I made a video on my channel showing subscribers how to disable or change the port... I'll talk to the CNX guys about this issue on their Github then :)

@ZweiBR
Copy link

ZweiBR commented Jan 17, 2025

Hey!! Yes.... So I think this could be a problem with the AWS that I'm using and that most of Brazil uses hahahah it's called CNX, it already comes with the ftp-sys module active in the background... and in the latest version it removed HBMenu and left Sphaira as their main Menu, here I changed the port of mine to 5001 and I no longer have a conflict, I made a video on my channel showing subscribers how to disable or change the port... I'll talk to the CNX guys about this issue on their Github then :)

My dbi 658 is already configured with port 7000 and I haven't had any problems so far.
It's easier to edit the DBi port

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

4 participants