hexo-qiniu-sync
hexo-qiniu-sync copied to clipboard
ERROR get file stat err
运行 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
请给出配置
## 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

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 bucket: 未修改
@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
检查一下七牛的access_key和secret_key是否正确,我的开始写错了,报了这个错误,后来改好了,就没有了
@sumaolin @zongren @geekrainy 亲测有效了,我是用travis持续集成,用环境变量替换那两个key时候,替换没成功,所以一直报这错,后来替换成功了就好了,在本地测试,如果key错误,也是报这个错误
我也是这样的错误,找到源码打印的内容如下:
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