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

Document conversion fails over NFS mounted drive using RStudio knit function #1326

Closed
kdaily opened this issue Jun 4, 2014 · 8 comments
Closed

Comments

@kdaily
Copy link

kdaily commented Jun 4, 2014

When knitting from RStudio (0.98.738) on files residing on an NFS-mounted drive, the first time is successful. All subsequent attempts to knit fail as below. If all files are moved to a local directory, knitting is sucessful every time.

output file: report.knit.md
/usr/lib/rstudio/bin/pandoc/pandoc report.utf8.md --to html --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash-implicit_figures --output report.html --filter /usr/lib/rstudio/bin/pandoc/pandoc-citeproc --section-divs --smart --self-contained --template /usr/lib64/R/library/rmarkdown/rmd/h/default.html --variable jquery:/usr/lib64/R/library/rmarkdown/rmd/h/jquery-1.10.2 --variable bootstrap:/usr/lib64/R/library/rmarkdown/rmd/h/bootstrap-3.0.3 --variable theme:/usr/lib64/R/library/rmarkdown/rmd/h/bootstrap-3.0.3/css/bootstrap.min.css --no-highlight --variable highlightjs=/usr/lib64/R/library/rmarkdown/rmd/h/highlight --mathjax --variable mathjax-url:https://c328740.ssl.cf1.rackcdn.com/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML 
pandoc: report.html: hClose: does not exist (Host is down)
Error: pandoc document conversion failed
Execution halted
@wotuzu17
Copy link

wotuzu17 commented Sep 3, 2014

I have got the same problem. Any solutions yet?

@jgm
Copy link
Owner

jgm commented Sep 3, 2014

I would suggest reporting to RStudio first. If they can test
and diagnose the problem, and if it turns out to be a bug in
pandoc, they can report details here.

+++ Andreas Voellenklee [Sep 02 14 22:32 ]:

I have got the same problem. Any solutions yet?


Reply to this email directly or [1]view it on GitHub.

References

  1. Document conversion fails over NFS mounted drive using RStudio knit function #1326 (comment)

@stroobandt
Copy link

stroobandt commented Aug 2, 2016

I ran into the same error using pandoc without Rstudio on a remote drive.
.pdf: hClose: does not exist (Host is down)
Generating the PDF locally works.
The error reminds me of a clock skew error.
Using touch * did not resolve the problem though.

@stroobandt
Copy link

Both the input and output file are in the same remote folder.
A solution were for pandoc to generate the output in some fail safe local temporary directory (e.g. /tmp) and then copy the output file to the final remote destination directory on the network drive.

This pandoc bug should be reopened. I frequently run into it and apart from being obscure, it is pretty annoying.

@stroobandt
Copy link

For the sake of completeness, I have to state that I am running pandoc from a makefile in the same remote CIFS directory. Here is a simplified copy of the original makefile:

SHELL := /bin/bash
NAME := $(basename $(wildcard *.md))

all: $(NAME).pdf

$(NAME).pdf: $(NAME).md
    pandoc --smart --output=$@ --template="$$HOME/texmf/pandoc.templates/letter.tex" $<
    xdg-open $@

I resolved my issue by letting pandoc generate its PDF output in /tmp, before moving it back to the remote folder which contains the input file and the makefile:

SHELL := /bin/bash
NAME := $(basename $(wildcard *.md))

all: $(NAME).pdf

$(NAME).pdf: $(NAME).md
    pandoc --smart --output="/tmp/$@" --template="$$HOME/texmf/pandoc.templates/letter.tex" $<
    mv "/tmp/$@" $@
    xdg-open $@

I hope this helps others who occasionally need to run pandoc in a remote folder.

@jgm
Copy link
Owner

jgm commented Aug 6, 2016

I can reopen this, but I'm really not sure what to do about it.
It sounds more like a problem/limitation with cifs than a problem with pandoc itself.
A workaround might be creating the output file in /tmp and copying it, as you suggest. But (a) this creates unnecessary complexity for people not on cifs, and (b) on Windows we don't have this kind of reliably available temp directory.

@jgm jgm reopened this Aug 6, 2016
@M-Barrows
Copy link

Still experiencing this issue as of today. Any word on fixing this soon?

@agusmba
Copy link
Contributor

agusmba commented Jul 18, 2018

(Just my 2c)

As jgm said, it sounds more like a problem with the filesystem itself.

Even microsoft applications do not deal with these things completely, I just lost a few hours of scratching my head with a weirdly malfunctioning import from excel to project, and it was all due to the excel file being on a remote mapped location (as soon as I copied it to my local disk it all worked).

So I wouldn't pin my hopes on this being solved within pandoc

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

8 participants