Skip to main content

ERROR 4424

  • May 20, 2014
  • 6 replies
  • 20 views

Roman_R
Forum|alt.badge.img
Hi , I have problem when call external procedure. 
She output - 1

Shell-script with jar:
#!/bin/bash 

java -jar /home/dbadmin/java/hi.jar 

Command line:
dbadmin=> create procedure proc27113() as 'hiplanet.sh'
dbadmin-> language 'external' user 'dbadmin';
CREATE PROCEDURE
dbadmin=> select proc27113();
ERROR 4424:  Procedure execution error: exit status=1

6 replies

Roman_R
Forum|alt.badge.img
  • Author
  • Participating Frequently
  • May 20, 2014
I added exit 0 in my script, but result is the same

Forum|alt.badge.img+2
  • Participating Frequently
  • May 20, 2014
Hi Roman,

Does the script run on its own, outside of Vertica?

It sounds like the script is failing before it can get to "exit 0".  I would suggest that you add some debug logging; have the script output to a file, etc.

Adam

Daniel_Leybovic
Forum|alt.badge.img+1
  • Participating Frequently
  • May 20, 2014
Hi!

You are posting too much problems. Read docs!!!

EXTERNAL PROCEDURE require exit status code, why you don't define it?
https://my.vertica.com/docs/7.0.x/HTML/index.htm#Authoring/ProgrammersGuide/StoredProcedures/Require...
Note: The file should end with exit 0, and exit 0 must reside on its own line. This naming convention instructs HP Vertica to return 0 when the script succeeds.
PS
Much more easy to ask than to read, agree.





Roman_R
Forum|alt.badge.img
  • Author
  • Participating Frequently
  • May 20, 2014
The shell-script working correctly outside Vertica and insert statement inside Java is working. All records are appear in database. But when I create procedure and run it error code is 1

Daniel_Leybovic
Forum|alt.badge.img+1
  • Participating Frequently
  • May 21, 2014
How path to java is defined?
Try a full path to JAVA in EP or create link in /bin directory to java.
Environment variables are not passed from Vertica, so if path is defined in env vars EP will fail.

Roman_R
Forum|alt.badge.img
  • Author
  • Participating Frequently
  • May 21, 2014
I solved the problem this way:I created this last procedure and initialize, but there I install new procedure.
After I re-initialized my procedure that didn't work and after that it called.