hexo-qiniu-sync icon indicating copy to clipboard operation
hexo-qiniu-sync copied to clipboard

ERROR get file stat err

Open geekrainy opened this issue 8 years ago • 8 comments

运行 hexo s 后,浏览器访问本地地址。出现此错误。打开含有静态图片的地址就会报相应图片的错误。

D:\Blog>hexo s
INFO  -----------------------------------------------------------
INFO  qiniu state: online
INFO  qiniu sync:  true
INFO  qiniu local dir:  cdn
INFO  qiniu url:   https://o6lny6xxi.qnssl.com/static
INFO  -----------------------------------------------------------
INFO  Start processing
INFO  Now start qiniu sync.
INFO  Need upload file num: 0
INFO  Hexo is running at http://localhost:4000/. Press Ctrl+C to stop.
INFO  Now start qiniu watch.
ERROR get file stat err: static/images/githug-2/commit-history-2.png
[object Object]
ERROR get file stat err: static/images/a-byte-of-python/python.jpg
[object Object]
ERROR get file stat err: static/images/js-booleanObject-and-LogicalAND/example-2.jpg
[object Object]
ERROR get file stat err: static/images/githug-2/git-stash.png
[object Object]
ERROR get file stat err: static/images/js-booleanObject-and-LogicalAND/example-3.jpg
[object Object]
ERROR get file stat err: static/images/ife-note-2/microdata-example-code.png
[object Object]
ERROR get file stat err: static/images/ife-note-2/quick-sort-java.gif
[object Object]
ERROR get file stat err: static/images/a-byte-of-python/python.jpg
[object Object]
ERROR get file stat err: static/images/learning-path/learning-path.jpg
[object Object]
ERROR get file stat err: static/images/how-does-email-work/mail-service.png
[object Object]
INFO  Good bye

geekrainy avatar Aug 13 '16 04:08 geekrainy

请给出配置

gyk001 avatar Aug 15 '16 04:08 gyk001

## Qinniu Sync
qiniu:
  offline: false
  sync: true
  bucket: rainylog
  access_key: *
  secret_key: *
  dirPrefix: static
  urlPrefix: https://***.qnssl.com/static
  local_dir: cdn
  update_exist: true
  image: 
    folder: images
    extend: 
  js:
    folder: js
  css:
    folder: css

geekrainy avatar Aug 15 '16 04:08 geekrainy

qq20160817-1 2x +1

qiniu:
  offline: false
  sync: true
  bucket: blog
  # access_key: AccessKey
  # secret_key: SecretKey
  secret_file: qiniu.json
  dirPrefix: static
  urlPrefix: http://oc18shmjb.bkt.clouddn.com
  up_host: https://up-z0.qbox.me/
  local_dir: static
  update_exist: true
  image: 
    folder: images
    extend: 
  js:
    folder: js
  css:
    folder: css

zongren avatar Aug 17 '16 03:08 zongren

@zongren bucket: 未修改

Exlany avatar Oct 19 '16 16:10 Exlany

@gyk001

qiniu:
  offline: false
  sync: true
  bucket: sumaolin
  secret_file: ./sec/qn.json
  dirPrefix: static
  urlPrefix: http://sumaolin.reekly.com/static
  up_host: http://upload.qiniu.com
  local_dir: static
  update_exist: true
  image: 
    folder: img
    extend: 
  js:
    folder: js
  css:
    folder: css

以上是我的插件相关的配置,也出现了上面的情况 下面是我的系统相关信息

λ hexo v
INFO  -----------------------------------------------------------
INFO  qiniu state: online
INFO  qiniu sync:  true
INFO  qiniu local dir:  static
INFO  qiniu url:   http://sumaolin.reekly.com/static
INFO  -----------------------------------------------------------
hexo: 3.2.2
hexo-cli: 1.0.2
os: Windows_NT 6.1.7601 win32 x64
http_parser: 2.5.2
node: 4.4.5
v8: 4.5.103.35
uv: 1.8.0
zlib: 1.2.8
ares: 1.10.1-DEV
icu: 56.1
modules: 46
openssl: 1.0.2h

sumaolin avatar Dec 21 '16 12:12 sumaolin

检查一下七牛的access_key和secret_key是否正确,我的开始写错了,报了这个错误,后来改好了,就没有了

foofuu avatar Jul 19 '17 08:07 foofuu

@sumaolin @zongren @geekrainy 亲测有效了,我是用travis持续集成,用环境变量替换那两个key时候,替换没成功,所以一直报这错,后来替换成功了就好了,在本地测试,如果key错误,也是报这个错误

foofuu avatar Jul 19 '17 10:07 foofuu

我也是这样的错误,找到源码打印的内容如下:

INFO Now start qiniu sync. ERROR get file stat err: "static/images/test.jpg" {"code":-1,"error":{"code":"ETIMEDOUT","errno":"ETIMEDOUT","syscall":"connect","address":"113.113.95.58","port":80,"name":"RequestError"}}

我的配置如下:

qiniu:
  offline: false
  sync: true
  bucket: jeffry
  secret_file: qiniu.json
  dirPrefix: static
  urlPrefix: http://ozi0tyy8p.bkt.clouddn.com/static
  local_dir: static
  update_exist: true
  image:
    folder: images
    extend:
  js:
    folder: js
  css:
    folder: css

jeffrey-sun avatar Nov 16 '17 07:11 jeffrey-sun