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

Error when run emacs-web-server #8

Closed
tumashu opened this issue Aug 18, 2016 · 1 comment
Closed

Error when run emacs-web-server #8

tumashu opened this issue Aug 18, 2016 · 1 comment

Comments

@tumashu
Copy link

tumashu commented Aug 18, 2016

Debugger entered--Lisp error: (file-error "make server process failed" "成功" :name "ws-server" :service 6789 :filter ws-filter :server t :nowait t :family ipv4 :coding no-conversion :plist (:server [eieio-class-tag--ws-server (lambda (&rest --cl-rest--) (apply (function (lambda (G5 G6 request) (let* ((object request)) (let* ((path (substring (decode-coding-string (url-unhex-string (cdr (assoc :GET (slot-value object (quote headers))))) (quote utf-8)) 1)) (path-expand (expand-file-name path (symbol-value G6))) (path-index-file (concat (file-name-as-directory path-expand) "index.html"))) (if (or (ws-in-directory-p (symbol-value G6) path-expand) (< (length path) 1)) (cond ((file-exists-p path-index-file) (ws-send-file (slot-value object (quote process)) path-index-file)) ((and (file-exists-p path-expand) (not (file-directory-p path-expand))) (ws-send-file (slot-value object (quote process)) path-expand)) ((file-directory-p path-expand) (ws-send-directory-list (slot-value object (quote process)) path-expand)) (t (ws-send-404 (slot-value object (quote process))))) (ws-send-404 (slot-value object (quote process)))))))) (quote --port--) (quote --docroot--) --cl-rest--)) nil 6789 nil]) :log nil)
  make-network-process(:name "ws-server" :service 6789 :filter ws-filter :server t :nowait t :family ipv4 :coding no-conversion :plist (:server [eieio-class-tag--ws-server (lambda (&rest --cl-rest--) (apply (function (lambda (G5 G6 request) (let* (...) (let* ... ...)))) (quote --port--) (quote --docroot--) --cl-rest--)) nil 6789 nil]) :log nil)
  apply(make-network-process :name "ws-server" :service 6789 :filter ws-filter :server t :nowait t :family ipv4 :coding no-conversion :plist (:server [eieio-class-tag--ws-server (lambda (&rest --cl-rest--) (apply (function (lambda (G5 G6 request) (let* (...) (let* ... ...)))) (quote --port--) (quote --docroot--) --cl-rest--)) nil 6789 nil]) :log nil nil)
  (\(setf\ process\) (apply (function make-network-process) :name "ws-server" :service (port server) :filter (quote ws-filter) :server t :nowait t :family (quote ipv4) :coding (quote no-conversion) :plist (append (list :server server) (if log (progn (list :log-buffer log)))) :log (if log (progn (function (lambda (proc request message) (let (... ...) (save-current-buffer ... ... ...)))))) network-args) v)
  (let* ((v server)) (\(setf\ process\) (apply (function make-network-process) :name "ws-server" :service (port server) :filter (quote ws-filter) :server t :nowait t :family (quote ipv4) :coding (quote no-conversion) :plist (append (list :server server) (if log (progn (list :log-buffer log)))) :log (if log (progn (function (lambda (proc request message) (let ... ...))))) network-args) v))
  (let ((server (make-instance (quote ws-server) :handlers handlers :port port)) (log (if log-buffer (progn (get-buffer-create log-buffer))))) (let* ((v server)) (\(setf\ process\) (apply (function make-network-process) :name "ws-server" :service (port server) :filter (quote ws-filter) :server t :nowait t :family (quote ipv4) :coding (quote no-conversion) :plist (append (list :server server) (if log (progn (list :log-buffer log)))) :log (if log (progn (function (lambda ... ...)))) network-args) v)) (setq ws-servers (cons server ws-servers)) server)
  ws-start((lambda (&rest --cl-rest--) (apply (function (lambda (G5 G6 request) (let* ((object request)) (let* ((path ...) (path-expand ...) (path-index-file ...)) (if (or ... ...) (cond ... ... ... ...) (ws-send-404 ...)))))) (quote --port--) (quote --docroot--) --cl-rest--)) 6789)
  (setq owp/web-server (ws-start (list (quote lambda) (quote (&rest --cl-rest--)) (list (quote apply) (list (quote function) (function (lambda (G5 G6 request) (let* ... ...)))) (list (quote quote) --cl-port--) (list (quote quote) --cl-docroot--) (quote --cl-rest--))) (symbol-value --cl-port--)))
  (progn (setq owp/web-server (ws-start (list (quote lambda) (quote (&rest --cl-rest--)) (list (quote apply) (list (quote function) (function (lambda ... ...))) (list (quote quote) --cl-port--) (list (quote quote) --cl-docroot--) (quote --cl-rest--))) (symbol-value --cl-port--))))
  (if (and (not owp/web-server) (symbol-value --cl-docroot--) (symbol-value --cl-port--)) (progn (setq owp/web-server (ws-start (list (quote lambda) (quote (&rest --cl-rest--)) (list (quote apply) (list (quote function) (function ...)) (list (quote quote) --cl-port--) (list (quote quote) --cl-docroot--) (quote --cl-rest--))) (symbol-value --cl-port--)))))
  (let ((--cl-docroot-- (make-symbol "--docroot--")) (--cl-port-- (make-symbol "--port--"))) (progn (let* ((v --cl-docroot--)) (set v (expand-file-name docroot))) (let* ((v --cl-port--)) (set v port))) (if (and (not owp/web-server) (symbol-value --cl-docroot--) (symbol-value --cl-port--)) (progn (setq owp/web-server (ws-start (list (quote lambda) (quote (&rest --cl-rest--)) (list (quote apply) (list ... ...) (list ... --cl-port--) (list ... --cl-docroot--) (quote --cl-rest--))) (symbol-value --cl-port--))))))
  owp/web-server-start("/home/feng/.emacs.d/owp-temp.d/org-webpage/test-publish/" 6789)
  (progn (owp/web-server-start docroot port) (setq owp/last-web-server-docroot docroot) (setq owp/last-web-server-port port) (if owp/web-server (progn (browse-url-default-browser (format "http://localhost:%s" port)))))
  (progn (progn (owp/web-server-start docroot port) (setq owp/last-web-server-docroot docroot) (setq owp/last-web-server-port port) (if owp/web-server (progn (browse-url-default-browser (format "http://localhost:%s" port))))))
  (if (and docroot port) (progn (progn (owp/web-server-start docroot port) (setq owp/last-web-server-docroot docroot) (setq owp/last-web-server-port port) (if owp/web-server (progn (browse-url-default-browser (format "http://localhost:%s" port)))))))
  (let ((docroot (or docroot owp/last-web-server-docroot)) (port (or port owp/last-web-server-port))) (if (and docroot port) (progn (progn (owp/web-server-start docroot port) (setq owp/last-web-server-docroot docroot) (setq owp/last-web-server-port port) (if owp/web-server (progn (browse-url-default-browser (format "http://localhost:%s" port))))))))
  owp/web-server-browse("/home/feng/.emacs.d/owp-temp.d/org-webpage/test-publish/" 6789)
  (let ((owp/always-use-relative-url t) (port (or (owp/get-config-option :web-server-port) (owp/get-random-number 4)))) (owp/prepare-theme-resources test-publish-dir) (owp/publish-changes repo-files changed-files test-publish-dir) (owp/web-server-browse test-publish-dir port))
  (if test-publish (let ((owp/always-use-relative-url t) (port (or (owp/get-config-option :web-server-port) (owp/get-random-number 4)))) (owp/prepare-theme-resources test-publish-dir) (owp/publish-changes repo-files changed-files test-publish-dir) (owp/web-server-browse test-publish-dir port)) (if upload-latest-publish nil (owp/prepare-theme-resources export-dir) (owp/publish-changes repo-files changed-files export-dir)) (owp/generate-and-run-uploader uploader-file remote export-dir history-dir publish-dir partial-update))
  (let* ((remote (owp/get-config-option :remote)) (uploader-config (cdr (assoc (nth 0 remote) owp/uploader-config-alist))) (support-partial-update (plist-get uploader-config :support-partial-update)) (jobs (if support-partial-update (quote ((1 . "Full publish") (2 . "Partial publish") (3 . "Test full publish") (4 . "Test partial publish") (5 . "Upload latest publish"))) (quote ((1 . "Full publish") (2 . "Test full publish") (3 . "Upload latest publish"))))) (job-used (completing-read "Which job do you want to active: " (mapcar (function cdr) jobs))) (job-number (car (rassoc job-used jobs))) (test-publish (if support-partial-update (or (= job-number 3) (= job-number 4)) (= job-number 2))) (partial-update (and support-partial-update (or (= job-number 2) (= job-number 4)))) (upload-latest-publish (if support-partial-update (= job-number 5) (= job-number 3))) (repo-dir (owp/get-repository-directory)) (publish-root-dir (owp/get-uploader-directory project-name)) (export-dir (owp/get-uploader-directory project-name "export")) (history-dir (owp/get-uploader-directory project-name "history")) (publishing-directory (if publishing-directory (progn (expand-file-name publishing-directory)))) (publish-dir (or publishing-directory (owp/get-uploader-directory project-name "publish") (owp/get-publishing-directory))) (test-publish-dir (owp/get-uploader-directory project-name "test-publish")) (uploader-file (concat publish-root-dir "owp-uploader.sh")) (site-domain (owp/get-site-domain)) (preparation-function (owp/get-config-option :preparation-function)) (repo-files (if upload-latest-publish nil (if preparation-function (progn (run-hooks (quote preparation-function)))) (owp/sort-files (owp/remove-matched-items (owp/directory-files-recursively repo-dir "\\.org$") (owp/get-config-option :ignore))))) (update-top-n (cond ((and partial-update (numberp update-top-n)) update-top-n) (partial-update (owp/read-top-n "Org-webpage will update TOP (N) org-files, Please type N: " repo-files repo-dir)))) (changed-files (if (numberp update-top-n) (cl-subseq repo-files 0 (min update-top-n length-repo-files)) repo-files))) (if upload-latest-publish (owp/delete-directory history-dir publish-dir test-publish-dir) (owp/delete-directory publish-root-dir) (owp/make-directory export-dir)) (owp/make-directory history-dir publish-dir test-publish-dir) (if test-publish (let ((owp/always-use-relative-url t) (port (or (owp/get-config-option :web-server-port) (owp/get-random-number 4)))) (owp/prepare-theme-resources test-publish-dir) (owp/publish-changes repo-files changed-files test-publish-dir) (owp/web-server-browse test-publish-dir port)) (if upload-latest-publish nil (owp/prepare-theme-resources export-dir) (owp/publish-changes repo-files changed-files export-dir)) (owp/generate-and-run-uploader uploader-file remote export-dir history-dir publish-dir partial-update)))
  owp/do-publication()
  funcall-interactively(owp/do-publication)
  #<subr call-interactively>(owp/do-publication record nil)
  ad-Advice-call-interactively(#<subr call-interactively> owp/do-publication record nil)
  apply(ad-Advice-call-interactively #<subr call-interactively> (owp/do-publication record nil))
  call-interactively(owp/do-publication record nil)
  command-execute(owp/do-publication record)
  #[257 "\304\305!\203\f
@wynro
Copy link
Contributor

wynro commented Dec 5, 2016

Can you try to change the line 127 in web-server.el from

:nowait t

to

:nowait nil

Remember to recompile the file after the change

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

No branches or pull requests

2 participants