Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PPK installation fails: Update failed. Link folder '' could not be found. #140

Open
mica2409 opened this issue Dec 5, 2018 · 10 comments
Open

Comments

@mica2409
Copy link

mica2409 commented Dec 5, 2018

Hello

I tried to install latest SPK release of openhab on Synology DSM 6.2.1-23824 Update 1.
Install failed and i get this message below on logs:
Same problem with shared or without shared folder.
Have you any idea of what is wrong on my installation?
Thanks for help.

TMPFS: true
Z-Wave: true
port: 8080
tmp: /volume1/@tmp
share: /var/services/homes
oh: /var/services/homes/openhab
backup: -backup-201812
done
User that exec the Installation
root
Start preupgrade...
Stop server
Remove tmp, cache and runtime dirs
Remove openHAB system files
Create backup
Save symbolic link folders
ERROR:
Update failed. Link folder '' could not be found.
Please try again or contact the github contributors.

@bencirulis
Copy link

Hi all,
Thanks for the great work on this.
I have the same issue trying to update to v2.4.:
Any assistance would be appreciated!

S T A R T - o p e n H A B S P K

2019-01-17:07:41:06

Set instance variables...
public: true
smarthome: false
home: false
TMPFS: true
Z-Wave: true
port: 8090
port: 8443
tmp: /volume1/@tmp
share: /volume1/public
oh: /volume1/public/openHAB
backup: /volume1/@appstore/openHAB-backup-201901
done
User that exec the Installation
root
Start preupgrade...
Stop server
Remove tmp, cache and runtime dirs
Remove openHAB system files
Create backup
Save symbolic link folders
ERROR:
Update failed. Link folder '' could not be found.
Please try again or contact the github contributors.

@marcdevinci
Copy link

marcdevinci commented Jan 19, 2019

+1

I have exactly the same issue with my installation (DSM 6.2.1-23824 Update 4). Any workaround or solutions? Thanks a lot

@marcdevinci
Copy link

Checking the code of installer.sh in GitHub (https://github.com/openhab/openhab-syno-spk/blob/master/scripts/installer.sh), something seems to be strange.

"Create backup" worked because I see all files moved from original directory to backup directory (${BACKUP_FOLDER}/userdata)

It means that variable ${SYNOPKG_PKGDEST} has the right value but for some strange reasons variable ${LINK_FOLDER} is then empty. Probably following instructions leads to an empty output:
LINK_FOLDER="$(readlink ${SYNOPKG_PKGDEST}/conf)"
or
LINK_FOLDER="$(dirname ${LINK_FOLDER})"

Extract from lines 501 to 518:


 echo "  Create backup" >>$LOG
  # Create backup
  mkdir -p ${BACKUP_FOLDER}/userdata
  mv ${SYNOPKG_PKGDEST}/userdata/* ${BACKUP_FOLDER}/userdata
  
  # save home dir content if exists or save current content for the new location
  LINK_FOLDER="$(readlink ${SYNOPKG_PKGDEST}/conf)"
  if [[ "${pkgwizard_home_dir}" == "true" || ${LINK_FOLDER} != ${OH_CONF} ]]; then
    echo "  Save symbolic link folders" >>$LOG
    LINK_FOLDER="$(dirname ${LINK_FOLDER})"

    if [[ -z "${LINK_FOLDER}" || ! -d "${LINK_FOLDER}" ]]; then
      echo "  ERROR:" >>$LOG
      echo "  Update failed. Link folder '${LINK_FOLDER}' could not be found. " >>$LOG
      echo "  Please try again or contact the github contributors." >>$LOG
      echo " Link folder not found. See log file $LOG for more details." >> $SYNOPKG_TEMP_LOGFILE
      exit 1
    fi

Any idea?

@martycastilla
Copy link

I had the same issue so I tried an older version an it installed fine. I used 2.3.0.003

@cniweb
Copy link
Member

cniweb commented Feb 3, 2019

@martycastilla In the code comparison between 2.3.0.003 and 2.4.0.001 there is no difference in the installer.sh script.

@hooperbloob
Copy link

Is there a workaround? Maybe creating some sacrificial file or directory?

@hooperbloob
Copy link

It failed for me in the same way with these previous versions:

2.4.0.001 -> Update failed. Link folder '' could not be found.
2.3.0.005 -> Update failed. Link folder '' could not be found.
2.3.0.003 -> Update failed. Link folder '' could not be found.
2.3.0.002 installed but failed to run...

@martycastilla
Copy link

Interesting. The only thing that I can think of why it worked when I used a lower version is that I made sure the previous installation was completely removed via the Synology package manager. Then removing all residual folders and files via Ssh session. If this is the reason that it worked with my last attempt, then it should have worked 2.4.0.001 had I used it. With that said and the comments from others here, it's not a version issue.

I found the information on what to removed from a google search.

@cniweb
Copy link
Member

cniweb commented Mar 13, 2019

That's right, the previous installation must be completely removed through the Synology Package Manager. An update function is currently not implemented, or does not work yet.

@nougad
Copy link

nougad commented Jun 1, 2019

I was running into the same issue.

I picked /SmartHome/openHAB as a installation path but did not create /SmartHome/openHAB/{conf,addons,userdata}. That means /volume1/@appstore/openHAB/{conf,addons,userdata} was no symlink and the readlink on upgrade failed.

After creating the folders and reinstalling openHAB I could successfully upgrade.

@cniweb Is the statement that the package needs to be removed completely before upgrade still true? What's missing to make the upgrade working?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants