DietPi-Survey | Failed connection test causes UI blocking

Created on 28 Jul 2018  ·  3Comments  ·  Source: MichaIng/DietPi

Details:

  • Date | Sat 28 Jul 03:14:40 BST 2018
  • Bug report | N/A
  • DietPi version | v6.12
  • Img creator | DietPi Core Team
  • Pre-image | Raspbian Lite
  • SBC device | RPi 3 Model B+ (armv7l) (index=3)
  • Kernel version | #1123 SMP Wed Jun 27 17:35:49 BST 2018
  • Distro | stretch (index=4)
  • Command | Connection test: dietpi.com
  • Exit code | 4
  • Software title | DietPi-Survey

Steps to reproduce:

  1. ...
  2. ...

Expected behaviour:

  • ...

Actual behaviour:

  • ...

Extra details:

  • ...

Additional logs:

Log file contents:
Spider mode enabled. Check if remote file exists.
--2018-07-28 03:14:08--  http://dietpi.com/
Resolving dietpi.com (dietpi.com)... 185.101.93.93
Connecting to dietpi.com (dietpi.com)|185.101.93.93|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://dietpi.com/ [following]
Spider mode enabled. Check if remote file exists.
--2018-07-28 03:14:08--  https://dietpi.com/
Connecting to dietpi.com (dietpi.com)|185.101.93.93|:443... connected.
Unable to establish SSL connection.
Enhancement Unable to replicate

Most helpful comment

@ftokc
Works well here, I guess it was a temporary connection issue.

@Fourdee
Shall we check URL on /DietPi/dietpi/dietpi-survey 1 silently (G_USER_INPUTS=0 G_RUN_CMD_INFO_ONLY=1 G_CHECK_URL dietpi.com && echo yes || echo no works well for this)? Survey should not bother user at all, if not interactively started.

All 3 comments

@ftokc
Works well here, I guess it was a temporary connection issue.

@Fourdee
Shall we check URL on /DietPi/dietpi/dietpi-survey 1 silently (G_USER_INPUTS=0 G_RUN_CMD_INFO_ONLY=1 G_CHECK_URL dietpi.com && echo yes || echo no works well for this)? Survey should not bother user at all, if not interactively started.

@MichaIng

There is already some info checks after curl command:

        curl --connect-timeout 4 --retry 1 --retry-delay 4 -sT "$UPLOAD_FILENAME" sftp://"$SFTP_USER":"$SFTP_PASS"@"$SFTP_ADDR"/survey/
        if (( $? )); then

            # Silently fail, in case of non-interactive mode
            (( ! $INPUT )) && G_DIETPI-NOTIFY 1 'Failed to connect to SFTP server. Please try again later or report this to DietPi forum or GitHub repo in the first place.'

But yeah, I'll add your changes to the script 👍

🈯️

root@DietPi:~# dietpi-survey 1
[FAILED] DietPi-Survey | Connection test: dietpi.comx
[FAILED] DietPi-Survey | Failed to connect to SFTP server. Please try again later or report this to DietPi forum or GitHub repo in the first place.
root@DietPi:~# echo $G_USER_INPUTS
1

I'll mark this as completed, with temp net issue experienced by @ftokc

@ftokc
If problems persist, please reopen this ticket and we'll investigate.

Was this page helpful?
0 / 5 - 0 ratings