Issues with setup remote PHP interpreter from Devilbox via docker-compose option

Hello,

I’m having problems with setup PHP interpreter in latest PHPStorm with docker-compose from Devilbox (http://devilbox.org/). 

I'm keep getting this error:

I've also tried to change PHP interpreter path to absolute - still the same.

Here's the log:

2019-07-04 22:32:14,016 [47520924]   WARN - .PhpRemoteInterpreterComponent - Can not update phpinfo 
com.intellij.execution.ExecutionException: Failed to parse validation script output
at com.jetbrains.php.config.phpInfo.PhpInfoUtil.parsePhpInfo(PhpInfoUtil.java:60)
at com.jetbrains.php.config.phpInfo.PhpInfoUtil.getWholePhpInfo(PhpInfoUtil.java:157)
at com.jetbrains.php.remote.interpreter.ui.PhpRemoteInterpreterComponent.reloadPhpInfo(PhpRemoteInterpreterComponent.java:119)
at com.jetbrains.php.config.interpreters.PhpInterpreterComponent.lambda$init$0(PhpInterpreterComponent.java:146)
at com.jetbrains.php.ui.PhpUiUtil$2.lambda$actionPerformed$0(PhpUiUtil.java:117)
at com.intellij.util.ui.UIUtil.invokeLaterIfNeeded(UIUtil.java:3080)
at com.jetbrains.php.ui.PhpUiUtil$2.actionPerformed(PhpUiUtil.java:116)
at com.intellij.openapi.actionSystem.ex.ActionUtil$1.run(ActionUtil.java:261)
at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:278)
at com.intellij.openapi.actionSystem.impl.ActionButton.actionPerformed(ActionButton.java:183)
at com.intellij.openapi.actionSystem.impl.ActionButton.performAction(ActionButton.java:147)
at com.intellij.openapi.actionSystem.impl.ActionButton.processMouseEvent(ActionButton.java:415)
at java.awt.Component.processEvent(Component.java:6315)
at java.awt.Container.processEvent(Container.java:2239)
at java.awt.Component.dispatchEventImpl(Component.java:4899)
at java.awt.Container.dispatchEventImpl(Container.java:2297)
at java.awt.Component.dispatchEvent(Component.java:4721)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4904)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4535)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4476)
at java.awt.Container.dispatchEventImpl(Container.java:2283)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.Component.dispatchEvent(Component.java:4721)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:766)
at java.awt.EventQueue.access$500(EventQueue.java:98)
at java.awt.EventQueue$3.run(EventQueue.java:715)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
at java.awt.EventQueue$4.run(EventQueue.java:739)
at java.awt.EventQueue$4.run(EventQueue.java:737)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:736)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:729)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:674)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:373)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:109)
at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:190)
at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:235)
at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:233)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:233)
at java.awt.Dialog.show(Dialog.java:1077)
at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl$MyDialog.show(DialogWrapperPeerImpl.java:706)
at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl.show(DialogWrapperPeerImpl.java:437)
at com.intellij.openapi.ui.DialogWrapper.invokeShow(DialogWrapper.java:1682)
at com.intellij.openapi.ui.DialogWrapper.show(DialogWrapper.java:1631)
at com.intellij.openapi.ui.DialogWrapper.showAndGet(DialogWrapper.java:1646)
at com.jetbrains.php.ui.PhpUiUtil.editConfigurable(PhpUiUtil.java:89)
at com.jetbrains.php.config.PhpInterpreterConfigurationForm$2.actionPerformed(PhpInterpreterConfigurationForm.java:63)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
at java.awt.Component.processMouseEvent(Component.java:6550)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3325)
at java.awt.Component.processEvent(Component.java:6315)
at java.awt.Container.processEvent(Container.java:2239)
at java.awt.Component.dispatchEventImpl(Component.java:4899)
at java.awt.Container.dispatchEventImpl(Container.java:2297)
at java.awt.Component.dispatchEvent(Component.java:4721)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4904)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4535)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4476)
at java.awt.Container.dispatchEventImpl(Container.java:2283)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.Component.dispatchEvent(Component.java:4721)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:766)
at java.awt.EventQueue.access$500(EventQueue.java:98)
at java.awt.EventQueue$3.run(EventQueue.java:715)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
at java.awt.EventQueue$4.run(EventQueue.java:739)
at java.awt.EventQueue$4.run(EventQueue.java:737)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:736)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:729)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:674)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:373)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:109)
at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:190)
at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:235)
at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:233)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:233)
at java.awt.Dialog.show(Dialog.java:1077)
at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl$MyDialog.show(DialogWrapperPeerImpl.java:706)
at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl.show(DialogWrapperPeerImpl.java:437)
at com.intellij.openapi.ui.DialogWrapper.invokeShow(DialogWrapper.java:1682)
at com.intellij.openapi.ui.DialogWrapper.show(DialogWrapper.java:1631)
at com.intellij.openapi.options.newEditor.SettingsDialog.lambda$show$0(SettingsDialog.java:73)
at com.intellij.openapi.application.TransactionGuardImpl.runSyncTransaction(TransactionGuardImpl.java:88)
at com.intellij.openapi.application.TransactionGuardImpl.submitTransactionAndWait(TransactionGuardImpl.java:153)
at com.intellij.openapi.options.newEditor.SettingsDialog.show(SettingsDialog.java:73)
at com.intellij.ide.actions.ShowSettingsUtilImpl.showSettingsDialog(ShowSettingsUtilImpl.java:84)
at com.intellij.ide.actions.ShowSettingsAction.perform(ShowSettingsAction.java:54)
at com.intellij.ide.MacOSApplicationProvider$Worker.lambda$null$1(MacOSApplicationProvider.java:104)
at com.intellij.ide.MacOSApplicationProvider$Worker.lambda$submit$7(MacOSApplicationProvider.java:177)
at com.intellij.openapi.application.TransactionGuardImpl.runSyncTransaction(TransactionGuardImpl.java:88)
at com.intellij.openapi.application.TransactionGuardImpl.lambda$pollQueueLater$0(TransactionGuardImpl.java:74)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.doRun(LaterInvocator.java:435)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.runNextEvent(LaterInvocator.java:419)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:403)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:764)
at java.awt.EventQueue.access$500(EventQueue.java:98)
at java.awt.EventQueue$3.run(EventQueue.java:715)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:734)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:729)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:678)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:373)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Caused by: org.xml.sax.SAXParseException; Premature end of file.
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at com.jetbrains.php.config.phpInfo.PhpInfoUtil.parsePhpInfo(PhpInfoUtil.java:51)
... 130 more


I don't have this issue using docker-compose without Devilbox. I know you guys does not support Devilbox, but maybe you can give some hints how to debug communication between Docker and PHPStorm so I can find out what's wrong with Devilbox?

0

And my PHPStorm:

PhpStorm 2019.1.3
Build #PS-191.7479.51, built on June 18, 2019
JRE: 1.8.0_202-release-1483-b53 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.14.4
0

It happens because in order to get the interpreter properties, PhpStorm is trying to launch one more container of the same service, but fails because running this container requires binding some TCP ports that are already listened by the containers originally started with docker-compose up -d.

You can run docker-compose down and then click Refresh in PhpStorm, but it won't help much - volume mappings won't be detected automatically because they involve environment variables. You have to set them manually.

Apart from that and the Docker Compose file version that I had to change from 2.1 to 2.2, running stuff in devilbox is no different from any other Docker Compose service, I've successfully run print 123; with it.

1

Hi Eugene,

Thank you for the reply.

"It happens because in order to get the interpreter properties, PhpStorm is trying to launch one more container of the same service, but fails because running this container requires binding some TCP ports that are already listened by the containers originally started with docker-compose up -d"

By "one more container of the same service" - you mean one more "PHP" container?

Which TCP ports are occupied by Devilbox and interrupt PHPStorm?

I can see the following when I run

docker-compose up -d httpd php mysql
CONTAINER ID        IMAGE                            COMMAND                  CREATED             STATUS              PORTS                                      NAMES

d493cf0b1eab        devilbox/mysql:mysql-8.0-0.3     "docker-entrypoint.s…"   4 seconds ago       Up 3 seconds        0.0.0.0:3306->3306/tcp, 33060/tcp          devilbox_mysql_1

ba354120eec2        devilbox/nginx-stable:0.30       "/docker-entrypoint.…"   5 seconds ago       Up 4 seconds        0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp   devilbox_httpd_1

791f304dba7b        devilbox/php-fpm:7.2-work-0.89   "/docker-entrypoint.…"   6 seconds ago       Up 5 seconds        9000/tcp                                   devilbox_php_1

d4d5cc858022        cytopia/bind:0.15                "/docker-entrypoint.…"   7 seconds ago       Up 5 seconds        0.0.0.0:53->53/tcp, 0.0.0.0:53->53/udp     devilbox_bind_1

 

"Apart from that and the Docker Compose file version that I had to change from 2.1 to 2.2, running stuff in devilbox is no different from any other Docker Compose service, I've successfully run print 123; with it."

You were able to set up remote interpreter also? I'm afraid I don't understand. 

My current conlusion is that changing ports you mentioned, would be the solution. Am I right?

0

I've just figure out what you meant about stoping container before PHP interpreter config. For some reason it started  towork after I rebooted my Mac.

But questions about ports remains. :)

0

I wasn't correct about the ports, the error message is the same for both types of conflict so I got confused.

In fact, the reason for that is the IP that the container receives - when the service is started already, it already has a static IP address (172.16.238.10 in my Devilbox installation), and Docker can't assign the same address to the new container we are trying to use to get data.

You were able to set up remote interpreter also? I'm afraid I don't understand.

Yes: http://recordit.co/Bm32PiylDW

1

I see. Thank you the recording. :)

So basically the solution would be to stop Devilbox, do interpreter validation and everything should be fine (and change version to "2.2") - as you said earlier.

Probably static IP is there for a reason, so Devilbox devs can't help with that. 

0

请先登录再写评论。