I am havin the following error on API Management portal. when i clicked the proxy while its downloading and before it started to download following error occurs. So i need to fix it i dont understand. It's onpremise model on our instance. Thank you.
Error Deploying
Invalid virtual host reference secure. Context Revision:1;APIProxy:wfs-proxy_rev1_2015_06_09;Organization:org;Environment:test
Answer by sarthak · Jun 12, 2015 at 01:46 PM
Hi @Hasan
When you go to your proxy bundle and click on Proxy Endpoint -> default on your left hand panel it will open up an XML view. Go down below and you will see the following snippet there :
<HTTPProxyConnection> <BasePath>/v3/abcd</BasePath> <VirtualHost>default</VirtualHost> <VirtualHost>secure</VirtualHost> </HTTPProxyConnection>
I am guessing in your case the virtual host secure is not defined
You can check the configured VH from APIs -> Environment Configurations at the top menu. Most likely you will see no VH by the name of "secure" there.
Learn more about Virtual Hosts here : http://apigee.com/docs/api-services/content/virtual-hosts
Ok i removed the secure tag but now the following error occurs. Unknown target.
<fault><faultstring>Unknown target $IP1:9001</faultstring><detail><errorcode>UNKNOWN_TARGET</errorcode></detail></fault>
Is the error happening when deploying the proxy ?
You have a "default" VH defined in your environment configuration as well as in your proxy definition right ?
I had a similar problem with default virtual host.
{ "code" : "messaging.config.beans.InvalidVirtualHostReference", "message" : "Invalid virtual host reference default. Context Revision:1;APIProxy:TestProxy;Organization:development-org;Environment:test", "contexts" : [ ], "cause" : { "code" : "messaging.config.beans.VirtualHostDoesNotExist", "message" : "Virtual host default does not exist in environment test", "contexts" : [ ] }
Your suggestion helped me to fix it.
Thanks.
Answer by HS Bilgen · Jun 12, 2015 at 02:28 PM
first issue is ok. it's not appearing again but the second issue which is unknown target error is still occurs.
I have VH defined test as 9002 and VH prod defined as 9001 in the environment configuration. In the proxy definition i didn't mentioned as any of them specific port so which steps should i follow?
Answer by sarthak · Jun 12, 2015 at 02:51 PM
In your environment configurations you will see that virtual hosts have a name.
In your proxy definition you should be using that name :
<HTTPProxyConnection> <BasePath>/v3/abcd</BasePath> <VirtualHost>{use the VH NAME here}</VirtualHost> </HTTPProxyConnection>
Hope this helps
Answer by Mike Dunker @Google
·
Jun 12, 2015 at 05:15 PM
Hi @Hasan,
This error
<fault><faultstring>Unknown target $IP1:9001</faultstring><detail><errorcode>UNKNOWN_TARGET</errorcode></detail></fault>
is not an issue with your virtual hosts, it should be an issue with your target. It is probably something wrong with your HTTPTargetConnection in one of your target files. Look at your target files and see if you have IP1 specified -- "$IP1" is not a valid URL, which I think is the error.
Answer by anantha · Nov 20, 2018 at 09:37 PM
The deploying error gets resolved when you remove the <VirtualHost>secure</VirtualHost> tag from <HTTPProxyConnection> parent element .
Virtual host does not exist on publish, intermittent api failures 1 Answer
are there more tutorial lectures which teach us set up more real-world API proxies? 1 Answer
Integrating SAP and Apigee. Error while uploading WSDL file into Apigee 5 Answers
How to calculate Error Rate using Api Monitoring Management API? 0 Answers
How to get Apps for multiple Developers? 3 Answers