问题:

今天首次在azikaban上执行任务,一直报奇怪的错误,shell脚本在本地Linux上执行就没有任何问题,在azikaban上运行就不行,非常奇怪。尝试n遍之后终于出现一个比较靠谱的报错。

–错误:syntax error:unexpected end of file
–原因:其实就是在windows环境下写的脚本中的回车和换行符在Linux下的识别会产生紊乱。
–解决办法:dos2unix filename1,在Linux下运行,直接在源文件上修改。dos2unix命令其实就是将文件中的\r\n 转换为\n。
–结果:把修改后的文件放到azikaban上运行就没有问题了。

思考点:

1、第一次在本地运行没有错误是因为我是把脚本内容复制到了ssh终端自带的编辑器中,估计这个编辑器自动帮我格式化了Windows文件中的回车空格,所以没有发现错误。今后在测试脚本时要注意细节上的不同。
2、坑要慢慢踩

参考:http://www.cnblogs.com/kerrycode/archive/2015/12/26/5077969.html

阿兹卡班(azikaban)报错:syntax error:unexpected end of file相关推荐

  1. 脚本执行报错 syntax error: unexpected end of file

    发生场景:windows环境编辑/生成的shell脚本,在linux系统上运行时报错 可能的原因和解决办法: 1.如果脚本里面有if这样的,先数一下if 和 fi的数量是否匹配,很多时候是漏写了fi ...

  2. eslint报错Parsing error: Unexpected token prettier/prettier

    问题描述 index.html文件首行 eslint 报错Parsing error: Unexpected token prettier/prettier caused by "<! ...

  3. 执行shell脚本报错:syntax error near unexpected token `或syntax error: unexpected end of file...

    引起此问题最可能的原因是: 在windows下编写的文件上传到linux执行. 我是在notepad++上编写的代码,之后上传到linux执行,报此错误.仔细检查,语法方面没有错误.上网查了一下,发现 ...

  4. .bashrc: line 123: syntax error: unexpected end of file

    今天在Ubuntu上面配置Java环境,使用下面指令进入之后,好像对文件进行了修改. sudo vim ~/.bashrc 使用 source ~/.bashrc 报错如下: bash: .bashr ...

  5. shell:syntax error:unexpected end of file/Starting proxy www-balancer: cannot bind socket--转载

    src:http://www.2cto.com/os/201308/238962.html 执行某bash脚本是发生: syntax error: unexpected end of file 主要问 ...

  6. syntax error: unexpected end of file

    在windows上写的shell文件  上传到linux服务器老是报 syntax error: unexpected end of file  一行行删除检查也没找到原因 ,网上一搜才发现: DOS ...

  7. SHELL脚本“syntax error: unexpected end of file”解决方案[半原创]

    SHELL脚本"syntax error: unexpected end of file"解决方案[半原创] 参考文章: (1)SHELL脚本"syntax error: ...

  8. oracle00205报错,[Oracle] 数据库启动失败报错 ORA-00205: error in identifying control file

    有同事问我,他的数据库启动失败,报错如下: ORA-00205: error in identifying control file, check alert log for more info 这种 ...

  9. Parse error: syntax error, unexpected end of file in the line

    Parse error: syntax error, unexpected end of file in the line <?php if($member['user']){echo $mem ...

  10. [Vim 编译出错]syntax error: unexpected end of file

    系统环境:OSX 编辑器:vim 问题说明:编译文件时出现"Syntax error:unexpected end of file"错误 从网页粘贴到vi里的配置代码env.sh, ...

最新文章

  1. linux下配置vnc的方法
  2. 初学 Java Web 开发,请远离各种框架,从 Servlet 开发
  3. pythopn 迭代器
  4. Quartz的Scheduler初始化源码分析
  5. 使用Minify合并css和js减少http请求
  6. @RequestMapping的使用
  7. idea自动为行尾加分号
  8. 快放弃你的管家软件吧! Part 2 强制删除
  9. 原来历史人物的英文名竟然叫这些,太好笑了吧哈哈哈哈哈
  10. hive case when语法_SQL中CASE表达式的妙用
  11. 3 ~ express ~ 静态文件托管
  12. OpenSSL之PKey的EVP封装
  13. gitlab两种连接方式:ssh和http配置介绍
  14. 电大考计算机和英语,2016年电大+年电大计算机_英语_网考小抄.doc
  15. maven package,clean,install,compile命令
  16. ppc64,ppc64le,ARM,AMD,X86,i386,x86_64(AMD64),AArch64的概念
  17. 软件过程与管理复习(九)
  18. python依赖包冲突
  19. 放生改变命运居士真实感应实录
  20. python常用代码

热门文章

  1. 地下城与勇士(DNF)异次元裂缝副本(哥布林王国、蠕动之城、兰蒂卢斯的鹰犬、黑色大地、虚无之境 、巴卡尔之城)(童年的回忆)
  2. 图中奇度点的数量不可能有奇数个的证明
  3. 【Java】Spring init-method和@PostConstruct 原理
  4. Spring中init-method和destroy-method的四种方式
  5. Mybatis 入门到理解篇
  6. AXI 基础第 4 讲 - 使用 AXI VIP 作为 AXI4 主接口的协议检查工具
  7. lzg_ad:XPE的发布与部署步骤详解
  8. matlab 多子图_MATLAB|subplot子图分块绘制的方法
  9. Papervision 3D的简介
  10. ASP.NET复习资料