Forum Stats

  • 3,840,371 Users
  • 2,262,594 Discussions
  • 7,901,249 Comments

Discussions

CEP server startup error

984875
984875 Member Posts: 32
edited Apr 5, 2013 2:12PM in Complex Event Processing
Dear Legends,
I'm able to start CEP server by just executing ./startwlevs.sh via terminal. But when i start the server through shell script, i'm getting the following error
"/u01/user_projects/domains/ocep_domain/defaultserver/startwlevs.sh: line 5: ./setDomainEnv.sh: No such file or directory"

My shell script:
#!/bin/sh
nohup sh $DOMAIN_HOME/ocep_domain/defaultserver/startwlevs.sh &> ocep1.out &

Pls help to resolve this error.

Thanks in Advance

Answers

  • DaveRorke
    DaveRorke Member Posts: 16
    The startwlevs.sh script calls (sources) the ./setDomainEnv.sh file using a relative path that expects setDomainEnv.sh to be in the current directory. So the startwlevs.sh script itself needs to be run with a current working directory of /u01/user_projects/domains/ocep_domain/defaultserver or it won't be able to find the setDomainEnv.sh script. If you're launching your higher level script from some other directory, the current working directory will typically be set to whatever directory your terminal shell is currently in.

    You can try explicitly changing directory in your script, e.g.

    #!/bin/sh
    cd $DOMAIN_HOME/ocep_domain/defaultserver
    nohup sh $DOMAIN_HOME/ocep_domain/defaultserver/startwlevs.sh &> ocep1.out &
    DaveRorke
  • 984875
    984875 Member Posts: 32
    edited Apr 5, 2013 2:12PM
    #!/bin/sh
    cd $DOMAIN_HOME/ocep_domain/defaultserver
    nohup sh $DOMAIN_HOME/ocep_domain/defaultserver/startwlevs.sh &> ocep1.out &
    It is working. Thank u so much.

    Edited by: 981872 on Apr 5, 2013 11:11 AM
This discussion has been closed.