AliQB
(AliQB)
January 21, 2024, 10:16am
1
Hi
I trying to access OneFlow with REST client
when I run this in same server that all open nebula services are existed
curl -u “oneadmin:pass” http://127.0.0.1:2474
I get this error
body { text-align:center;font-family:helvetica,arial;font-size:22px;
color:#888;margin:20px}
#c {margin:0 auto;width:500px;text-align:left}
Sinatra doesn’t know this ditty.
Try this:
get '/' do
"Hello World"
end
what am I doing wrong?
FrancJP
(Francisco Picolini)
January 22, 2024, 8:58am
2
Hello @AliQB ,
Welcome to the forum. Please check if this post helps you:
Please, describe the problem here and provide additional information below (if applicable) …
I am not able to login to http://localhost:9869/
Receive an error in chrome Sinatra does not know this ditty. As I am not a programmer I would prefer some usefull explanation. What to change in virtualhost file on sunstone-server.conf file.
New install:opennebula 6.8.0-1 + apache + mariadb
Fri Oct 27 12:02:06 2023 [I]: 10.10.102.236 - - [27/Oct/2023:12:02:06 +0200] “GET / HTTP/1.1” 200 - 0.0881
Fri …
Or you probably want to take a look on this Issue:
opened 08:57PM - 07 May 18 UTC
closed 10:54AM - 05 Feb 19 UTC
Status: Pending
Community
Category: Sunstone
Type: Bug
# Bug Report
## Version of OpenNebula
- [ ] 5.2.2
- [ ] 5.4.0
- [ ] 5.4.1
…
- [ ] 5.4.2
- [ ] 5.4.3
- [ ] 5.4.4
- [ ] 5.4.5
- [ ] 5.4.6
- [ ] 5.4.7
- [ ] 5.4.8
- [ ] 5.4.9
- [ ] 5.4.10
- [x] 5.4.11
- [x] 5.4.12
- [ ] Development build
## Component
- [ ] Authorization (LDAP, x509 certs...)
- [ ] Command Line Interface (CLI)
- [ ] Contextualization
- [ ] Documentation
- [ ] Federation and HA
- [ ] Host, Clusters and Monitorization
- [ ] KVM
- [ ] Networking
- [ ] Orchestration (OpenNebula Flow)
- [ ] Packages
- [ ] Scheduler
- [ ] Storage & Images
- [x] Sunstone
- [ ] Upgrades
- [ ] User, Groups, VDCs and ACL
- [ ] vCenter
## Description
After upgrading to opennebula 5.4.12 can't do login from the initial page. It shows the login page but after clicking login button it returns a page with the message "Sinatra doesn’t know this ditty"
The console logs collected in chromium Version 66.0.3359.139 (Developer Build) (64-bit) are:
```
opennebula.casa.local/:15 GET http://opennebula.casa.local:9869/dist/login.js 401 (Unauthorized)
opennebula.casa.local/:1 Refused to execute script from 'http://opennebula.casa.local:9869/dist/login.js' because its MIME type ('application/json') is not executable, and strict MIME type checking is enabled.
opennebula.casa.local/:1 This page includes a password or credit card input in a non-secure context. A warning has been added to the URL bar. For more information, see https://goo.gl/zmWq3m.
```
### Expected Behavior
Appear dashboard page as usual after login.
### Actual Behavior
After clicking on login button it returns the following code:
```
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
body { text-align:center;font-family:helvetica,arial;font-size:22px;
color:#888;margin:20px}
#c {margin:0 auto;width:500px;text-align:left}
</style>
</head>
<body>
<h2>Sinatra doesn’t know this ditty.</h2>
<img src='http://opennebula.casa.local:9869/__sinatra__/404.png'>
<div id="c">
Try this:
<pre>post '/' do
"Hello World"
end
</pre>
</div>
</body>
</html>
```
## How to reproduce
Install opennebula in gentoo configured with profile default/linux/amd64/17.0 (stable) from the following ebuild from my personal overlay:
[opennebula-5.4.12.ebuild](https://github.com/samuelbernardo/ssnb-overlay/blob/master/app-emulation/opennebula/opennebula-5.4.12.ebuild)
Using sinatra current version dev-ruby/sinatra 1.4.8 and ruby 2.3.7.
The other dependencies came from gentoo portage and my overlay for some missing ruby gems.
Configured opennebula using KVM and remaining options with defaults.
After accessing the opennebula web interface it appears the login page. Then after clicking on login button it appears the sinatra error page.
The logs in sunstone.log are:
```
Mon May 07 21:45:30 2018 [I]: 192.168.0.1 - - [07/May/2018:21:45:30 +0100] "GET / HTTP/1.1" 200 - 0.0023
Mon May 07 21:45:30 2018 [I]: 192.168.0.1 - - [07/May/2018:21:45:30 +0100] "GET /css/login.css HTTP/1.1" 200 - 0.0010
Mon May 07 21:45:30 2018 [I]: 192.168.0.1 - - [07/May/2018:21:45:30 +0100] "GET /dist/login.js HTTP/1.1" 401 - 0.0011
Mon May 07 21:45:30 2018 [I]: 192.168.0.1 - - [07/May/2018:21:45:30 +0100] "GET /images/ajax-loader.gif HTTP/1.1" 200 - 0.0006
Mon May 07 21:45:30 2018 [I]: 192.168.0.1 - - [07/May/2018:21:45:30 +0100] "GET /images/panel.png HTTP/1.1" 200 - 0.0063
Mon May 07 21:45:30 2018 [I]: 192.168.0.1 - - [07/May/2018:21:45:30 +0100] "GET /images/login.png HTTP/1.1" 200 - 0.0041
Mon May 07 21:45:30 2018 [I]: 192.168.0.1 - - [07/May/2018:21:45:30 +0100] "GET /images/opennebula-5.0.png HTTP/1.1" 200 - 0.0036
```
The sched.log have some errors when it started up related to libcurl:
```
Mon May 7 18:27:28 2018 [Z0][SCHED][I]: XML-RPC client using 1073741824 bytes for response buffer.
Mon May 7 18:27:28 2018 [Z0][SCHED][E]: Cannot contact oned, will retry... Error: libcurl failed to execute the HTTP POST transaction, explaining: Failed to connect to localhost port 2633: Connection refused
Mon May 7 18:27:30 2018 [Z0][SCHED][E]: Cannot contact oned, will retry... Error: libcurl failed to execute the HTTP POST transaction, explaining: Failed to connect to localhost port 2633: Connection refused
Mon May 7 18:27:32 2018 [Z0][SCHED][E]: Cannot contact oned, will retry... Error: libcurl failed to execute the HTTP POST transaction, explaining: Failed to connect to localhost port 2633: Connection refused
Mon May 7 18:27:34 2018 [Z0][SCHED][I]: oned successfully contacted.
Mon May 7 18:27:34 2018 [Z0][SCHED][I]: Configuring scheduler for Zone ID: 0
Mon May 7 18:27:34 2018 [Z0][SCHED][I]: Starting scheduler loop...
Mon May 7 18:27:34 2018 [Z0][SCHED][I]: Scheduler loop started.
```
The other log files have no errors.
# Progress Status
- [ ] Branch created
- [ ] Code committed to development branch
- [ ] Testing - QA
- [ ] Documentation
- [ ] Release notes - resolved issues, compatibility, known issues
- [ ] Code committed to upstream release/hotfix branches
- [ ] Documentation committed to upstream release/hotfix branches
It should be fixed by 6.8, and even on 6.6, so can you please confirm which OpenNebula version are you using?
AliQB
(AliQB)
January 22, 2024, 11:31am
3
Thank you so much for your feedback
I am using version 6.4
FrancJP
(Francisco Picolini)
January 22, 2024, 2:11pm
4
We strongly suggest to use our latest version.
Are you able to use 6.8 CE?, or at least 6.4.5 LTS?
Also, you haven’t mentioned if you tried anything from the links I’ve shared. Please confirm.
Cheers,
dclavijo
(Daniel Clavijo)
January 22, 2024, 3:36pm
5
The problem is that you are trying to issue a GET request to the route /
which is an invalid path on the oneflow API . Try curl -u “oneadmin:pass” http://127.0.0.1:2474/service
instead, it should give you a response with the pool of existing services.
AliQB
(AliQB)
January 22, 2024, 5:37pm
6
I am given a preinstalled openNebula to connect another webapp to its REST apis I have to ask manager to update, I taught the problem is about a misconfiguration, If its about version I will try to update and check
I read links you mentioned, I didn’t find related solution
Thanks
AliQB
(AliQB)
January 22, 2024, 5:38pm
7
thank you for your feedback but I get same error