Have followed all of the instructions in the guide for remote external jobs. Running into the following error when trying to register a remote agent with the database:
./schagent -registerdatabase atlantic 16021
Agent Registration Password ? ********
ERROR: Connecting to: http://atlantic:16021/remote_scheduler_agent/register_agent. java.io.IOException: Server returned HTTP response code: 401 for URL: http://atlantic:16021/remote_scheduler_agent/register_agent2
If from that same machine I run the following - telnet atlantic 16021 - I get 'Connected to atlantic'.
When logged into the database named stage on atlantic, I can run the following query:
select dbms_xdb.gethttpport() from dual;
This produces 16021. Has anyone gotten this error message or something similar? I've only ever seen success in every guide, but something about my implementation must be off or different. I'm not sure what details will be helpful here, but willing to provide anything that would be pertinent.
We re-ran prvtrsch.plb and reset the password. Still given the same error. I can see that the dbms_isched_remote_access package was created in the database, and the it has references to procedures owned by the remote_scheduler_agent user. Is there any way to verify that the registration procedure is available via http? Also, I'm unsure if this makes a difference or not, but when we specify host during registration, we are using atlantic. Atlantic is our physical hardware where several databases reside. The database we want to register with is called stage and the port we set for xdb is 16021. It is the only place where this port is being used. When we register is it fine to say the host is atlantic and the port is 16021, or do we need to find a way to expose stage?
When you register the agent you must specify the physical host that the database is running on and the port that XDB HTTP server is running on and the host (physical or virtual) that the database is running on must be accessible from the agent (no firewalls in between).
It could be that you are in fact connecting to some other application by mistake.
Also did you see any errors when you reran prvtrsch.plb ? That sql file runs several commands that setup authentication and any errors could signal a problem.
Ok, we have the agent registered successfully! It looks like we have another problem now in that when running a job, it always returns invalid username or password. I went through several other posts that indicate jssu as the culprit and not having much luck as everything in our environment looks correct. Thank you for the help!