OpenMediaVault-Plugin-Developers / openmediavault-docker-gui

Docker plugin for OpenMediaVault
32 stars 17 forks source link

Docker modify (OMV 3.0) #21

Closed subzero79 closed 8 years ago

subzero79 commented 8 years ago

Testing the new modify feature. image: subzero79/docker-telegram-sonarr-bot

edited a mount bind path in host side, stack trace is

Error: "Failed to connect to localhost port 80: Connection refused" - Code: 7
Error #0:
exception 'OMVModuleDockerException' with message 'Error: "Failed to connect to localhost port 80: Connection refused" - Code: 7' in /usr/share/omvdocker/Utils.php:63
Stack trace:
#0 /usr/share/omvdocker/Utils.php(162): OMVModuleDockerUtil::doApiCall('http://localhos...')
#1 /usr/share/openmediavault/engined/rpc/docker.inc(507): OMVModuleDockerUtil::getImage('233e2d88f26a', NULL)
#2 [internal function]: OMVRpcServiceDocker->modifyContainer(Array, Array)
#3 /usr/share/php/openmediavault/rpcservice.inc(125): call_user_func_array(Array, Array)
#4 /usr/share/php/openmediavault/rpc.inc(79): OMVRpcServiceAbstract->callMethod('modifyContainer', Array, Array)
#5 /usr/sbin/omv-engined(494): OMVRpc::exec('Docker', 'modifyContainer', Array, Array, 1)
#6 {main}
nicjo814 commented 8 years ago

Why is the docker plugin configured to use port 80?

//Niclas On 20 Jan 2016 08:02, "subzero79" notifications@github.com wrote:

Testing the new modify feature image: subzero79/docker-telegram-sonarr-bot

edited a mount bind path in host side, stack trace is

Error: "Failed to connect to localhost port 80: Connection refused" - Code: 7 Error #0: exception 'OMVModuleDockerException' with message 'Error: "Failed to connect to localhost port 80: Connection refused" - Code: 7' in /usr/share/omvdocker/Utilsphp:63 Stack trace:

0 /usr/share/omvdocker/Utilsphp(162):

OMVModuleDockerUtil::doApiCall('http://localhos')

1 /usr/share/openmediavault/engined/rpc/dockerinc(507):

OMVModuleDockerUtil::getImage('233e2d88f26a', NULL)

2 [internal function]: OMVRpcServiceDocker->modifyContainer(Array, Array)

3 /usr/share/php/openmediavault/rpcserviceinc(125):

call_user_func_array(Array, Array)

4 /usr/share/php/openmediavault/rpcinc(79):

OMVRpcServiceAbstract->callMethod('modifyContainer', Array, Array)

5 /usr/sbin/omv-engined(494): OMVRpc::exec('Docker',

'modifyContainer', Array, Array, 1)

6 {main}

— Reply to this email directly or view it on GitHub https://github.com/OpenMediaVault-Plugin-Developers/openmediavault-docker-gui/issues/21 .

subzero79 commented 8 years ago

is not....must be hard coded by mistake

netstat -ntap | grep docker
tcp        0      0 127.0.0.1:42005         0.0.0.0:*               LISTEN      8788/docker    
nicjo814 commented 8 years ago

/usr/share/openmediavault/engined/rpc/docker.inc(507): OMVModuleDockerUtil::getImage('233e2d88f26a', NULL)

Hmm, it looks like it didn't get any "apiPort" at all to connect to (NULL passed as argument in the line above and thus went with port 80). Could you try and re-save the settings page and give it another go?

subzero79 commented 8 years ago

I try changing the port of the docker daemon. If you mean the port in the container this are containers running without port exposure. Let me see if i can expose a port see if it makes a difference

subzero79 commented 8 years ago

No go.....the same error changing the docker daemon and using a container with port expose.

nicjo814 commented 8 years ago

I just updated the plugin with some fixes in 3.0.5. Could you try with this new version? One fix was regarding modify and ports...

subzero79 commented 8 years ago

Same problem. Gonna try another VM that was not upgraded

subzero79 commented 8 years ago

The other VM did not complain at all. There must be some php code that i altered in omv probably. I was working on a telegram plugin so i wonder if I left something broken there.

nicjo814 commented 8 years ago

Jut for the sake of it, could you try to restart /etc/init.d/openmediavault-enngined a few times, then reload (F5) the omv web-gui. I'm having some issues with caching so I have to do this procedure every time I update the plugin locally on my dev machine. Would be interesting to see if it also solves your issue.

nicjo814 commented 8 years ago

Telegram plugin sounds nice by the way :-)

subzero79 commented 8 years ago

Close this bug then, the other VM worked perfectly. Today i upgraded to latest svn omv, and is working fine.

subzero79 commented 8 years ago

By the way regarding the latest commits the autocomplete feature is not working anymore.