Asustor app missing CURL_CA_BUNDLE envvar [fixed]

Ask for help and report issues not specific to either the Mac OS X or GTK+ versions of Transmission
Post Reply
kauedg
Posts: 1
Joined: Tue Jun 09, 2020 10:44 pm

Asustor app missing CURL_CA_BUNDLE envvar [fixed]

Post by kauedg »

I just bought a Asustor NAS AS1004T v2 (ADM Version 3.5.0.R5D3) and had problems setting up the transmission app. This should have the attention of the maintainers but I couldn't find who they are.

After installing (v3.0.0) and enabling transmission, I couldn't download or upload anything. This is what the logs (/var/log/messages) were, for each torrent in my server:

Code: Select all

2020-06-08T22:50:09.606350-03:00 localhost transmission-daemon[19453]: Transmission 3.00 (bb6b5a062e) started (session.c:769)                                                                                                                      
2020-06-08T22:50:09.606402-03:00 localhost transmission-daemon[19453]: RPC Server Adding address to whitelist: 127.0.0.1 (rpc-server.c:956)                                                                                                        
2020-06-08T22:50:09.606431-03:00 localhost transmission-daemon[19453]: RPC Server Serving RPC and Web requests on 0.0.0.0:9091/transmission/ (rpc-server.c:1244)                                                                                   
2020-06-08T22:50:09.606460-03:00 localhost transmission-daemon[19453]: DHT Generating new id (tr-dht.c:389)                                                                                                                                        
2020-06-08T22:50:09.606488-03:00 localhost transmission-daemon[19453]: Using settings from "/usr/local/AppCentral/transmission/config" (daemon.c:646)                                                                                              
2020-06-08T22:50:09.606516-03:00 localhost transmission-daemon[19453]: Saved "/volume1/.@plugins/AppCentral/transmission/config/settings.json" (variant.c:1221)                                                                                    
2020-06-08T22:50:09.606543-03:00 localhost transmission-daemon[19453]: Saved pidfile "/var/run/transmission-daemon.pid" (daemon.c:662)                                                                                                             
2020-06-08T22:50:09.606568-03:00 localhost transmission-daemon[19453]: Port Forwarding (NAT-PMP) initnatpmp succeeded (0) (natpmp.c:73)                                                                                                            
2020-06-08T22:50:09.606584-03:00 localhost transmission-daemon[19453]: Port Forwarding (NAT-PMP) sendpublicaddressrequest succeeded (2) (natpmp.c:73)                                                                                              
2020-06-08T22:50:11.598429-03:00 localhost transmission-daemon[19453]: Port Forwarding (UPnP) Found Internet Gateway Device "http://192.168.0.1:5431/uuid:aa9f4fda-3109-4c1e-9500-bc8e188cc6b0/WANIPConnection:1" (upnp.c:200)                     
2020-06-08T22:50:11.598459-03:00 localhost transmission-daemon[19453]: Port Forwarding (UPnP) Local Address is "192.168.0.4" (upnp.c:201)                                                                                                          
2020-06-08T22:50:11.598473-03:00 localhost transmission-daemon[19453]: Port Forwarding (UPnP) Port forwarding through "http://192.168.0.1:5431/uuid:aa9f4fda-3109-4c1e-9500-bc8e188cc6b0/WANIPConnection:1", service "urn:schemas-upnp-org:service:
2020-06-08T22:50:11.598484-03:00 localhost transmission-daemon[19453]: Port Forwarding (UPnP) Port forwarding successful! (upnp.c:280)                                                                                                             
2020-06-08T22:50:11.598497-03:00 localhost transmission-daemon[19453]: Port Forwarding State changed from "Not forwarded" to "Forwarded" (port-forwarding.c:107)                                                                                   
2020-06-08T22:50:18.605696-03:00 localhost transmission-daemon[19453]: Unable to create session lock file (38): Function not implemented (session-id.c:96)                                                                                         
2020-06-08T22:50:21.597997-03:00 localhost transmission-daemon[19453]: web will verify tracker certs using envvar CURL_CA_BUNDLE: none (web.c:456)                                                                                                 
2020-06-08T22:50:21.598023-03:00 localhost transmission-daemon[19453]: web NB: this only works if you built against libcurl with openssl or gnutls, NOT nss (web.c:457)                                                                            
2020-06-08T22:50:21.598036-03:00 localhost transmission-daemon[19453]: web NB: invalid certs will show up as 'Could not connect to tracker' like many other errors (web.c:458)                                                                     
2020-06-08T22:50:53.599669-03:00 localhost transmission-daemon[19453]: DHT Attempting bootstrap from dht.transmissionbt.com (tr-dht.c:299)                                                                                                         
2020-06-08T23:10:09.600318-03:00 localhost transmission-daemon[19453]: Port Forwarding (UPnP) Port 51413 isn't forwarded (upnp.c:228)                                                                                                              
2020-06-08T23:10:09.600358-03:00 localhost transmission-daemon[19453]: Port Forwarding (UPnP) Port forwarding through "http://192.168.0.1:5431/uuid:aa9f4fda-3109-4c1e-9500-bc8e188cc6b0/WANIPConnection:1", service "urn:schemas-upnp-org:service:
2020-06-08T23:10:09.600386-03:00 localhost transmission-daemon[19453]: Port Forwarding (UPnP) Port forwarding successful! (upnp.c:280)                                                                                                             
2020-06-08T23:21:58.602126-03:00 localhost transmission-daemon[19453]: [torrent_name 1] Queued for verification (verify.c:272)                                                                                      
2020-06-08T23:21:58.602140-03:00 localhost transmission-daemon[19453]: [torrent_name 1] Verifying torrent (verify.c:220)                                                                                            
2020-06-08T23:22:00.604232-03:00 localhost transmission-daemon[19453]: [torrent_name 1] Could not connect to tracker (announcer.c:1085)                                                                             
2020-06-08T23:22:00.604261-03:00 localhost transmission-daemon[19453]: [torrent_name 1] Retrying announce in 0 seconds. (announcer.c:1094)                                                                          
2020-06-08T23:22:01.605335-03:00 localhost transmission-daemon[19453]: [torrent_name 1] Could not connect to tracker (announcer.c:1085)                                                                             
2020-06-08T23:22:01.605361-03:00 localhost transmission-daemon[19453]: [torrent_name 1] Retrying announce in 0 seconds. (announcer.c:1094)                                                                          
2020-06-08T23:22:01.605375-03:00 localhost transmission-daemon[19453]: [torrent_name 1] Could not connect to tracker (announcer.c:1085)                                                                             
2020-06-08T23:22:01.605388-03:00 localhost transmission-daemon[19453]: [torrent_name 1] Retrying announce in 20 seconds. (announcer.c:1094)                                                                         
2020-06-08T23:22:21.605192-03:00 localhost transmission-daemon[19453]: [torrent_name 1] Could not connect to tracker (announcer.c:1085)                                                                             
2020-06-08T23:22:21.605219-03:00 localhost transmission-daemon[19453]: [torrent_name 1] Retrying announce in 20 seconds. (announcer.c:1094)                                                                         
2020-06-08T23:22:26.600124-03:00 localhost transmission-daemon[19453]: Saved "/usr/local/AppCentral/transmission/config/torrents/205cafce33c6eb0a6df45782c04abd90d7c8a9b2.torrent" (variant.c:1221)                                                
2020-06-08T23:22:26.600161-03:00 localhost transmission-daemon[19453]: [torrent_name 2] Queued for verification (verify.c:272)                                                              
2020-06-08T23:22:26.600178-03:00 localhost transmission-daemon[19453]: [torrent_name 2] Verifying torrent (verify.c:220)                            
2020-06-08T23:22:40.606015-03:00 localhost transmission-daemon[19453]: [torrent_name 3] Scrape error: Could not connect to tracker (announcer.c:1392)                                                                
2020-06-08T23:22:40.606052-03:00 localhost transmission-daemon[19453]: [torrent_name 3] Retrying scrape in 0 seconds. (announcer.c:1401)                                                                             
2020-06-08T23:22:42.598210-03:00 localhost transmission-daemon[19453]: [torrent_name 1] Could not connect to tracker (announcer.c:1085)                                                                             
2020-06-08T23:22:42.598238-03:00 localhost transmission-daemon[19453]: [torrent_name 1] Retrying announce in 20 seconds. (announcer.c:1094)   
I noticed the following lines

Code: Select all

2020-06-08T22:50:21.597997-03:00 localhost transmission-daemon[19453]: web will verify tracker certs using envvar CURL_CA_BUNDLE: none (web.c:456)
2020-06-08T22:50:21.598036-03:00 localhost transmission-daemon[19453]: web NB: invalid certs will show up as 'Could not connect to tracker' like many other errors (web.c:458)     


...and set the environment variable in the config.

How to fix it:

1) stop the service

Code: Select all

$ . /usr/local/etc/init.d/K20transmission stop
2) edit the init script

Code: Select all

$ vi /usr/local/etc/init.d/K20transmission
Just after...

Code: Select all

export TRANSMISSION_WEB_HOME="/usr/local/AppCentral/transmission/share/transmission/web"
...add...

Code: Select all

export CURL_CA_BUNDLE="/etc/ssl/certs/ca-certificates.crt"
... and save. Transmission's default directory, at list for this system, is under "/opt/etc/ssl/certs/ca-certificates.crt", which doesn't exist.

3) restart the service

Code: Select all

$ . /usr/local/etc/init.d/K20transmission start
And then transmission will be able to connect to the trackers.
buggy82
Posts: 3
Joined: Mon Jun 22, 2020 12:42 pm

Re: Asustor app missing CURL_CA_BUNDLE envvar [fixed]

Post by buggy82 »

One may also use the CURL_CA environment variable to specify a directory containing multiple CA certificate files instead of a single ca-bundle file.

Example: export CURL_CA="/etc/ssl/certs/"
Post Reply