xombiemp / ultimate-torrent-setup

All the files needed for the Ultimate Torrent Setup, featuring Ubuntu, rtorrent, ruTorrent, Sonarr, Radarr.
232 stars 44 forks source link

Problem compiling rtorrent #41

Closed chaoticdude closed 7 years ago

chaoticdude commented 7 years ago

Under 'Compile rTorrent' section, I execute this command:

sudo ./configure --with-xmlrpc-c=/usr/local/src/xmlrpc-c/xmlrpc-c-config

It is successful.

I execute this command:

sudo make

It errors out, and I am unable to finish the install process. Error below:

rpc/command.h:193:79: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] Makefile:587: recipe for target 'command_ip.o' failed make[3]: [command_ip.o] Error 1 make[3]: Leaving directory '/usr/local/src/rtorrent/src' Makefile:620: recipe for target 'all-recursive' failed make[2]: [all-recursive] Error 1 make[2]: Leaving directory '/usr/local/src/rtorrent/src' Makefile:456: recipe for target 'all-recursive' failed make[1]: [all-recursive] Error 1 make[1]: Leaving directory '/usr/local/src/rtorrent' Makefile:388: recipe for target 'all' failed make: [all] Error 2 plex@[redacted]:/usr/local/src/rtorrent$

chaoticdude commented 7 years ago

rutorrent.txt

lailoken503 commented 7 years ago

This issue has been reported on rtorrent. Seems we need to be using the feature-bind branch instead of the default branch. I issued the command sudo git clone -b feature-bind https://github.com/rakshasa/libtorrent.git sudo git clone -b feature-bind https://github.com/rakshasa/rtorrent.git I'm able to proceed past this point after doing so. The guide does need to be updated.

chaoticdude commented 7 years ago

That's awesome, thanks @lailoken503. I'll leave this open so the guide can get updated. Next step for me is to take an image of my server so I don't have to rebuild this again.

hansdg1 commented 7 years ago

I too encountered this same issue as @chaoticdude. I cleaned up the existing installs in each directory (libtorrent/ and rtorrent/) using: sudo make uninstall and sudo make clean.

Then I cloned both the repos like @lailoken503 suggested, followed the rest of the steps from the wiki, and it's happy.

Also, when I ran sudo ln -s /usr/local/bin/rtorrent /usr/bin/, it told me that the symlink already exists. Just wanted to note this for the sake of completion.

SemperFratres commented 7 years ago

@lailoken503 I used your links in place of the ones in the wiki. When i get to the end and restart apache, I get a message that it is not linked to my account and therefore can't start. I have done this several times after fresh installs with the same output. Is this linked to the links above? I had previously got it restarted (while using the original links) and the webpage opened, but rtorrent was not started, and when trying to start it, it says it was not installed (the reason for using your links).

To state more specifically what I have done: Following the wiki, I replace sudo git clone https://github.com/rakshasa/libtorrent.git with your code above sudo git clone -b feature-bind https://github.com/rakshasa/libtorrent.git and continue with the directions following. I then do the same thing for rtorrent.

Thanks for any suggestions.

lailoken503 commented 7 years ago

It's hard to say what the issue is, though it sounds like a permission issue. Any chance you can get an exact error message?

SemperFratres commented 7 years ago

@lailoken503 , Thanks for your reply. I hope you can tell something from this. At the "finishing up" section, I cd ~ (already there anyway. Is there a path that is missing?) I then run the following and get the following error. ~ $ sudo service apache2 restart Job for apache2.service failed because the control process exited with error code. See "systemctl status apache2.service" and "journalctl -xe" for details.

journalctl states:

Subject: Unit apache2.service has failed Defined-By: systemd Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel Unit apache2.service has failed.

The result is failed. Jan 25 02:58:25 DOMAIN NAME systemd[1]: apache2.service: Unit entered failed state. Jan 25 02:58:25 DOMAIN NAME systemd[1]: apache2.service: Failed with result 'exit-code'. Jan 25 02:58:25 DOMAIN NAME sudo[23335]: pam_unix(sudo:session): session closed for user root Jan 25 02:58:37 DOMAIN NAME sshd[23385]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=IP ADDRESS HERE user=root Jan 25 02:58:39 DOMAIN NAME sshd[23385]: Failed password for root from IP ADDRESS HERE port 28189 ssh2 Jan 25 02:58:42 DOMAIN NAME sshd[23385]: Failed password for root from IP ADDRESS HERE port 28189 ssh2 Jan 25 02:58:44 DOMAIN NAME sshd[23385]: Failed password for root from IP ADDRESS HERE port 28189 ssh2 Jan 25 02:58:44 DOMAIN NAME sshd[23385]: Received disconnect from IP ADDRESS HERE port 28189:11: [preauth] Jan 25 02:58:44 DOMAIN NAME sshd[23385]: Disconnected from IP ADDRESS HERE port 28189 [preauth] Jan 25 02:58:44 DOMAIN NAME sshd[23385]: PAM 2 more authentication failures; logname= uid=0 euid=0 tty=ssh ruser= rhost=IP ADDRESS HERE user=root Jan 25 02:59:01 DOMAIN NAME CRON[23387]: pam_unix(cron:session): session opened for user root by (uid=0) Jan 25 02:59:01 DOMAIN NAME CRON[23388]: (root) CMD (/usr/local/rtm/bin/rtm 47 > /dev/null 2> /dev/null) Jan 25 02:59:01 DOMAIN NAME CRON[23387]: pam_unix(cron:session): session closed for user root Jan 25 02:59:56 DOMAIN NAME sshd[23430]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost= IP ADDRESS HERE user=root Jan 25 02:59:58 DOMAIN NAME sshd[23430]: Failed password for root from IP ADDRESS HERE port 33325 ssh2 Jan 25 03:00:00 DOMAIN NAME sshd[23430]: Failed password for root from IP ADDRESS HERE port an 25 02:58:39 DOMAIN NAME sshd[23385]: Failed password for root from IP ADDRESS HERE port 28189 ssh2 Jan 25 02:58:42 DOMAIN NAME sshd[23385]: Failed password for root from IP ADDRESS HERE port 28189 ssh2 Jan 25 02:58:44 DOMAIN NAME sshd[23385]: Failed password for root from IP ADDRESS HERE port 28189 ssh2 Jan 25 02:58:44 DOMAIN NAME sshd[23385]: Received disconnect from IP ADDRESS HERE port 28189:11: [preauth] Jan 25 02:58:44 DOMAIN NAME sshd[23385]: Disconnected from IP ADDRESS HERE port 28189 [preauth] Jan 25 02:58:44 DOMAIN NAME sshd[23385]: PAM 2 more authentication failures; logname= uid=0 euid=0 tty=ssh ruser= rhost=IP ADDRESS HERE user=root Jan 25 02:59:01 DOMAIN NAME CRON[23387]: pam_unix(cron:session): session opened for user root by (uid=0) Jan 25 02:59:01 DOMAIN NAME CRON[23388]: (root) CMD (/usr/local/rtm/bin/rtm 47 > /dev/null 2> /dev/null) Jan 25 02:59:01 DOMAIN NAME CRON[23387]: pam_unix(cron:session): session closed for user root Jan 25 02:59:56 DOMAIN NAME sshd[23430]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=116.31.116.37 user=root Jan 25 02:59:58 DOMAIN NAME sshd[23430]: Failed password for root from IP ADDRESS HERE port 33325 ssh2 Jan 25 03:00:00 DOMAIN NAME sshd[23430]: Failed password for root from IP ADDRESS HERE port 33325 ssh2 Jan 25 03:00:00 DOMAIN NAME sshd[23430]: Received disconnect from IP ADDRESS HERE port 33325:11: [preauth] Jan 25 03:00:00 DOMAIN NAME sshd[23430]: Disconnected from IP ADDRESS HERE port 33325 [preauth] Jan 25 03:00:00 DOMAIN NAME sshd[23430]: PAM 1 more authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=IP ADDRESS HERE user=root Jan 25 03:00:01 DOMAIN NAME CRON[23432]: pam_unix(cron:session): session opened for user root by (uid=0) Jan 25 03:00:01 DOMAIN NAME CRON[23433]: (root) CMD (/usr/local/rtm/bin/rtm 47 > /dev/null 2> /dev/null) Jan 25 03:00:01 DOMAIN NAME CRON[23432]: pam_unix(cron:session): session closed for user root Jan 25 03:01:01 DOMAIN NAME CRON[23475]: pam_unix(cron:session): session opened for user root by (uid=0) Jan 25 03:01:01 DOMAIN NAME CRON[23476]: (root) CMD (/usr/local/rtm/bin/rtm 47 > /dev/null 2> /dev/null) Jan 25 03:01:02 DOMAIN NAME CRON[23475]: pam_unix(cron:session): session closed for user root Jan 25 03:01:14 DOMAIN NAME sudo[23519]: tim : TTY=pts/0 ; PWD=/home/tim ; USER=root ; COMMAND=/bin/journalctl -xe Jan 25 03:01:14 DOMAIN NAME sudo[23519]: pam_unix(sudo:session): session opened for user root by tim(uid=0)

BTW.... the IP Address it listed above, is not my domain IP Address. Is it suppose to be? Is there somewhere I need to change that? I never put in an IP Address anywhere. Only my domain name.

systemctl status apache2.service states:

sudo systemctl status apache2.service ● apache2.service - LSB: Apache2 web server Loaded: loaded (/etc/init.d/apache2; bad; vendor preset: enabled) Drop-In: /lib/systemd/system/apache2.service.d └─apache2-systemd.conf Active: failed (Result: exit-code) since Wed 2017-01-25 02:58:25 CET; 6min ago Docs: man:systemd-sysv-generator(8) Process: 23341 ExecStop=/etc/init.d/apache2 stop (code=exited, status=0/SUCCESS) Process: 23370 ExecStart=/etc/init.d/apache2 start (code=exited, status=1/FAILURE)

Jan 25 02:58:25 DOMAIN NAME apache2[23370]: * The apache2 configtest failed. Jan 25 02:58:25 DOMAIN NAME apache2[23370]: Output of config test was: Jan 25 02:58:25 DOMAIN NAME apache2[23370]: AH00526: Syntax error on line 21 of /etc/apache2/sites-enabled/apache-portal.conf: Jan 25 02:58:25 DOMAIN NAME apache2[23370]: SSLCertificateFile: file '/etc/letsencrypt/live/DOMAIN NAME/fullchain.pem' does not exist or is empty Jan 25 02:58:25 DOMAIN NAME apache2[23370]: Action 'configtest' failed. Jan 25 02:58:25 DOMAIN NAME apache2[23370]: The Apache error log may have more information. Jan 25 02:58:25 DOMAIN NAME systemd[1]: apache2.service: Control process exited, code=exited status=1 Jan 25 02:58:25 DOMAIN NAME systemd[1]: Failed to start LSB: Apache2 web server. Jan 25 02:58:25 DOMAIN NAME systemd[1]: apache2.service: Unit entered failed state. Jan 25 02:58:25 DOMAIN NAME systemd[1]: apache2.service: Failed with result 'exit-code'.

lailoken503 commented 7 years ago

It looks like 2 things, a permission error, as we can see from

Jan 25 02:58:37 [snipped] sshd[23385]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=[snipped] user=root Jan 25 02:58:39 [snipped] sshd[23385]: Failed password for root from IP ADDRESS HERE port 28189 ssh2

A script or something you're using is passing the wrong root password. Besides, it's not a good idea to be using root access remotely, hence why we use sudo instead. I don't remember anything needing explict root access, though it's been a while since I've tried using the ultimate torrent setup, primarily due to not having a valid domain name that I could use letsencrypt with.

The 2nd thing that comes through is a configuration error, as seen below:

Jan 25 02:58:25 [snipped] apache2[23370]: * The apache2 configtest failed. Jan 25 02:58:25 [snipped] apache2[23370]: Output of config test was: Jan 25 02:58:25 [snipped] apache2[23370]: AH00526: Syntax error on line 21 of /etc/apache2/sites-enabled/apache-portal.conf: Jan 25 02:58:25 [snipped] apache2[23370]: SSLCertificateFile: file '/etc/letsencrypt/live/[snipped]/fullchain.pem' does not exist or is empty

It appears either your /etc/letsencrypt/live/[snipped]/fullchain.pem file is missing or incomplete, or has some weird permission issue that is preventing Apache from reading the file.

Also, for security and confidentially, you should redo your posts and remove the actual IP addresses and domain name.

SemperFratres commented 7 years ago

I am only using the scripts that are in the setup. As I said before, it ran with the original download links for libtorrent and rtorrent, but rtorrent was not installing, so I am thinking it may be something there.

As far as using root, I am not. I have been logged in under a user and using sudo. I have not entered a root password, only the user password. I don;t remember seeing anything in the installs or edits asking for a root password.

I will see if I can take a look at the .pem file (don't know if that is a human readable file).

lailoken503 commented 7 years ago

Congrats. You're getting attacked by a Chinese IP address. Consider installing fail2ban, and check your system for other possible attacks. Linux security is beyond my knowledge, until later this term, and next term when I take some security courses.

I'm assuming rtorrent eventually got installed, if not, you should find out why.

The pem file is human-readable, and from what I see, checking a friend's letsencypt install, is a symlink to the actual file.

SemperFratres commented 7 years ago

There is nothing on that server. I wipe it every time it fails to work and start over. rTorrent gets installed fine using the links you proved above. But somehere in-between the apache install (which works fine until the last apache restart) I will take a look at that file later this evening. Thanks for your help.

SemperFratres commented 7 years ago

ok... after a lot of reinstalling ubuntu and running through this code again, I am finally back at where I was when I originally ran this code with the original libtorrent and rtorrent links. The only difference is I used the links from above to compile both of them. I am logged into rutorrent, but the message "Torrent list not yet available, connection to rtorrent not established."

I will have to research this some more tomorrow.

SemperFratres commented 7 years ago

This is what I get: [26.01.2017 21:53:14] WebUI started. [26.01.2017 21:53:14] No connection to rTorrent. Check if it is really running. Check $scgi_port and $scgi_host settings in config.php and scgi_port in rTorrent configuration file.

I have checked the scgi in both files... they match. Tried changing the IP to localhost. The only thing I can find on this "linking" is to check the port numbers or the HDD is full. Nothing on the HDD as it is a fresh install.

Found a page that mentioned an scgi module, so looked in the setup from this wiki and didn't see anything, so I installed it... sudo apt-get install libapache2-mod-scgi sudo ln -s /etc/apache2/mods-available/scgi.load /etc/apache2/mods-enabled/scgi.load sudo /etc/init.d/apache2 restart

Still no luck. If anyone has any ideas, perhaps the creator of the Wiki, I would appreciate it.

argot42 commented 7 years ago

@SemperFratres

[26.01.2017 21:53:14] WebUI started. [26.01.2017 21:53:14] No connection to rTorrent. Check if it is really running. Check $scgi_port and $scgi_host settings in config.php and scgi_port in rTorrent configuration file.

I compiled this branch yesterday and ran into the same problem, my old config won't work. I fixed it changing in .rtorrent.rc

scgi_port = localhost:5000 to network.scgi.open_port = 127.0.0.1:5000

I don't why localhost worked before and not now.

SemperFratres commented 7 years ago

thanks for the info @argot42 ... I made that change, and still having no luck.

xombiemp commented 7 years ago

I've updated to guide to revert rtorrent to a know working commit until the Master branch starts working again.