SynoCommunity / spksrc

Cross compilation framework to create native packages for the Synology's NAS
https://synocommunity.com
Other
3.04k stars 1.23k forks source link

Sabnzbd : port 8080 already in use #878

Closed cdridi closed 10 years ago

cdridi commented 10 years ago

Hello and thanks in advance for your help. I have a DS212J and when I still was on DSM 4.xx I did install Sabnzbd and later on removed it. I then moved to DSM 5 and now trying to install Sabnzbd I get the error message that port 8080 is already in use.

I surfed the forums to try to find a solution but nothing found to date:

Is there a work around ?

By the way my knowledge of Linux is close to zero....

Diaoul commented 10 years ago

That's DSM throwing the error, basically we tell DSM we'll use that port and DSM checks if the port is in use at pre-install time. Sometimes there can be some delay, can you retry now?

cdridi commented 10 years ago

Thanks Antoine for your reply, but I did try several time and every time I get the same message.

With kind regards,

Chaouki Dridi

Sent from my iPhone

On 19 mars 2014, at 12:21, "Antoine Bertin" <notifications@github.com mailto:notifications@github.com > wrote:

That's DSM throwing the error, basically we tell DSM we'll use that port and DSM checks if the port is in use at pre-install time. Sometimes there can be some delay, can you retry now?

— Reply to this email directly or view it on GitHub. http://cdn.mailscanner.info/1x1spacer.gif

cdridi commented 10 years ago

I tried to install it again an hour ago, and I received the message :"Failed to download".

Dr-Bean commented 10 years ago

See #863, and #886 for a temporary solution.

cdridi commented 10 years ago

Thanks for the link. I did check the package list, but unfortunately no Sabnzb version suitable for my DS212J.

Dr-Bean commented 10 years ago

I think that list is still being updated as new packages are created. Otherwise, with a bit of luck, the repository will be repaired this week, according to this message: https://github.com/SynoCommunity/spksrc/issues/863#issuecomment-37818483

Diaoul commented 10 years ago

It'll be this week indeed.

cdridi commented 10 years ago

ok great ! But I suspect the other problem I am facing with port 8080 will not be solved. I tried to install the package from superzebulon and still got the message that the port 8080 was already in use. I cannot figure out what is making use of that port. Any suggestion ?

Dr-Bean commented 10 years ago

Not sure if the problem still exists?, but Zarafa might still be (part of) the cause. I use Zarafa, but not with Sab..so I can't comment on the combination. You should be able to rule Zarafa out like this: Stop Zarafa, reboot your NAS, and try installing Sab again (you should be able to use the repo as usual now, no need for manual downloads).

cdridi commented 10 years ago

Hi Dr Bean, The problem is still there. I did as you proposed but still get the same message that port 8080 is in use. Previously I even stopped all applications, and restarted the DS and tried to re-install with the same issue.

Dr-Bean commented 10 years ago

That's strange. Can you check the /volume1/@appstore to check which directories are present? Maybe a partly uninstalled Sab, or something like that is causing it.

if you want a GUI, WinSCP works nicely with Windows , or you can learn how to use Putty (You'll have to enable SSH in DSM>Control Panel>Terminal and SNMP first to use either one)

Diaoul commented 10 years ago

Do you have an alternative port configured for applications such as FileStation, PhotoStation, etc.?

cdridi commented 10 years ago

I checked /volume1/@appstore and no Sab directory available : image

And no alternative port configured for Filestation, etc...

Diaoul commented 10 years ago

Contact Synology support then, that's a weird issue.

Dr-Bean commented 10 years ago

I was just going to say...I can't think of a reason here. You checked that both Control Panel>Application Portal, as well as Control Panel>Web Services>HTTP Services are not showing port 8080 used, and a netstat -alpWe | grep 8080 (yep, throw in all the switches ;)) isn't showing an output? Then I'm out of ideas.

/edit: to be clear, Sab should indeed be visible via netstat -alpWe | grep webcache, although I can't imagine how that would still be possible. /edit2: Random thought: Have you bootstrapped your Synology, and/or installed Sab manually or via optware/ipkg? If that sentence doesn't mean anything to you, forget I asked ;)

cdridi commented 10 years ago

I checked again Control Panel>Application Portal image

And Control Panel>Web Services>HTTP image

... No port 8080 in use

And I tried netstat -alpWe | grep 8080, but get the message "-ash: netsta: not found" So I did open a ticket with Synology. If it gets solved I will report it here.

Thanks anyway both of you for your help

Dr-Bean commented 10 years ago

Thanks for showing :) The -ash: netsta: not found is an error in typing, I think: the command is netstat. With the command i provided, it should either show one or more running processes, or not provide any output at all.

cdridi commented 10 years ago

Good point, indeed there was a mistake. This is what I get when entered correctly image

Dr-Bean commented 10 years ago

Good that you got an output. Unfortunately in this case, that's no help in solving your issue :/ The grep 8080 part of the command also shows anything before or after 8080. In this case, 18080 shows up with the dovecot process, which is part of the MailServer package. So, that's not related.

cdridi commented 10 years ago

I thought so. Let's wait until Synology's response. Thanks again for trying.

X4ndor commented 10 years ago

I've created an account to say I seem to have the exact same problem with SABnzbd on my DS1512+. The only difference I can see is that I've uninstalled SABnzbd after, (instead of before) I upgraded to DSM 5.0, and then tried to reinstall SABnzbd. I've went so far as to uninstall Zarafa (and Z-Push, and MailServer) in an effort to get around the 8080 error, but it didn't help. Somehow DSM is convinced port 8080 is in use, while it isn't.

Long story short: I really hope Synology will come up with a solution soon, and I'very much appreciate it if you'd share it.

cdridi commented 10 years ago

X4ndor and all, I finally got a reply from Synology and they will not help in solving the issue. This is the message I received: Quote Dear customer,

Thank you for contacting Synology support.

Please note that we do not officially support third party software as Sabnzb, Sick Beard and Couch Potato that may cause system crash.

Also, installing 3rd party software may violate the warranty policy and we do not provide any type of support for DS with 3rd party software installed.

Maybe you should contact the application developer for more assistances.

If you have other concerns or suggestions, please feel free to contact us again.

Best Regards, Kay Chao Unquote

Disappointing....

By the way I also tried to assign the port 8080 as additional port to photostation but then I also got a message stating that the request could not be processed and that I shouldre-login and try again. Of course that did not work out neither.

Diaoul commented 10 years ago

With all 3rd party packages, the problem still occurs right? You should contact them again mentioning the issue with photo station.

cdridi commented 10 years ago

Yes just did it.

Dr-Bean commented 10 years ago

I can't check it properly ight now, but would the firewall be doing something strange? E.g. check if there's port 8080 is enabled for Sab, remove it, or turn the whole firewall off for a minute.

cdridi commented 10 years ago

Are you referring to the DS firewall ? If so it is not enabled.

X4ndor commented 10 years ago

Don't think it's the firewall, because DSM generates the message that the port is being used, not blocked. I haven't found an option to disable it, but it doesn't have any rules defined and the default is set to Allow.

I do think that somehow, somewere, DSM has a list of ports that are being used, and 8080 is on that list. I'm not sure though. I'm considering trying to repackage SAB with a different port number. That's not really a solution, but a work around. And I've never worked with SPK's, so it might take me some time to get it right. For now I'll just wait for Synology's response to the new ticket.

Dr-Bean commented 10 years ago

Iif Synology doesn't come through, there's a relatively easy workaround: If you have the existing SPK, open it with an unzip prog, and remove/change ADMIN_PORT in the INFO file. If you're on Windows, notepad might screw up the file, so use notepad++ or similar. Or you can build from source, of course :)

After that, install the package and change the port of SAB to something else via the configuration file. (It might even be it works using port 8080, who knows...)

It shouldn't break on package updates. Apart from that, some shortcuts in DSM might not work unless you change them too.

X4ndor commented 10 years ago

That's exactly what I was trying to do yesterday. Had two problems; one was that I was using Notepad, but now I know better, thanks. The other problem was that I couldn't find an SPK that worked on my DS1512+. Anyone know where to find that? I tried the package on @wouter0100 's website, but that didn't work even before I started editing. (And now @wouter0100 's site seems to be down, so I can't try that again.)

Wouter0100 commented 10 years ago

@X4ndor Currently migrating website, will be up in a couple of minutes :). I didn't read the issue, but the repo should be back up? :)

X4ndor commented 10 years ago

@wouter0100 Yes, repo is fine. DSM 5.0 isn't and I'm looking for an SABnzbd package to edit (the adminport) so I can install it without waiting for a solution from Synology. Your website was the only place I could find the packages, but I've downloaded the wrong one, I'm afraid. I shouldn't be doing stuff like this when I'm sleepy... I'll just wait until your site is back up. Anyway, thanks for all your hard work. :-D

Wouter0100 commented 10 years ago

@X4ndor No problem. Should be back up now, including all packages. :)

X4ndor commented 10 years ago

@wouter0100 Yep, Site is working. Dank je wel!

X4ndor commented 10 years ago

SABnzbd is downloading again. I did what I planned to do earlier. Used the correct SPK this time, edited it with Notepad++. I didn't even unpack it, just opened the entire archive with Notepad++ and found an entry adminport="8080". Changed it to adminport="9090" and saved the SPK. That did the trick. Of course after install SAB still uses port 8080, the adminport setting is only to inform DSM what port the package is going to use. But after install you can browse to the webpage and change the port to anything you want, and it works. Thanks everyone for your efforts! @cdridi I think this is your best shot to get this working, but still I will be monitoring this topic to see if Synology comes up with a solution.

Dr-Bean commented 10 years ago

Great :) Very weird though...

Btw, the adminport entry is also used for the Package Center link of Sab, so that'll be pointing to IP:9090 too. The shortcut in the menu on the other hand, has a separate file to set the port, so that should still work.

X4ndor commented 10 years ago

You're right, I used the shortcut in the menu. Also the package didn't install on the first try, but eventually it did.

Diaoul commented 10 years ago

There is a way to disable port check at install time using a key in the INFO file. See the package documentation. That's cleaner

X4ndor commented 10 years ago

@Diaoul You may be right, but it's working. I hope I won't be doing this again soon. But just in case someone else want's to try: Can you provide a link to the documentation you're referring to?

Dr-Bean commented 10 years ago

Yeah...checkport. I considered mentioning it, but this might be easier for people who don't build from source, especially if you can edit the whole .spk from Notepad++ and change that entry directly.

@X4ndor, here, I looked it up for you: http://ukdl.synology.com/download/ds/userguide/DSM_Developer_Guide.pdf, page 19.

X4ndor commented 10 years ago

It worked for me, but don't blame me if it doesn't work for someone else... :-D

@Dr-Bean Nice, I've been looking for that.

banshee1971 commented 10 years ago

I got the same issue there... i notice that when i call http:\nas:8080 ... it's open a webpage with some info about SABNzb...

My nas crash yesterday, i re-install everything but when i try to install SABNzb, it refuse arguing port 8080 are in use... but nothing show it's in use except old trace of the earlier SABNzb...

Where can i download the SPK manually (to fix the 8080 issue) ?

cdridi commented 10 years ago

@X4ndor Great for you ! Well done. I will try it this evening and will report as well. By the way I did not get the point about the shortcut in the menu. What are you referring to ?

@Dr-Bean @Diaoul Do I understand correctly that if I edit the spk file with Notepad++ and add the following line (for example before "adminport='8080'"): checkport="no" then it will do the job as well ?

Dr-Bean commented 10 years ago

@cdridi, yep, that should work for you.

Note, for others who read this: This will only work providing there are no other services running on port 8080, that's the reason it's checked in the first place.

cdridi commented 10 years ago

Well, I tried to use the "checkport" command in the spk file but I did not get to work. Each time I got the feedback the file was invalid. So I just changed the port as done by X4nder and that worked although I did need to repeat the installation a couple of times. Now Sabnzbd is running. Thank you all for your help getting this fixed.

X4ndor commented 10 years ago

Good to hear that it worked for you. I searched for "checkport" in the SPK file, but I didn't find it. I agree with Diaoul that It would be a nicer solution., but because you can change the port after you've installed SAB I don't think it really makes a difference in the end.

Dr-Bean commented 10 years ago

Good you've both been able to get it to work.

The reason checkport = [..] isn't added in the INFO file is because it's turned on by default. It's a necessary check, to prevent installation of conflicting packages. In most cases, the cause of the check failing is that the port is indeed in use, and that should be resolved first.

Imo, explicitly adding checkport, just for the sake of being able to turn it off when a particular device is having issues, isn't worth the effort.

I haven't been able to find details on where that port check takes it's input from, so @cdridi, if you happen to receive input from Synology, it would be nice to know :) Otherwise, I think this issue can be closed.

cdridi commented 10 years ago

I have not heard yet from Synology. I solved my problem for the time being, but still do not know the cause. By the way, after having installed Sabnzbd with above method, I did uninstall it and then tried to re-install it again via package center directly. I wanted to see uninstalling would clean any "left overs". Unfortunately I still got the same error that port 8080 was in use. So it is really somewhere in the disk.

I will close this issue when I get the feedback from Synology, unless otherwise requested.

X4ndor commented 10 years ago

@cdridi Have you heard anything from Synology? There's an SABnzbd+ update, and it's giving me the same error message. Of course the new version isn't available as download anywhere, so I can either wait for a reaction from Synology, or reinstall the DSM.

cdridi commented 10 years ago

@X4ndor I did have correspondence with Synology back and forth, as they were telling that the problem was lying with others. However they now will finally have a serious look at it. They asked to me to allow them to enter the NAS. I did not have time the last days to grant the permissions they required, but hopefully can get this arranged today or tomorrow. So to be continued.

X4ndor commented 10 years ago

@cdridi Any news?