Problem proxying WSO2 API Manager 3.0 through IAM - wso2

1) What we want:
We want Carbon (WSO2 API-Manager 3.0) to be proxied by Nginx through and after its interactions with our IAM login process.
2) what we did:
We reverse proxy to the initial page at our_proxy/wso2 and clients had no mention of the wso2_host machine.
We followed instruction from "Configuring the Proxy Server and the Load Balancer" to setup the reverse proxy.
https://apim.docs.wso2.com/en/latest/install-and-setup/setup/setting-up-proxy-server-and-the-load-balancer/configuring-the-proxy-server-and-the-load-balancer/#step-2-configure-the-load-balancerreverse-proxy-server
These are the settings we used in Step 3, "Configure the reverse proxy settings in the product":
[transport.https.properties]
proxyPort = 443
[server]
hostname = "our-api-store-url"
inside the file <API-M_HOME>/repository/conf/deployment.toml.
3) What we got:
During the authentication process, clients were redirected to Carbon on wso2_host:port and remained there after receiving their authentication token, so subsequent work was not proxied.
This is a problem because we cannot manage the URL appearance of our gateway or expose it without revealing wso2_host and requiring application port openings.
This is the corresponding error message from the log files:
api-manager_1 | JAVA_HOME environment variable is set to /opt/java/o penjdk
api-manager_1 | CARBON_HOME environment variable is set to /home/wso 2carbon/wso2am-3.0.0
api-manager_1 | Using Java memory options: -Xms256m -Xmx1024m
api-manager_1 | [2020-05-07 10:52:41,478] INFO {org.wso2.config.map per.ConfigParser} - Applying Configurations upon new Templates
api-manager_1 | [2020-05-07 10:52:41,483] WARN {org.wso2.config.map per.ConfigParser} - Overriding files in configuration directory /home/wso2carbon /wso2am-3.0.0
api-manager_1 | [2020-05-07 10:52:41,730] ERROR {org.wso2.config.map per.TomlParser} - server previously defined at line 1, column 1 (line 237, colum n 1)
api-manager_1 | [2020-05-07 10:52:41,732] SEVERE {org.wso2.carbon.s erver.Main handleConfiguration} - Error while performing configuration changes
api-manager_1 | org.wso2.config.mapper.ConfigParserException: Error parsing deployment configuration
api-manager_1 | at org.wso2.config.mapper.TomlParser.parse(TomlP arser.java:140)
api-manager_1 | at org.wso2.config.mapper.ConfigParser.parse(Con figParser.java:249)
api-manager_1 | at org.wso2.config.mapper.ConfigParser.deploy(Co nfigParser.java:217)
api-manager_1 | at org.wso2.config.mapper.ConfigParser.deployAnd StoreMetadata(ConfigParser.java:180)
api-manager_1 | at org.wso2.config.mapper.ConfigParser.parse(Con figParser.java:127)
api-manager_1 | at org.wso2.carbon.server.Main.handleConfigurati on(Main.java:231)
api-manager_1 | at org.wso2.carbon.server.Main.main(Main.java:10 3)
api-manager_1 | at sun.reflect.NativeMethodAccessorImpl.invoke0( Native Method)
api-manager_1 | at sun.reflect.NativeMethodAccessorImpl.invoke(N ativeMethodAccessorImpl.java:62)
api-manager_1 | at sun.reflect.DelegatingMethodAccessorImpl.invo ke(DelegatingMethodAccessorImpl.java:43)
api-manager_1 | at java.lang.reflect.Method.invoke(Method.java:4 98)
api-manager_1 | at org.wso2.carbon.bootstrap.Bootstrap.loadClass (Bootstrap.java:70)
api-manager_1 | at org.wso2.carbon.bootstrap.Bootstrap.main(Boot strap.java:51)
api-manager_1 |
apim-with-analytics_api-manager_1 exited with code 0
api-manager_1 | [2020-05-07 10:52:41,732] SEVERE {org.wso2.carbon.s erver.Main handleConfiguration} - Error while performing configuration changes
api-manager_1 | org.wso2.config.mapper.ConfigParserException: Error parsing deployment configuration
api-manager_1 | at org.wso2.config.mapper.TomlParser.parse(TomlP arser.java:140)
api-manager_1 | at org.wso2.config.mapper.ConfigParser.parse(Con figParser.java:249)
api-manager_1 | at org.wso2.config.mapper.ConfigParser.deploy(Co nfigParser.java:217)
api-manager_1 | at org.wso2.config.mapper.ConfigParser.deployAnd StoreMetadata(ConfigParser.java:180)
api-manager_1 | at org.wso2.config.mapper.ConfigParser.parse(Con figParser.java:127)
api-manager_1 | at org.wso2.carbon.server.Main.handleConfigurati on(Main.java:231)
api-manager_1 | at org.wso2.carbon.server.Main.main(Main.java:10 3)
api-manager_1 | at sun.reflect.NativeMethodAccessorImpl.invoke0( Native Method)
api-manager_1 | at sun.reflect.NativeMethodAccessorImpl.invoke(N ativeMethodAccessorImpl.java:62)
api-manager_1 | at sun.reflect.DelegatingMethodAccessorImpl.invo ke(DelegatingMethodAccessorImpl.java:43)
api-manager_1 | at java.lang.reflect.Method.invoke(Method.java:4 98)
api-manager_1 | at org.wso2.carbon.bootstrap.Bootstrap.loadClass (Bootstrap.java:70)
api-manager_1 | at org.wso2.carbon.bootstrap.Bootstrap.main(Boot strap.java:51)
api-manager_1 |
apim-with-analytics_api-manager_1 exited with code 0
api-manager_1 | JAVA_HOME environment variable is set to /opt/java/o penjdk
api-manager_1 | CARBON_HOME environment variable is set to /home/wso 2carbon/wso2am-3.0.0
api-manager_1 | Using Java memory options: -Xms256m -Xmx1024m
api-manager_1 | [2020-05-07 10:52:41,478] INFO {org.wso2.config.map per.ConfigParser} - Applying Configurations upon new Templates
api-manager_1 | [2020-05-07 10:52:41,483] WARN {org.wso2.config.map per.ConfigParser} - Overriding files in configuration directory /home/wso2carbon /wso2am-3.0.0
api-manager_1 | [2020-05-07 10:52:41,730] ERROR {org.wso2.config.map per.TomlParser} - server previously defined at line 1, column 1 (line 237, colum n 1)
api-manager_1 | [2020-05-07 10:52:41,732] SEVERE {org.wso2.carbon.s erver.Main handleConfiguration} - Error while performing configuration changes
api-manager_1 | org.wso2.config.mapper.ConfigParserException: Error parsing deployment configuration
api-manager_1 | at org.wso2.config.mapper.TomlParser.parse(TomlP arser.java:140)
api-manager_1 | at org.wso2.config.mapper.ConfigParser.parse(Con figParser.java:249)
api-manager_1 | at org.wso2.config.mapper.ConfigParser.deploy(Co nfigParser.java:217)
api-manager_1 | at org.wso2.config.mapper.ConfigParser.deployAnd StoreMetadata(ConfigParser.java:180)
api-manager_1 | at org.wso2.config.mapper.ConfigParser.parse(Con figParser.java:127)
api-manager_1 | at org.wso2.carbon.server.Main.handleConfigurati on(Main.java:231
Any ideas on what we can change to fix the problem?

We solved the problem by following the steps in "Troubleshooting 'Registered callback does not match with the provided url' error" in the API Manager Documentation.
https://apim.docs.wso2.com/en/latest/troubleshooting/troubleshooting-invalid-callback-error/
In addition, we had our Identity Provider (IDP/IAM) team update the settings with the same callback to carbon which then calls to the webapp of store and publisher.

Related

WSO2 APIUtil Error while creating axis configuration for tenant

I'm using WSO2 API-Manager 3.0. When I browse to the DevPortal (before signing in) I can see the list of APIs.
But when I login (using my email as assigned by my organization's IAM team) I get a red pop-up message saying 'Error While Loading APIs':
The log file revels this message:
api-manager_1 | [2020-04-13 17:47:58,602] INFO - PermissionUpdater Permission cache updated for tenant -1234
api-manager_1 | [2020-04-13 17:48:00,125] ERROR - APIUtil Error while creating axis configuration for tenant mydomain.com
api-manager_1 | java.lang.RuntimeException: Error while getting tenant activation status.
api-manager_1 | at org.wso2.carbon.core.multitenancy.utils.TenantAxisUtils.getTenantConfigurationContext(TenantAxisUtils.java:126) ~[org.wso2.carbon.core_4.5.1.jar:?]
api-manager_1 | at org.wso2.carbon.core.multitenancy.utils.TenantAxisUtils.getTenantAxisConfiguration(TenantAxisUtils.java:104) ~[org.wso2.carbon.core_4.5.1.jar:?]
api-manager_1 | at org.wso2.carbon.apimgt.impl.utils.APIUtil.loadTenantConfigBlockingMode_aroundBody372(APIUtil.java:6166) [org.wso2.carbon.apimgt.impl_6.5.349.jar:?]
api-manager_1 | at org.wso2.carbon.apimgt.impl.utils.APIUtil.loadTenantConfigBlockingMode(APIUtil.java:6162) [org.wso2.carbon.apimgt.impl_6.5.349.jar:?]
api-manager_1 | at org.wso2.carbon.apimgt.rest.api.util.impl.WebAppAuthenticatorImpl.authenticate(WebAppAuthenticatorImpl.java:129) [org.wso2.carbon.apimgt.rest.api.util_6.5.349.jar:?]
api-manager_1 | at org.wso2.carbon.apimgt.rest.api.util.interceptors.auth.OAuthAuthenticationInterceptor.handleRequest(OAuthAuthenticationInterceptor.java:121) [org.wso2.carbon.apimgt.rest.api.util_6.5.349.jar:?]
api-manager_1 | at org.wso2.carbon.apimgt.rest.api.util.interceptors.auth.OAuthAuthenticationInterceptor.handleMessage(OAuthAuthenticationInterceptor.java:66) [org.wso2.carbon.apimgt.rest.api.util_6.5.349.jar:?]
api-manager_1 | at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308) [cxf-core-3.2.8.jar:3.2.8]
api-manager_1 | at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121) [cxf-core-3.2.8.jar:3.2.8]
api-manager_1 | at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:267) [cxf-rt-transports-http-3.2.8.jar:3.2.8]
api-manager_1 | at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:234) [cxf-rt-transports-http-3.2.8.jar:3.2.8]
api-manager_1 | at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:208) [cxf-rt-transports-http-3.2.8.jar:3.2.8]
api-manager_1 | at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:160) [cxf-rt-transports-http-3.2.8.jar:3.2.8]
(plus another 200 lines of trace-back)
When I login to the Publisher the page loads with a spinning icon that says "Loading Settings" and stays there forever:
Again the log file reveals the same message as above.
Note: Other users in my organization are able to login and view the APIs just fine. But they are not using an email address to authenticate. I am the only using an email address to authenticate.
Another Note: Our organization uses an IAM server for authentication.
Any suggestions on what to try next to resolve this?
In WSO2 servers, the username john#tenant.com represents the user john in abc.com tenant. Therefore, you email domain has been identified as a tenant domain. Try the below format for your username. It should work.
john#gmail.com#tenant.com
If you don't have multiple tenants, use carbon.super as the tenant. So your username should go like this.
john#gmail.com#carbon.super

Flyway repeatable migrations - executed before versioned ones?

I'm observing some strange Flyway behaviour when using repeatable migrations. Documentation states, that:
Within a single migration run, repeatable migrations are always applied last, after all pending versioned migrations have been executed.
but in my case it seems, that the repeatable migration (which is recreating one of the DB views) is failing because it is being executed before versioned migrations.
Flyway info data, from before migration:
+-------------------+---------------------+---------------------+---------+
| Version | Description | Installed on | State |
+-------------------+---------------------+---------------------+---------+
| 1 | Initial | | <Baseln |
| 2 | ███████████████████ | | <Baseln |
| 5 | Initial data | | <Baseln |
| 6 | Initial sample data | 2016-04-29 14:21:13 | Success |
| 20160422002600000 | ███████████████████ | 2016-04-29 14:33:48 | Success |
| 20160422003400000 | ███████████████████ | 2016-04-29 14:33:48 | Success |
| 20160422004700000 | ███████████████████ | 2016-04-29 14:33:48 | Success |
| 20160428152800000 | ███████████████████ | 2016-04-29 14:33:48 | Success |
| 20160428163300000 | ███████████████████ | 2016-04-29 14:33:48 | Success |
| 20160428171300000 | ███████████████████ | 2016-04-29 14:33:48 | Success |
| | ProblematicView | 2016-04-29 14:33:48 | Outdate |
| | Reports | 2016-04-29 14:33:49 | Success |
| | OtherView | 2016-04-29 14:33:49 | Success |
| 20160429115100000 | ███████████████████ | 2016-04-29 14:37:10 | Success |
| 20160429160100000 | ███████████████████ | 2016-05-16 11:54:24 | Success |
| 20160501090500000 | ███████████████████ | 2016-05-16 11:54:24 | Success |
| 20160504111600000 | ███████████████████ | 2016-05-16 11:54:24 | Success |
| 20160504120400000 | ███████████████████ | 2016-05-16 11:54:24 | Success |
| 20160504143800000 | ███████████████████ | 2016-05-16 11:54:24 | Success |
| 20160504145200000 | ███████████████████ | 2016-05-16 11:54:25 | Success |
| 20160504161600000 | ███████████████████ | | Pending |
| 20160506110300000 | ███████████████████ | | Pending |
| 20160506162300000 | ███████████████████ | | Pending |
| 20160506232000000 | ███████████████████ | | Pending |
| 20160508144100000 | ███████████████████ | | Pending |
| 20160509192400000 | ███████████████████ | | Pending |
| 20160511160000000 | ███████████████████ | | Pending |
| 20160511163659000 | ███████████████████ | | Pending |
| 20160511163700000 | A newly_created_col | | Pending |
| 20160511170000000 | ███████████████████ | | Pending |
| 20160512112100000 | ███████████████████ | | Pending |
| 20160512170500000 | ███████████████████ | | Pending |
| 20160513134900000 | ███████████████████ | | Pending |
+-------------------+---------------------+-------------------------------+
and the migration log:
[INFO] Database: jdbc:sqlserver://█:1433;authenticationScheme=nativeAuthentication;xopenStates=false;sendTimeAsDatetime=true;trustServerCertificate=false;sendStringParametersAsUnicode=true;selectMethod=direct;responseBuffering=adaptive;packetSize=8000;multiSubnetFailover=false;loginTimeout=15;lockTimeout=-1;lastUpdateCount=true;encrypt=false;disableStatementPooling=true;databaseName=█;applicationName=Microsoft JDBC Driver for SQL Server;applicationIntent=readwrite; (Microsoft SQL Server 11.0)
[INFO] Successfully validated 33 migrations (execution time 00:00.052s)
[INFO] SQLServer does not support setting the schema for the current session. Default schema NOT changed to dbo
[INFO] Current version of schema [dbo]: 20160504145200000
[WARNING] outOfOrder mode is active. Migration of schema [dbo] may not be reproducible.
[INFO] Migrating schema [dbo] with repeatable migration ProblematicView
[ERROR] Migration of schema [dbo] with repeatable migration ProblematicView failed! Changes successfully rolled back.
[INFO] SQLServer does not support setting the schema for the current session. Default schema NOT changed to dbo
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.550s
[INFO] Finished at: Mon May 16 12:40:49 CEST 2016
[INFO] Final Memory: 10M/243M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.flywaydb:flyway-maven-plugin:4.0.1:migrate (migrate-¦) on project ¦-db: org.flywaydb.core.internal.dbsupport.FlywaySqlScriptException:
[ERROR] Migration R__ProblematicView.sql failed
[ERROR] ------------------------------------------------
[ERROR] SQL State : S0001
[ERROR] Error Code : 207
[ERROR] Message : Invalid column name 'newly_created_column'. /*<-- column created in V20160511163700000*/`
Am I doing something wrong?
I'm using flyway-maven-plugin 4.0.1 (tested also on 4.0) with the following properties:
Maven:
<cleanDisabled>true</cleanDisabled>
<outOfOrder>true</outOfOrder>
<table>schema_version</table>
<repeatableSqlMigrationPrefix>R</repeatableSqlMigrationPrefix>
<sqlMigrationPrefix>V</sqlMigrationPrefix>
Config file:
flyway.user=flyway
flyway.password=█
flyway.url=jdbc:sqlserver://█;databasename=█
flyway.locations=filesystem:flyway/upgrade/█`
//EDIT1:
When outOfOrder is set to false the migration is still failing,
clean + migrate seem to work, but that doesn't quite solve the problem,
I've noticed one more thing - when I've rolled back the DB to version 20160504143800000 repeatable migrations are shown at the end of the list (flyway info), but when 20160504145200000 migration is successfully executed suddenly they're in the middle of it (as in the table above). I'm not sure though if this has anything to do with the actual execution order.
It turned out to be a bug in Flyway: LINK - it affects releases 4.0 - 4.0.2 and has been fixed in 4.0.3 (Release notes).
I can confirm that now it works as expected both on empty and existing databases.
It would be worth you changing the outOfOrder property to false so that migrations can only happen in their defined order.
If you are still seeing a problem, can you also set cleanDisabled to false so that the schema is totally rebuilt and report what you see.
Both of the above cause flyway to work in a more certain way and so allow other people to be more certain about the order of events are commenting on.

Cloud Foundry router cannot find api.xx.xxxx.com/info (AWS)

Finally managed to successfully deploy cloud foundry to AWS.
Mostly following instructions from http://docs.cloudfoundry.org/deploying/ec2/bootstrap-aws-vpc.html
Its failing at the validation step that is to get a success response for the following:
curl api.subdomain.domain/info
Of course I have substituted the subdomain and domain appropriately.
I am getting the error:
404 Not Found: Requested route ('api.XX.XXXXX.com') does not exist.
The request is coming till the Cloud foundry router router_z1. And I can see this error in the logs for router_z1.
Here is output of my bosh vms command:
------------------------------------+---------+---------------+--------------+
| Job/index | State | Resource Pool | IPs |
+------------------------------------+---------+---------------+--------------+
| unknown/unknown | running | medium_z1 | 10.10.16.254 |
| unknown/unknown | running | medium_z2 | 10.10.81.4 |
| unknown/unknown | running | small_errand | 10.10.17.1 |
| unknown/unknown | running | small_errand | 10.10.17.0 |
| api_worker_z1/0 | running | small_z1 | 10.10.17.20 |
| api_z1/0 | running | large_z1 | 10.10.17.18 |
| clock_global/0 | running | medium_z1 | 10.10.17.19 |
| etcd_z1/0 | running | medium_z1 | 10.10.16.20 |
| hm9000_z1/0 | running | medium_z1 | 10.10.17.21 |
| loggregator_trafficcontroller_z1/0 | running | small_z1 | 10.10.16.34 |
| loggregator_z1/0 | running | medium_z1 | 10.10.16.31 |
| login_z1/0 | running | medium_z1 | 10.10.17.17 |
| nats_z1/0 | running | medium_z1 | 10.10.16.11 |
| router_z1/0 | running | router_z1 | 10.10.16.15 |
| runner_z1/0 | running | runner_z1 | 10.10.17.22 |
| stats_z1/0 | running | small_z1 | 10.10.17.15 |
| uaa_z1/0 | running | medium_z1 | 10.10.17.16 |
+------------------------------------+---------+---------------+--------------+
The only change that I made in the CF deployment manifest was to eliminate instance from zone 2. The reason being AWS default limit for number of instances on EC2 in a particular region is 20.
Any pointers on how to resolve this issue will be appreciated.
Figured out the problem. Couple of issues:
In the CF deployment manifest make sure the system domain property
is <BOSH_VPC_SUBDOMAIN>.<BOSH_VPC_DOMAIN>. That is if you have
reserved cf.example.com for cloud foundry PaaS. Make sure
cf.example.com is what system_domain property in your cloud
foundry deployment manifest refers to. Infact example.com should
not appear in your deployment manifest anywhere without cf..
Through out the deployment manifest it is always cf.example.com
Do not use '#' in any of the passwords within the deployment
manifest. I have logged a bug for this in cf-releases:
https://github.com/cloudfoundry/cf-release/issues/527

How to view cloudfoundry logs when cf login fail

I have used bosh-lite to deploy a single node cloudfoundry in my development environment. After deployment, I run the bosh vms, and it returns the vms list:
+------------------------------------+---------+---------------+--------------+
| Job/index | State | Resource Pool | IPs |
+------------------------------------+---------+---------------+--------------+
| api_z1/0 | running | large_z1 | 10.244.0.138 |
| etcd_leader_z1/0 | running | medium_z1 | 10.244.0.38 |
| ha_proxy_z1/0 | running | router_z1 | 10.244.0.34 |
| hm9000_z1/0 | running | medium_z1 | 10.244.0.142 |
| loggregator_trafficcontroller_z1/0 | running | small_z1 | 10.244.0.10 |
| loggregator_z1/0 | running | medium_z1 | 10.244.0.14 |
| login_z1/0 | running | medium_z1 | 10.244.0.134 |
| nats_z1/0 | running | medium_z1 | 10.244.0.6 |
| postgres_z1/0 | running | medium_z1 | 10.244.0.30 |
| router_z1/0 | running | router_z1 | 10.244.0.22 |
| runner_z1/0 | running | runner_z1 | 10.244.0.26 |
| uaa_z1/0 | running | medium_z1 | 10.244.0.130 |
+------------------------------------+---------+---------------+--------------+
But when I try to use "cf api https://api.10.244.0.34.xip.io --skip-ssl-validation" to connect the cloudfoundry, it returns an error:
ConnectEx tcp: No connection could be made because the target machine
actively refused it.
The log information is very general (actually this is the exception from CF client which is written in .net), and doesn't provide useful information.
My question is, which VM handles the api command? And, where can I find the detail log in that VM?
api_z1/0 is handling the command. You can get its logs via the BOSH CLI itself: bosh logs api_z1 0 --all.
You probably also need to add the route to your local route table so that traffic to HAProxy container at 10.244.0.24 knows to go through the BOSH-lite VM at 192.168.50.4. Run bin/add-route or bin/add-route.bat from the root of your BOSH-lite repo.

NoHttpResponseException on uploading file to S3 (camel-aws)

I am trying to upload around 10 GB file from my local machine to S3 (inside a camel route). Although file gets uploaded in around 3-4 minutes, but it also throwing following exception:
2014-06-26 13:53:33,417 | INFO | ads.com/outbound | FetchRoute | 167 - com.ut.ias - 2.0.3 | Download complete to local. Pushing file to S3
2014-06-26 13:54:19,465 | INFO | manager-worker-6 | AmazonHttpClient | 144 - org.apache.servicemix.bundles.aws-java-sdk - 1.5.1.1 | Unable to execute HTTP request: The target server failed to respond
org.apache.http.NoHttpResponseException: The target server failed to respond
at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:95)[142:org.apache.httpcomponents.httpclient:4.2.5]
at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:62)[142:org.apache.httpcomponents.httpclient:4.2.5]
at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:254)[141:org.apache.httpcomponents.httpcore:4.2.4]
at org.apache.http.impl.AbstractHttpClientConnection.receiveResponseHeader(AbstractHttpClientConnection.java:289)[141:org.apache.httpcomponents.httpcore:4.2.4]
at org.apache.http.impl.conn.DefaultClientConnection.receiveResponseHeader(DefaultClientConnection.java:252)[142:org.apache.httpcomponents.httpclient:4.2.5]
at org.apache.http.impl.conn.ManagedClientConnectionImpl.receiveResponseHeader(ManagedClientConnectionImpl.java:191)[142:org.apache.httpcomponents.httpclient:4.2.5]
at org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:300)[141:org.apache.httpcomponents.httpcore:4.2.4]
.......
at java.util.concurrent.FutureTask.run(FutureTask.java:262)[:1.7.0_55]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)[:1.7.0_55]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)[:1.7.0_55]
at java.lang.Thread.run(Thread.java:744)[:1.7.0_55]
2014-06-26 13:55:08,991 | INFO | ads.com/outbound | FetchRoute | 167 - com.ut.ias - 2.0.3 | Upload complete.
Due to which camel route doesn't stop and it is continuously throwing InterruptedException:
2014-06-26 13:55:11,182 | INFO | ads.com/outbound | SftpOperations | 110 - org.apache.camel.camel-ftp - 2.12.1 | JSCH -> Disconnecting from cxportal.integralads.com port 22
2014-06-26 13:55:11,183 | INFO | lads.com session | SftpOperations | 110 - org.apache.camel.camel-ftp - 2.12.1 | JSCH -> Caught an exception, leaving main loop due to Socket closed
2014-06-26 13:55:11,183 | WARN | lads.com session | eventadmin | 139 - org.apache.felix.eventadmin - 1.3.2 | EventAdmin: Exception: java.lang.InterruptedException
java.lang.InterruptedException
at EDU.oswego.cs.dl.util.concurrent.LinkedQueue.offer(Unknown Source)[139:org.apache.felix.eventadmin:1.3.2]
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor.execute(Unknown Source)[139:org.apache.felix.eventadmin:1.3.2]
at org.apache.felix.eventadmin.impl.tasks.DefaultThreadPool.executeTask(DefaultThreadPool.java:101)[139:org.apache.felix.eventadmin:1.3.2]
at org.apache.felix.eventadmin.impl.tasks.AsyncDeliverTasks.execute(AsyncDeliverTasks.java:105)[139:org.apache.felix.eventadmin:1.3.2]
at org.apache.felix.eventadmin.impl.handler.EventAdminImpl.postEvent(EventAdminImpl.java:100)[139:org.apache.felix.eventadmin:1.3.2]
at org.apache.felix.eventadmin.impl.adapter.LogEventAdapter$1.logged(LogEventAdapter.java:281)[139:org.apache.felix.eventadmin:1.3.2]
at org.ops4j.pax.logging.service.internal.LogReaderServiceImpl.fire(LogReaderServiceImpl.java:134)[50:org.ops4j.pax.logging.pax-logging-service:1.7.1]
at org.ops4j.pax.logging.service.internal.LogReaderServiceImpl.fireEvent(LogReaderServiceImpl.java:126)[50:org.ops4j.pax.logging.pax-logging-service:1.7.1]
at org.ops4j.pax.logging.service.internal.PaxLoggingServiceImpl.handleEvents(PaxLoggingServiceImpl.java:180)[50:org.ops4j.pax.logging.pax-logging-service:1.7.1]
at org.ops4j.pax.logging.service.internal.PaxLoggerImpl.inform(PaxLoggerImpl.java:145)[50:org.ops4j.pax.logging.pax-logging-service:1.7.1]
at org.ops4j.pax.logging.internal.TrackingLogger.inform(TrackingLogger.java:86)[18:org.ops4j.pax.logging.pax-logging-api:1.7.1]
at org.ops4j.pax.logging.slf4j.Slf4jLogger.info(Slf4jLogger.java:476)[18:org.ops4j.pax.logging.pax-logging-api:1.7.1]
at org.apache.camel.component.file.remote.SftpOperations$JSchLogger.log(SftpOperations.java:359)[110:org.apache.camel.camel-ftp:2.12.1]
at com.jcraft.jsch.Session.run(Session.java:1621)[109:org.apache.servicemix.bundles.jsch:0.1.49.1]
at java.lang.Thread.run(Thread.java:744)[:1.7.0_55]
Please see my code below and let me know, where I am going wrong:
TransferManager tm = new TransferManager(
S3Client.getS3Client());
// TransferManager processes all transfers asynchronously,
// so this call will return immediately.
Upload upload = tm.upload(
Utils.getProperty(Constants.BUCKET),
getS3Key(file.getName()), file);
try {
upload.waitForCompletion();
logger.info("Upload complete.");
} catch (AmazonClientException amazonClientException) {
logger.warn("Unable to upload file, upload was aborted.");
amazonClientException.printStackTrace();
}
The stacktrace doesn't even have any reference to my code, hence couldn't determine where the issue is.
Any help or pointer would be really appreciated.
Thanks