I get an error like this when I execute the command. How do I fix this error?
Erlang Version: 22.3
Operating System: Centos OS 7
{"init terminating in do_boot",{{badmatch,{error,{1,erl_parse,["syntax error before: ","','"]}}},[{init,start_it,1,[]},{init,start_em,1,[]},{init,do_boot,3,[]}]}}
init terminating in do_boot ({{badmatch,{error,{1,erl_parse,[_]}}},[{init,start_it,1,[]},{init,start_em,1,[]},{init,do_boot,3,[]}]})
Crash dump is being written to: erl_crash.dump...done
It is syntax error, not difficult to debug.
You should have source code and check the program and write some debug statement if necessary.
Mot likely the $1 and $option are not resolving to correct values...
As I try the following command, trying to simulate what might be executing as part of the shell script, I get the same error as you are...
$ erl -noshell -pa /tools_core/ebin -pa ./ebin -eval "make:all(),gen_data:gen(,)" -s c q
{"init terminating in do_boot",{{badmatch,{error,{1,erl_parse,["syntax error before: ","','"]}}},[{init,start_it,1,[]},{init,start_em,1,[]},{init,do_boot,3,[]}]}}
init terminating in do_boot ({{badmatch,{error,{1,erl_parse,[_]}}},[{init,start_it,1,[]},{init,start_em,1,[]},{init,do_boot,3,[]}]})
Crash dump is being written to: erl_crash.dump...done
So most likely, you should check what values they are resolving to. If they are resolving to an empty value, then erlang parse will fail. Since it says before ,, I suspect it's the resolution of $1 which is not happening properly.
can you echo these values and let us know what are they resolving to??
Most likely, $1 should take the command line argument which gets passed along while invoking this shell script. Since its your environment, can't say much. But please try and share what $1 is resolving to in your case.
Jenkins jq command not found in Windows
I tried executing curl command in Jenkins using Execute Shell in my local machine
command that I tried,
access_token=$(echo "$auth_call" | jq '.Token' | tr -d '"' )
and while executing it, it throws an error,
++ jq .Token
C:\WINDOWS\TEMP\jenkins7847423252232692785.sh: line 8: jq: command not found
++ tr -d '"'
+ access_token=
+ echo
Can you please tell me how to install the "jq" package for windows machine and how to set it up for the Jenkins to access that package.
access_token=$(echo "$auth_call" | jq '.Token' | tr -d '"' )
It shouldn't throw the error.
I tried that as well, It didn't work
First, make sure you have a jq.exe working, before trying to call it from a Jenkins job.
If not, download jq-1.6/jq-win64.exe and rename it jq.exe.
Second, make sure your Jenkins will execute its job on itself (master node).
Third, try again with the full path of your jq.exe program, and see if the issue persists.
When I run opensipsctl start command for start opensips that time I got one error.
ERROR: PID file /var/run/opensips.pid does not exist -- OpenSIPS start failed
So please help me to solve it.
open up opensipsctl, it includes the file opensipsctlrc, which defined $PID_FILE as /var/run/opensips.pid
Then in opensipsctl, when you run start one of the checks is..
if [ ! -s $PID_FILE ] ; then
echo
merr "PID file $PID_FILE does not exist -- OpenSIPS start failed"
exit 1
fi
Which is saying if then check of whethever '/var/run/opensips.pid exists and is bigger than 0 bytes' fails, then echo out the above error.
This means the file isn't being created.
If you look just above that line it does..
if [ $SYSLOG = 1 ] ; then
$OSIPSBIN -P $PID_FILE $STARTOPTIONS 1>/dev/null 2>/dev/null
else
$OSIPSBIN -P $PID_FILE -E $STARTOPTIONS
fi
Which is where opensips actually starts. I would suggest adding the following to your opensips.cfg if you havn't already..
# Logging
debug=6
log_stderror=no
log_facility=LOG_LOCAL0
..now everything will be logged to /var/log/syslog on boot.
Try boot again, then look at that log for info about what's happened.
Another thing to check, is the user you're running opensips as has permission to access the directory it's trying to create the pid file in.
I had the same error & it was driving me mad as well. I managed to trace it down to one of two things - I had both!
1/ A misconfiguration in the OpenSIPS config file. journalctl -xe should be able to tell you what the error is
2/ Something else is listening on the port that you are trying to listen on
For 2, you can try the below, if you have Ubuntu, to see if anything is already listening on that port
lsof -i :5060
I was able to see logs and fix issue by below steps
Set log_level=4 in opensips.cfg to view debug logs in /var/log/syslog
debug is deprecated in 2.4 and higher version.
You can refer here for different log level
I make a file in my rails app /bin/restart_resque.sh
kill `cat tmp/pids/scheduler.pid`
When I execute bin/restart_resque.sh,I got the error
: arguments must be process or job IDs624
and the process is still working.
Then I change the file to :
kill 2624
I got the same error,but the process 2624 is do exist.why?
You have invalid PID in scheduler.pid or file is not exists.
Check file and permissions:
namei -lm tmp/pids/scheduler.pid
Check PID (resque process must have PID from pid file):
cat tmp/pids/scheduler.pid
ps aux | grep `cat tmp/pids/scheduler.pid`
I found the issue.
when I execute file bin/resque_restart.sh
bin/resque_restart.sh: ASCII text, with CRLF line terminators
so the file format is the reason.but I don't know why.
I am trying to figure out what the grep syntax would be to get one\unique result of a search.
For example :
grep "^SEVERE" server.out
SEVERE: Cannot connect repository, Error occurred when calling service PING_SERVER.
SEVERE: Cannot connect repository, Error occurred when calling service PING_SERVER.
SEVERE: Cannot connect repository, Error occurred when calling service PING_SERVER.
I would like the output to show only the first find of the that occurrence.
Any Help would be great!
tcwbot
GNU grep 2.16 which comes with cygwin has this option (from 'man grep'):
-m NUM, --max-count=NUM
Stop reading a file after NUM matching lines. If the input is
standard input from a regular file, and NUM matching lines are
output, grep ensures that the standard input is positioned to
just after the last matching line before exiting, regardless of
the presence of trailing context lines. This enables a calling
process to resume a search. When grep stops after NUM matching
lines, it outputs any trailing context lines. When the -c or
--count option is also used, grep does not output a count
greater than NUM. When the -v or --invert-match option is also
used, grep stops after outputting NUM non-matching lines.
So try:
$ grep -m 1 "^SEVERE" server.out