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

Installation on NAS4Free 9.2 - Missing directories and bad flavors #2

Closed
nickgrealy opened this issue Aug 12, 2014 · 16 comments
Closed

Installation on NAS4Free 9.2 - Missing directories and bad flavors #2

nickgrealy opened this issue Aug 12, 2014 · 16 comments

Comments

@nickgrealy
Copy link

@nickgrealy nickgrealy commented Aug 12, 2014

Hi!

I've just finished installing and setting up Finch on NAS4Free 9.2.0.1. It looks great, but it took a while to get it there. I hit a multitude of errors which I've documented under the following gist:
https://gist.github.com/nickgrealy/6f41abca78524910bfbf

I'm not sure whether the issues were caused by a faulty install (which took 6 hours, 44 minutes)? But issues ranged from:

  • missing directories
  • invalid directories in flavors
  • missing flavors (default)
  • resolv.conf / pkg.conf not being setup in the jail

I'm just hoping to improve the process for the next person. Please take a look and let me know if you need anything clarified? I'm going to try and sanitise/cleanup the gist, so that I can make it public (so others can search and find solutions to the errors - e.g. Google > No results found for "Error: Flavor not found. default".).

Kind regards (thanks),
Nick Grealy

@nickgrealy
Copy link
Author

@nickgrealy nickgrealy commented Aug 12, 2014

Btw, please let me know if there is anything you'd like removed from the gist before making it public? (I don't think there's anything "sensitive" in there??)

@dreamcat4
Copy link
Owner

@dreamcat4 dreamcat4 commented Aug 12, 2014

REPOST

The logs are showing that this is a bad install. For some reason, you did not have a reliable connection to ftp.freebsd.org, and fetching of freebsd has failed.

Multiple failures, which can be seen in install.log, here:

https://gist.github.com/nickgrealy/6f41abca78524910bfbf#file-install-log-L93-L124

https://gist.github.com/nickgrealy/6f41abca78524910bfbf#file-install-log-L959-L966

I'm sorry that the installer continues onward regardless. Perhaps finch can be improved in such ways. Either to retry downloading, or report more clearly that an error had occurred.

Installation started on Sun Aug 10 22:32:50 EST 2014
******************************************************************************
finch installed on: Mon Aug 11 05:17:02 EST 2014

Not sure why it took 6 hours. But that may also occur if some very slow or unreliable connection to freebsd servers. For everybody else it's taken 20 to 40 minutes.

You should test your connection to ftp.freebsd.org before trying to re-install again. Perhaps ftp connections from that host are being blocked / throttled? For example corporate firewall or other circumstance.

To be sure, I will also be installing finch from scratch again myself, in these next few days.

@dreamcat4
Copy link
Owner

@dreamcat4 dreamcat4 commented Aug 12, 2014

If you want to make your gist public, please remove lines 316-740 of install.log. I've just pushed an update to suppress those passwd infos from future log files. Many thanks.

https://gist.github.com/nickgrealy/6f41abca78524910bfbf#file-install-log-L316-L740

@nickgrealy
Copy link
Author

@nickgrealy nickgrealy commented Aug 13, 2014

Excellent, thanks for the quick response. Looks like I overlooked those errors in the install.log. It seems to be a common problem with fetch/freebsd - https://www.google.com.au/search?q=fetch+ftp+freebsd+"appears+to+be+truncated"

I'll try unsetting the FTP_PASSIVE_MODE config value and reinstall Finch tonight ( http://markmail.org/message/ke7y7guu65ee3jm7#query:+page:1+mid:ke7y7guu65ee3jm7+state:results ). If you're interested, I can let you know what fixes the issue?

It'd be great if the installer failed fast on this error (fetch or tar xf failed). It'd be even better if it could additionally suggest the fix in the logs!

If you can't reproduce the issue, I'd be more than happy to do any testing for you? (Not sure I'm up to the task of actually doing the fix atm)

@dreamcat4
Copy link
Owner

@dreamcat4 dreamcat4 commented Aug 13, 2014

OK @nickgrealy commit 62bc553. Pushed to finch master branch.

I'd really appreciate it if you can re-test ASAP, or at your earliest convenience please. So that we can make sure that nothing new is broken by these changes.

Many thanks.

Please let me know how you get on and provide new install.log.

@nickgrealy
Copy link
Author

@nickgrealy nickgrealy commented Aug 13, 2014

Yeh, looks like it's a problem with the "fetch" utility. Just trying to run the following command in a new console, results in it hanging indefinitely at 99% (it seems to ignore the timeout).
fetch -T 60 -v ftp://ftp.freebsd.org/...
https://gist.github.com/nickgrealy/b4ecd970f93d429925f6

I'll move this bug to the nas4free/freebsd forums. Thanks for your help. Unfortunately I can't confirm/wait it out, to confirm if the finch-bootstrap'er works with the new ftp handling.

@nickgrealy nickgrealy closed this Aug 13, 2014
@dreamcat4
Copy link
Owner

@dreamcat4 dreamcat4 commented Aug 13, 2014

I could only find a -T option on fetch to set the timeout. Not sure what else I can do here, if the fetch command never returns, or error out.

We use fetch to download the distfiles because alternatives like wget and curl are not part of Freebsd base, and don't exist on all of Finch's support platforms.

You can pre-pend truss to get a syscall trace. So long as the truss command is available in your local environment (may be removed from nas4free base system to save space). Just type truss fetch <fetch_args> ….

Of course that is no guarantee it will show you what the problem was.

@dreamcat4
Copy link
Owner

@dreamcat4 dreamcat4 commented Aug 13, 2014

@nickgrealy I cannot really guess what is happening. But this new commit 8874c8a will ensure that libc symlink exists before calling fetch to download the freebsd image.

You can re-try at your own discretion, it's just speculation that some missing lib .so file may be the cause. As was seen recently to cause certain other kinds of nasfree bug.

https://github.com/dreamcat4/finch/blob/master/chroot/etc/finch/subr/ib___mount_system#L20-21
https://github.com/dreamcat4/finch/blob/master/chroot/etc/finch/subr/ib___link_cmd#L22-24

@nickgrealy
Copy link
Author

@nickgrealy nickgrealy commented Aug 13, 2014

Thanks for that, I'll give it a go tonight (in approx 8 hrs) and I'll try truss to see if that helps show the cause.

In the meantime, here's the email that was generated from last night's install. (I'll also upload the install.log tonight). It looks like the build failed (which is good), but took ~3hrs.

Sorry, your Finch FreeBSD Installation has failed and is incomplete.

  • Fail reason: "couldn't fetch files from ftp.freebsd.org"
  • Installation halted at first point of failure. Did not go all the way.
  • Failure took place 0 seconds into the installation.
  • Failure detected on: Thu Aug 14 03:53:42 EST 2014
  • Attachment: "finch-install.log.gz".

(It says the finch-install.log.gz is attached, but it's actually not.)

@nickgrealy
Copy link
Author

@nickgrealy nickgrealy commented Aug 14, 2014

Hi, thanks for that. I've added the install.log, and the logs from the truss. I've highlighted the section where I cancelled (ctrl+c).
https://gist.github.com/nickgrealy/495e92b82688f3d58fda#file-truss-log-L272-L276
Same issue is still occurring. I'm currently running another install, but it appears to have stalled at the same section. Unless there's something telling in the logs, I'm not sure there's much else to be done. I'll chase it up on the freebsd forums. https://forums.freebsd.org/viewtopic.php?f=7&t=47616&p=265922
In the meantime, I'll try rolling back to an old version of NAS4Free.

@dreamcat4
Copy link
Owner

@dreamcat4 dreamcat4 commented Aug 14, 2014

Thanks! I'll take a look at those logs files later.

BTW, If you decide to re-install nas4free then please be aware that finch requires 9.2.X.
Also please be aware that newer versions are available too (from zoonsweb), up to r999:

http://www.zoonsweb.nl/Latest_NAS4Free_Builds/

@nickgrealy
Copy link
Author

@nickgrealy nickgrealy commented Aug 16, 2014

So, just trying some different options, (I rolled back to rev943) I don't know why I didn't try HTTP vs FTP sooner..

HTTP protocol works, FTP doesn't! I notice that there's a different local filesize for HTTP, than for FTP (am I reading this right?) - https://gist.github.com/nickgrealy/7f1a9c63b3372be9a404#file-works-log-L7

So, I'm going to download the files (HTTP), then try running Finch Bootstrap with the --txz-distfiles-dir "{txz_distfiles_dir}" option. Any chance we can change the finch bootstrap to use HTTP instead of FTP?

@dreamcat4
Copy link
Owner

@dreamcat4 dreamcat4 commented Aug 16, 2014

@nickgrealy I wasn't aware that was even possible… Thanks!

Commit 2833af9 - Finch will now download over http by default. If that fails, it will re-try over active ftp. Lastly passive ftp. Timeout value reduced to 30 seconds.

You may try again at your discretion. Please email me your install.log afterwards, to make sure of no further issues.

@dreamcat4 dreamcat4 reopened this Aug 17, 2014
@dreamcat4
Copy link
Owner

@dreamcat4 dreamcat4 commented Aug 17, 2014

@nickgrealy did it work? Anything still broken?

@nickgrealy
Copy link
Author

@nickgrealy nickgrealy commented Aug 17, 2014

Hey, install worked perfectly! install.log - https://gist.github.com/nickgrealy/2f07dd90ebbf7db0dd6e (nevermind the time, despite the advice of the install instructions, I installed onto the USB drive).

I managed to install & start a jail without problems! I am however getting the following error when trying to update the packages.
"Sandboxed process pid=7643 terminated abnormally by signal: 4"
https://gist.github.com/nickgrealy/2f07dd90ebbf7db0dd6e#file-update_packages-sh-L2-L11

Not sure why (and I haven't had time to investigate it). If you've seen the error before, please let me know what to do. Otherwise, I'm more then satisfied that the original issue is fixed (and thank you for all your help!).

@dreamcat4 dreamcat4 closed this Aug 17, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants