Parallel Testing With Appium and Selenium Grid

Hi,

I am trying to do Appium Parallel device execution with Selenium Grid.

Though I am able to start the hub and then start two instances of Appium from different Ports and bootstrap ports,but as the 2nd Appium session starts during parallel Execution,the 1st session stops and commands for both the sessions are getting executed on one device,connected to the 2nd Session only.

Can anyone please suggest.I have tried many things but nothing is working out.Because of this only I planned to use Selenium Grid to avoid any kind of session conflict but still encountering the same issue.

Any help please.

pass on device id in capabilities and as argument in appium command line, that fixed the issue for me.