• 6
name

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 191

Backtrace:

File: /home/prodcxja/public_html/questions/application/views/question.php
Line: 191
Function: _error_handler

File: /home/prodcxja/public_html/questions/application/controllers/Questions.php
Line: 433
Function: view

File: /home/prodcxja/public_html/questions/index.php
Line: 315
Function: require_once

I installed Phusion Passenger on Ubunut 14.04 a number of months back using the HOWTO here: https://www.phusionpassenger.com/library/install/apache/install/oss/trusty/

Recently, while updating system packages (apt-get update), I note this error below concerning the passenger repository. At this point, I must comment out the entries in /etc/apt/sources.list.d/passenger.list in order to install updates on my server. I have searched google and seem to only get six results back :( Seems to me the Passenger repo has some SSL issues. Anyone know what's wrong and how to fix this?

Err https://oss-binaries.phusionpassenger.com trusty/main amd64 Packages       
  gnutls_handshake() failed: A TLS packet with unexpected length was received.
Err https://oss-binaries.phusionpassenger.com trusty/main i386 Packages        
  gnutls_handshake() failed: A TLS packet with unexpected length was received.
Ign https://oss-binaries.phusionpassenger.com trusty/main Translation-en       
Fetched 2945 kB in 12s (241 kB/s)                                              
W: Failed to fetch https://oss-binaries.phusionpassenger.com/apt/passenger/dists/trusty/main/binary-amd64/Packages  gnutls_handshake() failed: A TLS packet with unexpected length was received.

W: Failed to fetch https://oss-binaries.phusionpassenger.com/apt/passenger/dists/trusty/main/binary-i386/Packages  gnutls_handshake() failed: A TLS packet with unexpected length was received.

E: Some index files failed to download. They have been ignored, or old ones used instead.

Well, since nobody answered here's what I ended up doing. It's greasier than than a Samsquanch but at least passenger is updated. Hopefully someone has a better answer.

General idea is to use sources.list to build a path to the filename on the remote repo, then download it with wget and install with dpkg.

# aptitude update
...

Err https://oss-binaries.phusionpassenger.com trusty/main i386 Packages                                                                                                                                            
  gnutls_handshake() failed: A TLS packet with unexpected length was received.
Ign https://oss-binaries.phusionpassenger.com trusty/main Translation-en                                                                                                                                           
Err https://oss-binaries.phusionpassenger.com trusty/main amd64 Packages                                                                                                                                           
  gnutls_handshake() failed: A TLS packet with unexpected length was received.
...                                                                                                                                                 
Fetched 9860 kB in 15s (651 kB/s)                                                                                                                                                                                  
W: Failed to fetch https://oss-binaries.phusionpassenger.com/apt/passenger/dists/trusty/main/binary-i386/Packages: gnutls_handshake() failed: A TLS packet with unexpected length was received.
W: Failed to fetch https://oss-binaries.phusionpassenger.com/apt/passenger/dists/trusty/main/binary-amd64/Packages: gnutls_handshake() failed: A TLS packet with unexpected length was received.
...



# wget https://oss-binaries.phusionpassenger.com/apt/passenger/dists/trusty/main/binary-amd64/Packages -O pkgs
...
2016-09-16 14:25:28 (392 KB/s) - 'pkgs' saved [419785/419785]


# grep Filename pkgs | grep passenger
...
Filename: pool/trusty/main/liba/passenger/libapache2-mod-passenger_5.0.30-1~trusty1_amd64.deb
...
Filename: pool/trusty/main/p/passenger/passenger_5.0.30-1~trusty1_amd64.deb



# cat /etc/apt/sources.list.d/passenger.list 
deb https://oss-binaries.phusionpassenger.com/apt/passenger trusty main

The prefix from passenger.list must go to wget, then append the Filename: portion from the Packages file of the deb you need to download.

# wget https://oss-binaries.phusionpassenger.com/apt/passenger/pool/trusty/main/p/passenger/passenger_5.0.30-1~trusty1_amd64.deb 
...
Saving to: 'passenger_5.0.30-1~trusty1_amd64.deb.1'


# wget https://oss-binaries.phusionpassenger.com/apt/passenger/pool/trusty/main/liba/passenger/libapache2-mod-passenger_5.0.30-1~trusty1_amd64.deb
...
Saving to: 'libapache2-mod-passenger_5.0.30-1~trusty1_amd64.deb'


# dir
-rw-r--r--  1 root root  291470 Jul 25 15:26 libapache2-mod-passenger_5.0.30-1~trusty1_amd64.deb
-rw-r--r--  1 root root 1661194 Jul 25 15:26 passenger_5.0.30-1~trusty1_amd64.deb

# dpkg -i libapache2-mod-passenger_5.0.30-1~trusty1_amd64.deb
(Reading database ... 71071 files and directories currently installed.)
Preparing to unpack libapache2-mod-passenger_5.0.30-1~trusty1_amd64.deb ...
Unpacking libapache2-mod-passenger (1:5.0.30-1~trusty1) over (1:5.0.30-1~trusty1) ...
Setting up libapache2-mod-passenger (1:5.0.30-1~trusty1) ...
 * Reloading web server apache2                                                                                                                                                                                     * 

# dpkg -i passenger_5.0.30-1~trusty1_amd64.deb  
(Reading database ... 71071 files and directories currently installed.)
Preparing to unpack passenger_5.0.30-1~trusty1_amd64.deb ...
Unpacking passenger (1:5.0.30-1~trusty1) over (1:5.0.30-1~trusty1) ...
Setting up passenger (1:5.0.30-1~trusty1) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
  • 0
Reply Report

As it turns out, when the Ubuntu 14.04 apt method https (found under /usr/lib/apt/methods/) is built with libcurl4-gnutls-dev, it causes this problem for me. Rebuilding apt with libcurl4-openssl-dev fixes the gnutls_handshake() error. What exactly is going on to cause this I don't know. Maybe related to this Git problem with the exact error. I am also going through a proxy.

  • 0
Reply Report

Warm tip !!!

This article is reproduced from Stack Exchange / Stack Overflow, please click

Trending Tags