Hi

 

I'm following the Kubernetes tutorial in the Academy to deploy the Exchange service:

https://academy.creatio.com/documents/administration/7-16/deploying-synchronization-service-kubernetes?document=administration#CSH_3

 

I deployed Redis database and ExchangeListener package using Helm.

When I deployed the ExchangeListener package and forwarded the local port to the host I got "Connection Refused" and the service crashed.

Any help! 

PS C:\Windows\system32> helm install --set apiVersion=apps/v1 --set env.host=exchange-listener-redis-master.default.svc.cluster.local --name creatioexchangelistener "C:\Program Files\kubernetes\exchangelistener-0.5.0.tgz"
NAME:   creatioexchangelistener
LAST DEPLOYED: Wed Jun 17 22:23:52 2020
NAMESPACE: default
STATUS: DEPLOYED
 
RESOURCES:
==> v1/ConfigMap
NAME                            DATA  AGE
creatioexchangelistener-worker  2     0s
 
==> v1/Pod(related)
NAME                           READY  STATUS             RESTARTS  AGE
creatioexchangelistener-api-0  0/1    ContainerCreating  0         0s
 
==> v1/Service
NAME                         TYPE       CLUSTER-IP    EXTERNAL-IP  PORT(S)  AGE
creatioexchangelistener-api  ClusterIP  10.96.65.102  <none>       80/TCP   0s
 
==> v1/StatefulSet
NAME                         READY  AGE
creatioexchangelistener-api  0/2    0s
 
==> v1beta1/Ingress
NAME                         CLASS   HOSTS           ADDRESS  PORTS  AGE
creatioexchangelistener-api  <none>  test.tscrm.com  80       0s
 
 
NOTES:
1. Get the application URL by running these commands:
 
PS C:\Windows\system32> kubectl port-forward creatioexchangelistener-api-0  8089:80
Forwarding from 127.0.0.1:8089 -> 80
Forwarding from [::1]:8089 -> 80
Handling connection for 8089
Handling connection for 8089
E0617 22:25:06.332296    9584 portforward.go:400] an error occurred forwarding 8089 -> 80: error forwarding port 80 to pod ec2e3c86d81d27efeb0ff525ce5898f1ac78a2b7c1358837c3da569965831451, uid : exit status 1: 2020/06/17 20:25:06 socat[53947] E connect(5, AF=2 127.0.0.1:80, 16): Connection refused
E0617 22:25:06.332296    9584 portforward.go:400] an error occurred forwarding 8089 -> 80: error forwarding port 80 to pod ec2e3c86d81d27efeb0ff525ce5898f1ac78a2b7c1358837c3da569965831451, uid : exit status 1: 2020/06/17 20:25:06 socat[53948] E connect(5, AF=2 127.0.0.1:80, 16): Connection refused
Handling connection for 8089
E0617 22:25:06.360263    9584 portforward.go:400] an error occurred forwarding 8089 -> 80: error forwarding port 80 to pod ec2e3c86d81d27efeb0ff525ce5898f1ac78a2b7c1358837c3da569965831451, uid : exit status 1: 2020/06/17 20:25:06 socat[53949] E connect(5, AF=2 127.0.0.1:80, 16): Connection refused
Handling connection for 8089
Handling connection for 8089
E0617 22:25:06.459266    9584 portforward.go:400] an error occurred forwarding 8089 -> 80: error forwarding port 80 to pod ec2e3c86d81d27efeb0ff525ce5898f1ac78a2b7c1358837c3da569965831451, uid : exit status 1: 2020/06/17 20:25:06 socat[53950] E connect(5, AF=2 127.0.0.1:80, 16): Connection refused
E0617 22:25:06.464261    9584 portforward.go:400] an error occurred forwarding 8089 -> 80: error forwarding port 80 to pod ec2e3c86d81d27efeb0ff525ce5898f1ac78a2b7c1358837c3da569965831451, uid : exit status 1: 2020/06/17 20:25:06 socat[53951] E connect(5, AF=2 127.0.0.1:80, 16): Connection refused
Handling connection for 8089
E0617 22:25:06.475264    9584 portforward.go:400] an error occurred forwarding 8089 -> 80: error forwarding port 80 to pod ec2e3c86d81d27efeb0ff525ce5898f1ac78a2b7c1358837c3da569965831451, uid : exit status 1: 2020/06/17 20:25:06 socat[53952] E connect(5, AF=2 127.0.0.1:80, 16): Connection refused
Handling connection for 8089
Handling connection for 8089
E0617 22:25:11.511131    9584 portforward.go:400] an error occurred forwarding 8089 -> 80: error forwarding port 80 to pod ec2e3c86d81d27efeb0ff525ce5898f1ac78a2b7c1358837c3da569965831451, uid : exit status 1: 2020/06/17 20:25:11 socat[54236] E connect(5, AF=2 127.0.0.1:80, 16): Connection refused
E0617 22:25:11.513105    9584 portforward.go:400] an error occurred forwarding 8089 -> 80: error forwarding port 80 to pod ec2e3c86d81d27efeb0ff525ce5898f1ac78a2b7c1358837c3da569965831451, uid : exit status 1: 2020/06/17 20:25:11 socat[54237] E connect(5, AF=2 127.0.0.1:80, 16): Connection refused
Handling connection for 8089
E0617 22:25:11.527104    9584 portforward.go:400] an error occurred forwarding 8089 -> 80: error forwarding port 80 to pod ec2e3c86d81d27efeb0ff525ce5898f1ac78a2b7c1358837c3da569965831451, uid : exit status 1: 2020/06/17 20:25:11 socat[54238] E connect(5, AF=2 127.0.0.1:80, 16): Connection refused

 

 

Thank you

Mohamed

Like 0

Like

3 comments

Hello Mohamed,

 

Seems that your 8089 has no process that listens to this port so that's why you cannot forward the listener to this port. Try running this command:

 

netstat -abn | findstr "LISTENING" | findstr "your host IP-address" | findstr "8089"

 

and check if this command shows the result.

 

Then try running

 

kubectl -n default exec -it creatioexchangelistener curl -v host_IP_address:8089

 

and let's check the result then (we will need to run kubectl describe pods creatioexchangelistener)

 

Best regards,

Oscar

Hi Oscar

Can you please provide me a YAML file to deploy the pod (Redis + Exchange Listener + Expose Service Address)?

 

Thank you

Mohamed

Mohamed Ouederni,

Hello Mohamed,

 

We don't have a separate YAML file for this proposes and Redis should be installed separately. All available .yaml files can be found in the exchangelistener-0.6.9.tgz file that is downloaded via this link 

 

http://ftp.bpmonline.com/support/downloads/Exchangelistener/exchangelis…

 

Best regards,

Oscar

Show all comments

Hello

I'm deploying Creatio Exchange Listener for my developing environment. 

I'm following this academy guide:

https://academy.creatio.com/documents/administration/7-16/deploying-synchronization-service-docker?document=administration#CSH_4

I got this error message when I created the listener container:

PS C:\Users\medouederni-pc> docker run -p 8808:80 --env ExchangeListenerRedisHost=172.17.0.2 --env ExchangeListenerRedisDatabase=0 --env PodName=CreatioExchangeListener  --name CreatioExchangeListener bpmonline/exchangelistener:0.5.0                                                                                                                               Unable to find image 'bpmonline/exchangelistener:0.5.0' locally
0.5.0: Pulling from bpmonline/exchangelistener
804555ee0376: Pull complete                                                                                                                                                         970251047358: Pull complete                                                                                                                                                         f3d4c41a4fd1: Pull complete                                                                                                                                                         1cccda79a5f9: Pull complete                                                                                                                                                         a02b6037fa5e: Pull complete                                                                                                                                                         5a51c6fa0bad: Pull complete                                                                                                                                                         Digest: sha256:bb4e356161faade8783fbb86a820f96b837222a11dce7311617b4236777c49c4
Status: Downloaded newer image for bpmonline/exchangelistener:0.5.0
log4net:ERROR Could not create Appender [ExchangeListenerGelfAmqpAppender] of type [Gelf4Net.Appender.GelfAmqpAppender, Gelf4Net.AmqpAppender]. Reported error follows.
RabbitMQ.Client.Exceptions.BrokerUnreachableException: None of the specified endpoints were reachable ---> RabbitMQ.Client.Exceptions.ConnectFailureException: Connection failed ---> System.Net.Internals.SocketExceptionFactory+ExtendedSocketException: No such device or address
   at System.Net.Dns.InternalGetHostByName(String hostName)
   at System.Net.Dns.ResolveCallback(Object context)
--- End of stack trace from previous location where exception was thrown ---
   at System.Net.Dns.HostResolutionEndHelper(IAsyncResult asyncResult)
   at System.Net.Dns.EndGetHostAddresses(IAsyncResult asyncResult)
   at System.Net.Dns.<>c.<GetHostAddressesAsync>b__25_1(IAsyncResult asyncResult)
   at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)
--- End of stack trace from previous location where exception was thrown ---
   at RabbitMQ.Client.TcpClientAdapter.ConnectAsync(String host, Int32 port)
   at RabbitMQ.Client.Impl.TaskExtensions.TimeoutAfter(Task task, Int32 millisecondsTimeout)
   at RabbitMQ.Client.Impl.SocketFrameHandler.Connect(ITcpClient socket, AmqpTcpEndpoint endpoint, Int32 timeout)
   --- End of inner exception stack trace ---
   at RabbitMQ.Client.EndpointResolverExtensions.SelectOne[T](IEndpointResolver resolver, Func`2 selector)
   at RabbitMQ.Client.Framing.Impl.AutorecoveringConnection.Init(IEndpointResolver endpoints)
   at RabbitMQ.Client.ConnectionFactory.CreateConnection(IEndpointResolver endpointResolver, String clientProvidedName)
   --- End of inner exception stack trace ---
   at RabbitMQ.Client.ConnectionFactory.CreateConnection(IEndpointResolver endpointResolver, String clientProvidedName)
   at Gelf4Net.Appender.GelfAmqpAppender.InitializeConnectionFactory()
   at log4net.Repository.Hierarchy.XmlHierarchyConfigurator.ParseAppender(XmlElement appenderElement)
log4net:ERROR Appender named [ExchangeListenerGelfAmqpAppender] not found.
Hosting environment: Production
Content root path: /app
Now listening on: http://[::]:80
Application started. Press Ctrl+C to shut down.

 

I tested the service and its working:

{
  "ServiceStatus": "Started",
  "version": "0.5.0",
  "connections": {}
}

I made the creatio configuration side:

https://academy.creatio.com/documents/administration/7-16/set-exchange-listener-service-side-creatio?document=administration#CSH_5 

Now, I can send emails but when I try to sync the mailbox I got this error:

[ExchangeListener.Subscription.ServiceFactory] 2020-06-16 11:57:47,885 [39] INFO : [18e30f9f-a1e7-4718-9cd1-e16577924fa2] End processing EmailMessage with id '31'.
[ExchangeListener.DataSend.EventDataSender] 2020-06-16 11:57:47,886 [39] DEBUG:  EventDataSender sending request to http://localhost:7700/0/ServiceModel/ExchangeListenerService.svc/ProcessFullEmail
[ExchangeListener.Email.Events.EmailEventProcessor] 2020-06-16 11:57:47,890 [42] ERROR: [18e30f9f-a1e7-4718-9cd1-e16577924fa2] [06/16/2020 11:57:47] Mailbox creatio123456789@gmail.com: error sending emails ['<71fe88dc-0198-4eca-8cc9-a8771976b3ab@gmail.com>' in folder ,'<71fe88dc-0198-4eca-8cc9-a8771976b3ab@gmail.com>' in folder ] to http://localhost:7700/0/ServiceModel/ExchangeListenerService.svc/NewEmail.
System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.Http.CurlException: Couldn't connect to server
   at System.Net.Http.CurlHandler.ThrowIfCURLEError(CURLcode error)
   at System.Net.Http.CurlHandler.MultiAgent.FinishRequest(StrongToWeakReference`1 easyWrapper, CURLcode messageResult)
   --- End of inner exception stack trace ---
   at System.Net.Http.HttpClient.FinishSendAsyncBuffered(Task`1 sendTask, HttpRequestMessage request, CancellationTokenSource cts, Boolean disposeCts)
   at ExchangeListener.DataSend.EventClient.PostAsync(String requestUri, HttpContent content) in /src/src/ExchangeListener/DataSend/EventClient.cs:line 42
   at ExchangeListener.DataSend.EventDataSender.Send(String url, Object data) in /src/src/ExchangeListener/DataSend/EventDataSender.cs:line 85
   at ExchangeListener.DataSend.EventDataSender.SendEmail(Object data, SynchronizationCredentials credentials) in /src/src/ExchangeListener/DataSend/EventDataSender.cs:line 95
   at ExchangeListener.Email.Events.BaseEventProcessor.SendRequestObject(Object requstDtoObject, SynchronizationCredentials credentials) in /src/src/ExchangeListener/Email/Events/BaseEventProcessor.cs:line 149
   at ExchangeListener.Email.Events.EmailEventProcessor.SendEmailMessagesToBpm(List`1 messages, SynchronizationCredentials credentials) in /src/src/ExchangeListener/Email/Events/EmailEventProcessor.cs:line 66
[ExchangeListener.Imap.Subscription.ResentEmailsSynchronization] 2020-06-16 11:57:47,892 [39] INFO : [18e30f9f-a1e7-4718-9cd1-e16577924fa2] Email ids sended to bpm.
[ExchangeListener.Imap.Subscription.ResentEmailsSynchronization] 2020-06-16 11:57:47,892 [39] INFO : [18e30f9f-a1e7-4718-9cd1-e16577924fa2] Synchronization session for creatio123456789@gmail.com ended.

 

Thank you

Mohamed

Like 1

Like

4 comments

Hello Mohamed,

 

This is strange that your Exchange service returns this:

{
  "ServiceStatus": "Started",
  "version": "0.5.0",
  "connections": {}
}

even after the mailbox was used for emails sending. Please go to the mailbox settings and apply any changes there and see if you see something similar to this after that:

So you see the record about your mailbox there. Or try re-adding your mailbox to the app from scratch.

 

The error message you receive states that ExcahgneListener services couldn't establish the connection to the mail server. Please use this command:

 

ping mail_server_ip_address

 

from the ExchangeListener server so to test the connectivity. Also please check if the "The URL of the Exchange event processing service in Creatio" system setting has the value of https://mycreatio.com/0/ServiceModel/ExchangeListenerService.svc/NewEmail.

 

I've deployed the service on my end using the Academy instructions and everything is working properly so it should work as expected on your end and the problem can be in the connection between the email server and the ExchagneListener service.

 

Best regards,

Oscar

Dear Oscar Dylan,

 

Problem solved! It was a networking issue in Docker for Windows.

 

For everyone who may have this issue, you have to use host.docker.internal variable as your host IP address.

More information: https://docs.docker.com/docker-for-windows/networking/

Hi Mohamed,

 

I am running into the same issue for an on-prem dev image.  You indicated the issue was resolved via "For everyone who may have this issue, you have to use host.docker.internal variable as your host IP address."  Could you elaborate on that?  I read the article on docker for windows networking but wasn't clear on how you implemented the resolution.  Thanks so much :)

 

Update - never mind. Figured it out.  Using host.docker.internal in place of localhost in all cases. This resolves everything and ExchangeListener is working for both syncing and sending.  Thanks!!  :)

Hi Mohamed,

Can you help me with following questions:

Did you use OS setup file or pull request for installing Redis?

How did you set up redis host address?

Where exactly we use "host.docker.internal" variable. The link you shared doesnt seem to work.

 

Thank you

Gokul

Show all comments

How to apply access permissions (object permission) / access right when insert data via server-side?

I have set the record access permission, but when inserting via server-side, the access right does not work. The insert method that I did was in accordance with the article above.

Thanks.

Like 0

Like

1 comments

Hi,

It is possible adding data via server-side with access permissions using the “Entity” class. Please find more information with the examples by the link below:

https://academy.bpmonline.com/documents/technic-sdk/7-13/working-database-entity-class

Best regards,

Norton  

Show all comments