Cannot use WSO2 ESB and AS simultaneously even after changing offset - wso2-as

I extracted ESB and AS, and opened up the repository/conf/carbon.xml file of the ESB >> “Ports” configuration. Change the “Offset” setting from 0 to 1.
I can run both of them on different ports 9443 & 9444. When I try to login to both of them, either of them will get log out.
Example- First I login to AS, then when I login to ESB, AS will logout and vise-verse.
What should I do?

Looks like this is a bug with products and reported an jira [1].
As a workaround, you can start two servers in two browsers. Then those instances will not automatically log out.
[1] https://wso2.org/jira/browse/WSAS-2249

Related

Uploading larger files with User-Agent python-requests/2.2.1 results in RemoteDisconnected

Using the python library requests and uploading larger files I will get the error RemoteDisconnected('Remote end closed connection without response').
However it will work if I change the default User-Agent of the library to something like "Mozilla/5.0".
Does anybody know the reason for this behaviour ?
Edit: Only happens with Property X-Explode-Archive: true
Are there any specific pattern of timeout that you could highlight in this case?
For example: It times out after 60 seconds every time (of that sort)?
I would suggest to check the logs from all the medium configured with the Artifactory instance. Like, Reverse-proxy & the embedded-tomcat too. As the issue is specific to large-sized files, correlate the timeout pattern with the timeouts configured from all the entities which would give us a hint towards this issue.

Asterisk AMI events sometimes missing

I have a Python service which connects to Asterisk via AMI and listens for events to detect when a call has begun.
This seems to work on most of the Asterisk servers I connect to. However, on a few of our servers we just don't see any of the AMI events (e.g. Newstate) when the call happens, though we do later see the Cdr event once the call has completed.
I've confirmed that this isn't specific to the library we're using to connect to AMI (py-Asterisk), because I see exactly the same thing when I connect manually, e.g.
$ openssl s_client -connect my-asterisk-server:5039
...
Asterisk Call Manager/2.10.3
Action: Login
Username: manager
Secret: ThisIsWhereITypedTheActualPassword
Response: Success
Message: Authentication accepted
Event: FullyBooted
Privilege: system,all
Status: Fully Booted
Action: Events
EventMask: on
Response: Success
Events: on
In the above block, I manually connected to AMI, logged in as the same administrator my Python code is using, and ensured that all events are turned on (though my asterisk config should already be displaying all events I care about by default).
After this point what I see on some of my Asterisk servers is a series of expected events like Newstate, followed by an eventual Cdr event. On other servers, I see only the Cdr event, with nothing proceeding it. This is completely consistened within each server, meaning a server either always sends all of the expected events or it never does.
I've checked the versions of asterisk, the manager.conf config file, the extensions.conf dialplan, the asterisk console in verbose mode (i.e. connecting via asterisk -vvvr to the running process), and just generally comparing my config files to my actually-working Asterisk servers.
I'm stumped as to what could be causing this, or even what to try next. If it matters, here's what my manager.conf looks like:
[general]
tlsenable=yes
tlsbindaddr=10.0.0.123:5039
tlscertfile=/etc/pki/asterisk/ami.crt
tlsprivatekey=/etc/pki/asterisk/ami.key
[admin]
secret=TheActualPasswordIsOnThisLine
read=system,call,log,verbose,command,agent,user,originate,cdr
write=system,call,log,verbose,command,agent,user,originate,cdr
EDIT: After some further digging, it seems that the only events which are showing up are Cdr events, so even things like peer registration events don't show up. I've also confirmed that all of my Asterisk 13.19.0-1 servers are exhibiting this behavior, and the only working servers are running much older versions of Asterisk.
The weird thing is that calls do come through successfully, so the problem is not that I'm missing some necessary module. (Or maybe I am? Is there some "make events show up in AMI" module that I need to ensure is loaded?)
FURTHER EDIT: I was able to turn on CEL events (Channel Event Logging), and those events show up, but this is a different set of events than the standard Newchannel/Newstate/etc I'm looking for. In theory I could rewrite a large portion of my service to use the CEL events, but ideally I'd just turn on the standard Newstate/Newchannel/Hangup events.
It turns out the issue is that I was missing
enabled=yes
in my manager.conf. Hopefully this will be helpful to someone in the future: even if you're able to connect to AMI, log into AMI, receive some events from AMI, and send commands to AMI and get responses back, it might not be enabled, and this will suppress most of the core events like Newchannel, Newstate, etc.
One clue was that running manager show settings in the asterisk console returned this:
Global Settings:
----------------
Manager (AMI) No
...
which is apparently how it indicates that it's not enabled.

How to get test agent's state and queue length

does a codedui tests agent exposes an api to get information
about it's status in real time?
if so where can i find details about it and purhapse code examples?
edit:
i've found a way to get some information on test agent via command line (link in the comment section),
still would love to know id there's an api to enable other types or actions, specifically restarting the agent
Looks like there is a lot of functionality to be accessed through TestAgentConfig.exe. I found an MSDN blog post that goes into some details on the feature.
Specifically, to start or stop the agent: "Start/Stop service - sc \machinename stop vsttagent ; sc \machinename start vsttcontroller. If the agent and controller are in different domain, you can use IP instead of machine name."

How to configure Asterisk realtime with mysql properly?

I currently have over 1k realtime users setup on a MySQL server(only 10-20 users will register simulatneously) for Asterisk. The problem is the sip is not registering evertime. Sometimes I get 'registration timeout'. Is there a setup guide or a setting which I need to configure in order to have >99% successful registrations?
Never faced the issue as I have fewer users.
But according to the aterisk documentation:
If you have problems with your network connection going up and down (e.g. an unreliable cable connection) and you keep losing your sip registry, you may want to add registerattempts and registertimeout settings to the general section above the register definitions.
Setting registerattempts=0 will force Asterisk to attempt to reregister until it can (the default is 10 tries).
registertimeout sets the length of time in seconds between registration attempts (the default is 20 seconds).
About achieving 99% success:
I think you have to study your system and apply setting to the above variables accordingly (dynamically). I suggest using Markovian models like mm1 simulation if your system is not complicated.

Glance image create stuck in SAVING status

I am using the Glance HTTP API (v1 & v2) to create an image. These latest tests are against v2.
I am passing in a url via headers 'x-glance-api-copy-from' (and have also tried 'x-glance-api-copy-from') for an image: http://10.x.x.x/ub14.raw
The command returns a 201 with a status of "queued", but a follow up call to get the image information shows status as 'SAVING' and progress of 25.
Another user can successfully create an image from the command line with the same copy-from url.
I have tried several different JSON payloads to no avail
Are you on devstack? g-api (glance-api) log will show you the error. Glance-api fetches the image from the url and then saves it to the configured backend.
First: find out where the logs are, it depends of deployment type. In devstack there's local.conf option SCREEN_LOGDIR=/opt/stack/logs
Second: grep glance-api log for a "Traceback".
I assume this may be related to proxy settings / load balancer. Cannot say more without knowing the deployment topology.

Resources